In this regard, what is the use of init 6?
The init 6 command stops the operating system and reboots to the state that is defined by the initdefault entry in the /etc/inittab file.
Similarly, what is the last script to run when the command init 6 is executed? init 6 will run all of the shutdown scripts in /etc/init/rc. * as it reduces system's runlevel. On newer versions of Ubuntu the reboot command without --force or -f will run the shutdown command which does would basically do the same thing as init 6.
Beside this, what is the difference between shutdown now and init 0?
Basically init 0 change the current run level to run level 0. shutdown -h can run by any user but init 0 can only run by superuser. Essentially the end result is the same but shutdown allows useful options which on a multiuser system creates less enemies :-) 2 members found this post helpful.
What is the difference between reboot and shutdown Linux?
There is no difference in them. Internally they do exactly the same thing: 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.
