I haven't found a clear answer to the differences between the two options to the command shutdown.

Is halt the same as shutdown -H and poweroff the same as shutdown -P?


2 Answers 2


It's a bit historical.

halt was used before ACPI (which today will turn off the power for you)*. It would halt the system and then print a message to the effect of "it's ok to power off now". Back then there were physical on/off switches, rather than the combo ACPI controlled power button of modern computers.

poweroff, naturally will halt the system and then call ACPI power off.

* These days halt is smart enough to automatically call poweroff if ACPI is enabled. In fact, they are functionally equivalent now.

  • Interesting: on my laptop that runs Gentoo, /sbin/poweroff is a symlink to /sbin/halt.
    – phunehehe
    Commented Jul 8, 2012 at 8:10
  • Thanks, bahamat! I am talking about two options to the command shutdown. Is command halt the same as shutdown -H, and command poweroff the same as shutdown -P? @phunehehe too.
    – Tim
    Commented Jul 8, 2012 at 12:17
  • @phunehehe: Yeah, I was pretty sure they're the same now, but didn't bother to look.
    – bahamat
    Commented Jul 8, 2012 at 17:56
  • @Tim: Yes, those flags are the same as calling the command. Like I said, it's pretty much a historical difference.
    – bahamat
    Commented Jul 8, 2012 at 17:56
  • 1
    Back in the day, halt used to do just that. No orderly shutdown, just stop what the machine was doing right then and there. It was common to issue sync;sync;sync;halt to make sure all buffers had been written out to disk.
    – kurtm
    Commented Oct 27, 2013 at 2:19

They're not the same thing, just very closely related. In practice, unless you want to specify a particular time to shutdown or to force an immediate unclean reboot/halt/poweroff, it really doesn't matter whether you run shutdown -h or halt... or shutdown -r vs reboot. Things weren't so nicely convenient in the past, but this is the way it works now (a lot of the opportunities for ambiguity or user error have been removed/smoothed out).

/sbin/shutdown does a lot of "cleanup" stuff like notifying users, blocking new logins while the system is shutting down. It can also be told to shutdown the system at a certain time or in XX minutes - warning logged-in users every so often of the impending shutdown.

It also changes runlevel to 0 (halt/poweroff) or 6 (reboot) which triggers the system to stop the running services, unmount disks, etc in preparation for the actual halt, poweroff, or reboot.

When all that is done, it then calls /sbin/halt, /sbin/reboot, or /sbin/poweroff (reboot and poweroff are usually symlinks to halt, which interprets them as halt -r and halt -P respectively).

Note, however, that if halt/reboot/poweroff is called when the system is NOT in runlevel 0 or 6 then they will call shutdown to do its job unless the -f or force option is used.

(The details of how run-levels are interpreted may vary from distro to distro, but 0 and 6 are used as described here in Debian and Debian-derivatives like Ubuntu).

See the man pages for shutdown and halt for more info.

Finally, the distinction between halt and poweroff state is that halt does everything up to actually powering the machine off (on some kinds of hardware this means it drops into a ROM bootloader or similar. On most PC hardware it just halts), while poweroff completes that final step and switches off. reboot, of course, gets to the halt state and then reboots the computer.

BTW, the default is typically to either poweroff or reboot, but you can use -H as an argument to shutdown to make it halt instead. This isn't very useful on PC-based linux boxes (but is useful on machines, like sparc boxes, that have a firmware boot monitor. It's possible it may become useful on newer machines with an EFI command line).

  • 1
    This is a highly Linux-centric answer to a non-operating-system-specific question. Not all shutdown commands have the notion of run levels. shutdown mostly does not invoke halt/reboot/poweroff; ironically it is on a few non-Linux systems where this received wisdom still remains true today. And where the symbolic links point is not necessarily halt; not only that, in some toolsets they are not symbolic links at all. See unix.stackexchange.com/a/196471/5132 for more details.
    – JdeBP
    Commented Apr 15, 2015 at 23:01

You must log in to answer this question.

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