您的位置:首页 > 运维架构

重启命令:reboot与init 6的区别

2017-05-08 09:32 435 查看
"init 6" 基于一系列/etc/inittab文件,并且每个应用都会有一个相应shutdown脚本。
'init 6' 调用一系列shutdown脚本(/etc/rc0.d/K*)来使系统优雅关机;
'reboot'并不执行这些过程,reboot更是一个 kernel级别的命令,不对应用使用shutdown脚本。 .
我们应该在通常情况下使用 init 6.
在出问题的状况下或强制重启 时使用reboot.

对这两个操作使用man命令看到的内容如下:
init 6 Stop the operating system and reboot to the state defined by the initdefault entry in /etc/inittab.

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

来自:http://hi.baidu.com/abovegrd/blog/item/a7a82ddc90d34055cdbf1a66.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  system 优雅 operation