debian关闭休眠
debian关闭休眠
在Debian系统中如果想要关闭休眠功能,有以下几种方法:
- 使用命令行禁用休眠:
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target -
在图形界面中禁用休眠: 打开「
设置」-「电源」,将「睡眠」选项设置为「永不」。 - 编辑配置文件禁用休眠: 打开文件
/etc/systemd/logind.conf,将以下内容添加到文件中:HandleSuspendKey=ignore HandleHibernateKey=ignore HandleLidSwitch=ignore保存并重启系统。