Prevent Ubuntu Server from Sleep: Difference between revisions
From WikiMLT
m Spas премести страницата „Sleep“ като „Prevent Ubuntu Server from Sleep“ без пренасочване |
mNo edit summary |
||
Line 1: | Line 1: | ||
Disable suspend: | |||
<syntaxhighlight lang="bash"> | |||
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target | sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target | ||
</syntaxhighlight> | |||
Bring it back: | |||
<syntaxhighlight lang="bash"> | |||
sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target | sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target | ||
</syntaxhighlight> | </syntaxhighlight> | ||
References: | |||
* [https://unix.stackexchange.com/q/25133/201297 Unix & Linux : Ubuntu Server Continuously „goes to sleep“] | * [https://unix.stackexchange.com/q/25133/201297 Unix & Linux : Ubuntu Server Continuously „goes to sleep“] | ||
* [https://askubuntu.com/q/513710/566421 Ask Ubuntu: How to prevent Ubuntu Server sleep/hibernation] | * [https://askubuntu.com/q/513710/566421 Ask Ubuntu: How to prevent Ubuntu Server sleep/hibernation] | ||
Revision as of 14:23, 5 August 2022
Disable suspend:
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
Bring it back:
sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target
References: