Skip to content

Instantly share code, notes, and snippets.

@andyiac
Forked from bzerangue/disable-suspend.md
Created August 9, 2018 02:41
Show Gist options
  • Save andyiac/01f087ce9ab44bdacb5bb4574ad1156e to your computer and use it in GitHub Desktop.
Save andyiac/01f087ce9ab44bdacb5bb4574ad1156e 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