Closed jianyunchao closed 1 year ago
查看状态,一开始是开启 systemctl status sleep.target ● sleep.target - Sleep Loaded: loaded (/lib/systemd/system/sleep.target; static; vendor preset: enabled) Active: inactive (dead) Docs: man:systemd.special(7)
禁用 sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target Created symlink /etc/systemd/system/sleep.target → /dev/null. Created symlink /etc/systemd/system/suspend.target → /dev/null. Created symlink /etc/systemd/system/hibernate.target → /dev/null. Created symlink /etc/systemd/system/hybrid-sleep.target → /dev/null.
状态为关闭 systemctl status sleep.target ● sleep.target Loaded: masked (Reason: Unit sleep.target is masked.) Active: inactive (dead) (ms21_py38) root@ascend910:~#
转载,侵删: https://www.codetd.com/fr/article/15663080 https://zhuanlan.zhihu.com/p/415661679