init 6与Red Hat / RHEL / CentOS上的重新启动之间有什么区别?

在Linux中,在重新启动之前,init 6命令首先正常地重新启动运行所有K *closures脚本的系统。 reboot命令可以快速重启。 它不会执行任何kill脚本,只是卸载文件系统并重新启动系统。 重新启动命令更有力。

资料来源: http : //www.vreference.com/2009/09/23/reboot-is-not-the-same-as-init-6/

对于Unix系统来说,这似乎是正确的,但是我一直将以下3个命令视为同义词,因为它们在卸载文件系统并重新启动服务器之前似乎都closures了服务:

shutdown -r now reboot init 6 

有人可以告诉这些命令之间的区别吗?

他们没有区别。 在内部,他们完全一样:

  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