Ubuntu – Shutdown command for GNOME


I use the icon in the upper right corner of GNOME Shell to shut down my system.

Which command is used to shutdown the system?

  • halt
  • shutdown -h now
  • Something completely different?

enter image description here

Best Answer

The command used to shutdown is:

dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.PowerOff" boolean:true

For understanding

man systemd-logind

systemd-logind is a system service that manages user logins. It is
       responsible for:

       ·   Keeping track of users and sessions, their processes and their idle

       ·   Providing PolicyKit-based access for users to operations such as
           system shutdown or sleep

       ·   Implementing a shutdown/sleep inhibition logic for applications

       ·   Handling of power/sleep hardware keys

       ·   Multi-seat management

       ·   Session switch management

       ·   Device access management for users

       ·   Automatic spawning of text logins (gettys) on virtual console
           activation and user runtime directory management

Now read to the systemd/logind wiki http://www.freedesktop.org/wiki/Software/systemd/logind/