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)

 

上一篇:pwn基本用法


下一篇:Linux Shell脚本生成用户并授权