The title says it all: What is the difference between executing shutdown -r and reboot?
Asked
Active
Viewed 3.7k times
1 Answers
21
Nothing, both of them do the same task.
From the respective man pages:
reboot, halt, poweroff
These programs allow a system administrator to reboot, halt or poweroff the system.
Requests that the system be rebooted after it has been brought down.
Without the -f option for reboot, it will gracefully terminate all processes, sending signal 15. However, using reboot -f will invoke the reboot(2) system call itself (with REBOOTCOMMAND argument passed) and directly reboots the system.
From a similar question on Unix and linux:
Internally, reboot uses shutdown -r.
rebootcallsshutdownby default, which shuts down the computer nicely. With the right flag, you can forcerebootto usehaltinstead. The shut down is the done the violent way. EDIT: Didn't see the answer was updated to address this. I'll keep the comment for the link – Aserre Apr 01 '14 at 14:46