Ubuntu – How to shutdown when power button pressed

In Ubuntu 16.04, when you press the power button on your computer you’re prompted with a list of options – this is the “interactive” shutdown.

The steps below show how to change this so that the power button automatically runs a shutdown – without having to use the interactive shutdown prompt.

  1. Press Ctrl + Alt + T on your keyboard to open the terminal
  2. Run the following command
  3. gsettings set org.gnome.settings-daemon.plugins.power button-power 'shutdown'
  4. Close the terminal
  5. The power button will now automatically run the shutdown command.

Was this article helpful?

Related Articles