11

In Linux, the init 6 command gracefully reboots the system running all the K* shutdown scripts first, before rebooting. The reboot command does a very quick reboot. It doesn’t execute any kill scripts, but just unmounts filesystems and restarts the system. The reboot command is more forceful.

Source: http://www.vreference.com/2009/09/23/reboot-is-not-the-same-as-init-6/

This seems to be true for Unix systems as Solaris, but I have always seen the following 3 commands as synonyms, as they all seem to shut down the services before unmounting the filesystems and restart the server:

shutdown -r now
reboot
init 6

Can somebody tell the differences between these commands?

ujjain
  • 4,123

1 Answers1

14

There is no difference in them. Internally they do exactly the same thing, as mentioned at https://unix.stackexchange.com/questions/64280/what-is-the-difference-between-reboot-init-6-and-shutdown-r-now

 1. reboot uses the shutdown command (with the -r switch). The shutdown command used to 
    kill all the running processes, unmount all the file systems and finally tells the
    kernel to issue the ACPI power command.

2.init 6 tells the init process to shutdown all of the spawned processes/daemons as written in the init files (in the inverse order they started) and lastly invoke the shutdown -r now command to reboot the machine

Stefan Lasiewski
  • 24,361
  • 42
  • 136
  • 188