2

In UNIX the following commands are present:

halt --poweroff     //does poweroff
halt --reboot       //does reboot
poweroff --reboot   //does reboot
reboot --poweroff   //does poweroff

However the following three simple commands do the same job

halt
poweroff
reboot

So what is the necessity of such commands

1 Answers1

2

The answer to our question is more or less: History!

Those are typically symlinks to the same binary. On systems using systemd often to systemctl, on an older system I just checked reboot and poweroff are symlinks to halt.

There are systems out there where halt and poweroff doesn't do the same thing, in that halt stops the OS, leaving the machine running with whatever environment the hardware offers, while poweroff does what it says and makes the machine stop consuming power. (It should be obvious that reboot is a third operation).

  • There is more on the history, where I comment on the embarrassing position that we are in nowadays, at https://unix.stackexchange.com/a/196471/5132 . – JdeBP Mar 17 '18 at 10:50