• Welcome to iHelpForum - the place to get help from knowledgeable techs in all areas of Tech, Home and Auto help. Consider checking out our Guides or Registering an account to post on our forums today.

Keyboard shortcut to shut down linux pc.

Cameldung

I Like It Here
iHF Veteran
Advisor
WCG Team Member
As per the title, looking to shut down a linux (17.2) mint pc cruncher without a monitor, have tried making a custom shortcut, but no joy. Is there a keyboard shutdown shortcut that works nicely with linux?
 

apemax

Linux user
Moderator
iHF Regular
Hello. :)

I've had a look and where as there is no shortcut by default it is possible and fairly easy to make a keyboard shortcut to power off your PC. First you need to change the permissions on the shutdown command so it can be executed without having to put your password it. Type (Copy/Paste) the following command into a terminal.

sudo chmod u+s /sbin/shutdown

Then go to Menu > Preferences > Keyboard > Keyboard Shortcuts tab, Then go down to custom shortcuts and click the add custom shortcuts button. Name it what ever you like (Shutdown or something similar, doesn't matter really.) and copy/paste this command into the command box:

shutdown -P now

Then assign a keyboard key or combination of keys for it. When you press that key/combination of key your PC should turn off. Some of this information found on this page:

http://community.linuxmint.com/tutorial/view/1113
 

Cameldung

I Like It Here
iHF Veteran
Advisor
WCG Team Member
Hello. :)

I've had a look and where as there is no shortcut by default it is possible and fairly easy to make a keyboard shortcut to power off your PC. First you need to change the permissions on the shutdown command so it can be executed without having to put your password it. Type (Copy/Paste) the following command into a terminal.

sudo chmod u+s /sbin/shutdown

Then go to Menu > Preferences > Keyboard > Keyboard Shortcuts tab, Then go down to custom shortcuts and click the add custom shortcuts button. Name it what ever you like (Shutdown or something similar, doesn't matter really.) and copy/paste this command into the command box:

shutdown -P now

Then assign a keyboard key or combination of keys for it. When you press that key/combination of key your PC should turn off. Some of this information found on this page:

http://community.linuxmint.com/tutorial/view/1113
Thank you for that, already done a bit of searching, and surprised there wasn't one like I used with windows. I did try making a shortcut, obviously now by using the wrong command. Great information, thanks again.

PS: works great.
 
Last edited:

apemax

Linux user
Moderator
iHF Regular
Thank you for that, already done a bit of searching, and surprised there wasn't one like I used with windows. I did try making a shortcut, obviously now by using the wrong command. Great information, thanks again.

PS: works great.
No problem, Glad to know it's working alright. :)
 
Top