How To Wiki

Howto shutdown a Linux computer via command-line

1,795pages on
this wiki
Add New Page
Add New Page Talk0

This is various ways to shutdown your Linux computer. These methods will likely run on an Unix like Operating system


This command is standard to any Unix like OS, including Linux. This command requires root access or sudo. See How to allow non-super users to shutdown computer in Linux

Its usage is:

Usage:    shutdown [-akrhPHfFnc] [-t sec] time [warning message]
                  -a:      use /etc/shutdown.allow
                  -k:      don't really shutdown, only warn.
                  -r:      reboot after shutdown.
                  -h:      halt after shutdown.
                  -P:      halt action is to turn off power.
                  -H:      halt action is to just halt.
                  -f:      do a 'fast' reboot (skip fsck).
                  -F:      Force fsck on reboot.
                  -n:      do not go through "init" but go down real fast.
                  -c:      cancel a running shutdown.
                  -t secs: delay between warning and kill signal.
                  ** the "time" argument is mandatory! (try "now") **

If you just want it to turn off your computer right away, execute:

  • /sbin/shutdown -hP now

DBUS & ConsoleKitEdit

The following requires DBUS and ConsoleKit to be installed and running, which is true on most systems.

  • dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
  • The following is an old method that uses HAL and will not work on most systems because HAL has been deprecated.
    • dbus-send --print-reply --system --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Shutdown


please add


  • xfce4-session-logout --halt
    this may not work if you don't have XFCE installed properly, I needed to configure XFCE with UDEV, DBUS, and ConsoleKit, and have them all running.


  • gdm-control --shutdown


please add


Please add


Also on Fandom

Random Wiki