天天看点

linux服务器重启init 6和reboot区别

init是改变系统的运行级别

init 6 -Stop the operating system and reboot to the state defined by the initdefault entry in /etc/inittab.

:init 6 基于一系列的/etc/inittab开机初始化文件,并且每个程序都有相应的shutdown脚本,因此init 6则会调用一系列的shutdown脚本,是系统优雅关机(正常关闭运行的程序)

reboot - reboot performs a sync(1M) operation on the disks, and then a multi- user reboot is initiated. See init(1M) for details.

:reboot,是一个kernel内核级别的命令,不执行这些过程,不对应使用shutdown脚本

继续阅读