Skip to content

Instantly share code, notes, and snippets.

@eAmin
Forked from bzerangue/disable-suspend.md
Created December 15, 2018 09:54
Show Gist options
  • Save eAmin/773c7fb5b086604a7aaece0928c6d699 to your computer and use it in GitHub Desktop.
Save eAmin/773c7fb5b086604a7aaece0928c6d699 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