
Debian
1 前言
一个问题,一篇文章,一出故事。
笔者笔记本安装Debian后发现ssh一段时间后自动断开连接,于是想到需要禁用系统睡眠功能。
2 最佳实践
2.1 方法一
vim /etc/default/grub
参数修改如下,
#GRUB_CMDLINE_LINUX_DEFAULT="quiet" GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi=off apm=off"
更新grub
update-grub
2.2 方法二
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.
======================
https://blog.51cto.com/u_14867519/4004778
没有评论