What is the difference between init 6 and reboot on Red Hat / RHEL / CentOS?
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?
Solution 1:
There is no difference in them. Internally they do exactly the same thing:
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