wiki:linux:disable_system_sleep
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
wiki:linux:disable_system_sleep [2025/01/07 12:36] – removed - external edit (Unknown date) 127.0.0.1 | wiki:linux:disable_system_sleep [2025/01/07 12:37] (current) – ↷ Page moved from wiki:linux:install_davinci_resolve:wiki:linux:disable_system_sleep to wiki:linux:disable_system_sleep Greg | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Disable System Sleep on Linux (SystemD) ====== | ||
+ | Sometimes (a lot of times...) you have systems that you don't want to go to sleep. While you could login to each system and disable it through your desktop environment or push out a change through DConf (ugh **shudders**), | ||
+ | |||
+ | Run the commands below (as root, or prefix with sudo): | ||
+ | |||
+ | < | ||
+ | systemctl mask sleep.target | ||
+ | systemctl mask suspend.target | ||
+ | systemctl mask hibernate.target | ||
+ | systemctl mask hybrid-sleep.target | ||
+ | </ | ||
+ | |||
+ | Nice and easy. You can run that script via SSH or Ansible-ize it or however you prefer to push those changes out to systems at scale. | ||
+ | |||
+ | SystemD has its warts, but this isn't one of them. |