Debian9/Ubuntu16.04禁止休眠

方法一

禁止休眠

$ sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

解除禁止休眠

sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target

方法二

  1. 编辑 /etc/default/grub文件,将 GRUB_CMDLINE_LINUX_DEFAULT="quiet"改为 GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi=off apm=off"
  2. 执行 sudo update-grub命令

参考博客:https://shauway.github.io/2018/03/21/Debian9:Ubuntu16.04禁止休眠/

你可能感兴趣的:(其他,其他)