4

How to shut Down Ubuntu by using Keyboard only. [Like Windows style]
In windows XP if we press Start+u+u this keys for shutdown.
and Start+u+r for restart computer.
Start+u+h for Hibernet
etc.
How can I do it in Ubuntu.
Any keyboard shortcut for it? and without terminal also.
I read:-
How to shut down the system
How to shut down my computer?

1

4 Answers 4

5

Well you could open terminal by pressing CTRL+ALT+T

then simply type :

-for shutdown:

sudo shutdown

or

sudo poweroff

-for restart:

sudo reboot

As far as I am aware, there isn't a system shortcut for shutdown, but you could create one. Read Are there any Keyboard Shortcuts to Shutdown?

1
  • I want keyboard shortcut. Jan 5, 2016 at 13:20
2

I've got a nice one for you:

Shutting down by using a hotkey

  1. Install consolekit:

     sudo apt-get install consolekit
    

or use the Ubuntu Software Center: consolekit Install consolekit

  1. Press Super, then type Keyboard, then click on the Keyboard icon

  2. Click on Hotkeys

  3. Click on Custom hotkeys

  4. Add a new entry by clicking on the + sign:

Name: Shutdown

Command:

    /usr/bin/dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
  1. Now click Apply, then click in the second column to assign a hotkey.

  2. Press any hotkey combination you desire. For instance: Ctrl+Alt+U

  3. Enjoy!


Reboot, hibernate, suspend

If you want to restart instead, replace said command by:

dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart

If you need to hibernate, replace it by:

dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Hibernate

Finally, if you're looking for a suspend shortcut, use this one:

dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend

References

2
  • nice one :) . But what about Restart and Hibernate? Jan 5, 2016 at 13:52
  • @MadhavNikam: updated Jan 5, 2016 at 15:14
0

If you are logged in to a graphical session

Ctrl+Alt+t

sudo poweroff

If you are logged in to a ssh or vty session

sudo poweroff
0

sudo shutdown -P now

or

sudo telinit 0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .