Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Why do we need the reboot function in different binaries?

shutdown -r



Or do they differ in something?

share|improve this question
See unix.stackexchange.com/questions/8690/… for the distinction - the commands can behave differently depending on operating system (but generally do the same thing in Linux). – PleaseStand May 14 '11 at 2:32
As noted below and explained in detail at unix.stackexchange.com/a/196014/5132 , the premise of this question is false on systemd Linux operating systems. These are not different binaries on such systems. – JdeBP Apr 14 '15 at 9:47
up vote 15 down vote accepted

We don't necessarily need them both, but we have them both because of the history of Unix, and its multiplicity of versions.

From their respective man pages:

  • The shutdown utility appeared in 4.0BSD.
  • A reboot utility appeared in Version 6 AT&T UNIX.

shutdown is more general-purpose, and more powerful, while reboot is friendlier and easier to remember.

shutdown allows you to specify a temporal argument (to restart in 5 minutes, for instance) and allows you to do many things besides reboot, including:

  • you can just kick off users and not actually shutdown
  • you can put the system to sleep instead of shutting down
  • you can simply shutdown without rebooting (like the halt command)
  • you can include a custom warning message for users on the system

However, if you just want to reboot the system now, it's easier to type reboot than shutdown -r now.

share|improve this answer
Fun fact: Some versions of shutdown use now as default. Do not try to get help for shutdown with shutdown -h ever, especially not on a server somewhere in a datacenter. – Residuum Oct 10 '11 at 14:17

The two commands do something different, however they can end up calling each other, which is why they seem to do the same thing!

reboot will invoke the kernel to actually trigger a hardware reboot. However, it will only do this if the system is ready for shutdown - all daemons and user processes should be stopped, file systems unmounted, etc. So it checks the system runlevel, and if it's not 0 or 6, then it will actually invoke the shutdown command for you.

shutdown causes the system runlevel to be changed. The runlevel change (to 0 for halt or 6 for reboot) runs lots of scripts in /etc/rc0.d or rc6.d that shut down daemons, unmount filesystems, etc. Finally these scripts invoke halt or reboot - this time the system is in the correct runlevel and they instruct the kernel to reboot (or halt).

share|improve this answer

In addition to what iconoclast wrote, there's an important distinction between the two programs: shutdown is in /sbin, while reboot is in /usr/bin.

Why does this matter, you ask? I will tell you.

Things under /usr are those that do not have to be available until the system is booted up far enough that the system is minimally functional. Top-level directories that are traditionally never mounted on separate filesystems — /bin, /etc, /sbin, etc. — are expected to be available while the system is reaching this minimally useful state. There are various implications of this design; for instance, it is bad style to write the "stop" clause of a SysV init script that uses programs in /usr/bin if there is an alternative in /bin or /sbin.

shutdown is the key utility, the one always available. reboot is a convenience utility only.

share|improve this answer
reboot is in /sbin in Debian (with SysVinit) and Ubuntu (with upstart). – Gilles May 13 '11 at 21:16
Okay, so meta-answer: know thy system. :) I use CentOS most often. – Warren Young May 13 '11 at 21:21
Same for Arch (systemd), both in /sbin – warl0ck Mar 3 '13 at 15:04
Indeed, on systemd Linux operating systems neither is the key utility, as with systemd all of these commands are (as the systemd doco has it) "compatibility" commands. Indeed, the premise of the question is false. They are not in different binaries. For details, see unix.stackexchange.com/a/196014/5132 . – JdeBP Apr 14 '15 at 8:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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