0. 问题
在笔记本上安装Ubuntu 20.04之后发现合上屏幕会导致系统休眠, 这显然不符合它作为一个服务器应该做的事情
1. (root权限) 编辑”/etc/systemd/logind.conf”, 编辑行:
HandleLidSwitch=ignore
LidSwitchIgnoreInhibited=yes
2. 重启 systemd-login 服务:
sudo systemctl restart systemd-logind
在笔记本上安装Ubuntu 20.04之后发现合上屏幕会导致系统休眠, 这显然不符合它作为一个服务器应该做的事情
HandleLidSwitch=ignore
LidSwitchIgnoreInhibited=yes
sudo systemctl restart systemd-logind