Skip to content

Instantly share code, notes, and snippets.

@danilobatistaqueiroz
Forked from bzerangue/disable-suspend.md
Created January 28, 2020 19:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danilobatistaqueiroz/602f57f2262530d55e20e164837d4882 to your computer and use it in GitHub Desktop.
Save danilobatistaqueiroz/602f57f2262530d55e20e164837d4882 to your computer and use it in GitHub Desktop.
Disable Sleep/Suspend and WiFi in Ubuntu 16.04 LTS

On Ubuntu 16.04 LTS, I successfully used the following to disable suspend:

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

And this to re-enable it:

sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target

The command-line equivalent in ubuntu 16.04 to disable WiFi

nmcli radio wifi off

To re-enable, use

nmcli radio wifi on

To help

nmcli radio help nmcli radio wifi help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment