Shutdown Ubuntu With A Keyboard Shortcut

Author

Amit Chaudhary

Published

June 16, 2015

In Windows, we can use Alt+F4 keyboard shortcut to shutdown. But Linux doesn’t have such feature out of the box. After switching to Ubuntu, I struggled trying to make a keyboard shortcut for shutting down the computer.

So I started reading about the packages related to shutdown and discovered a method that works flawlessly. We utilize a package called shutdown that’s present by default in the /sbin directory.

sudo chmod u+s /sbin/shutdown

Keyboard Shortcuts

Custom Shortcut Menu

Key Binding Menu

Tip

You can make a shortcut for restart as well, follow the same tutorial except in step 3, use code shutdown -r now .

You have a fully functioning keyboard shortcut to shutdown Linux just like Windows. Press Ctrl+Alt+K and your system is off. Please let me know if it worked for you in the comments.