阻止ubunto 自动休眠(挂起)的方法How To: Disable Sleep on Ubuntu Serverhttp://www.315ok.org/blogfolder/zuzhiubunto-zidongxiumian-guaqi-defangfahttp://www.315ok.org/logo.png
阻止ubunto 自动休眠(挂起)的方法
How To: Disable Sleep on Ubuntu Server
Confirm Sleep Status with systemd
IMPORTANT: I didn’t run this command on server, so this is example from another system: I’m running it on my XPS laptop with Ubuntu, just to show you expected output.
As you can see, my laptop rests well and often:
Disable Sleep in Ubuntu with systemd
This is what I did on my server:
This is obviously a very simple way of disabling power management, but I like it because it’s standard and logical enough – there’s no need to edit config files or create cronjobs manually controlling sleep functionality.
The service is dead, no power management is happening and most importantly, my server has been up for 12 hours now.
(re) Enabling Sleep in Ubuntu with systemctl
When the time comes and I would like to re-enable power management and sleep/hibernation, this will be the command I’ll run: