To turn off my system, I can use one of these three commands:

sudo halt


sudo poweroff


sudo shutdown -h now

What are the differences between these commands, or are they all just aliases of each other?

  • This question is marked as duplicate, but the "answers" just raise more questions - at least for those not intimate with the inner workings of Linux. On Raspbian which is still init based reboot and poweroff are links to halt. shutdown is different (the differences described in the answers). Ubuntu MATE for the Pi2 is systemd based and all 4 are links to /bin/systemctl – Milliways May 26 '15 at 0:36

halt terminates all processes and shuts down the cpu.

poweroff is exactly like halt, but it also turns off the unit itself (lights and everything on a PC). It sends an ACPI command to the board, then to the PSU, to cut the power.

shutdown is like poweroff, but it also runs the shutdown scripts.




| improve this answer | |

On my Fedora system, though they do different things, all these commands are handled by systemctl.

$ for cmd in halt poweroff shutdown; do file `which $cmd`; done
/usr/sbin/halt: symbolic link to `../bin/systemctl'
/usr/sbin/poweroff: symbolic link to `../bin/systemctl'
/usr/sbin/shutdown: symbolic link to `../bin/systemctl'

Their differences can be read on their man pages and also on systemctl man page.

You can also read a terrific answer detailing systemd & halt/poweroff/shutdown.

| improve this answer | |
  • 9
    ... but that does not mean they do the same thing! – Ned64 May 25 '15 at 9:20
  • @Ned64 You are correct. systemctl does a lot of very different things. – rickhg12hs May 25 '15 at 9:49
  • 1
    @rickhg12hs: busybox and dropbear also use that concept, but the name of the symbolic link determines the behavior. – 0xC0000022L May 25 '15 at 11:05
  • 2
    @0xC0000022L That's what the man pages detail and is described very well in the linked answer. – rickhg12hs May 25 '15 at 11:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.