CentOS 7 Suspend

Create a shell script such as 'suspend.sh', fill with following contents,

#!/bin/sh
echo your_root_password | sudo systemctl suspend

make it executable,

$ sudo chmod u+x suspend.sh

then, if you want to suspend the computer, run it,

$ cd to/the/script/path
$ ./suspend.sh

 

(Over)

 

posted @ 2022-01-03 13:18  Anonymous596  阅读(59)  评论(0编辑  收藏  举报