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)

 

相关文章:

  • 2021-10-10
  • 2022-01-30
  • 2021-05-18
  • 2022-02-20
  • 2022-02-03
  • 2022-12-23
  • 2022-12-23
  • 2021-12-17
猜你喜欢
  • 2022-12-23
  • 2021-08-22
  • 2021-11-20
  • 2022-12-23
相关资源
相似解决方案