Recently I’ve been running a couple of tests on my old laptop to see whether it could replace my current home server. I installed ubuntu server and closed the lid, preparing to SSH into the laptop, to realize that I couldn’t because the laptop went to sleep. You would think that when you install the server flavour they would disable sleep on lid close…
Fortunately an ask ubuntu post detailed the steps to disable such behavior:
$ sudo sed "s/^#*HandleLidSwitch=.*$/HandleLidSwitch=ignore/g" -i /etc/systemd/logind.conf
$ sudo systemctl restart systemd-logind.service
Self-taught full-stack web dev based in Tokyo.
Occasionally wrecks servers through