Linux重启命令init 6和reboot的区别
2013-04-11 10:12
471 查看
init命令用于改变操作系统的运行级别。
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.
“init 6″ 基于一系列/etc/inittab文件,并且每个应用都会有一个相应shutdown脚本。
‘init 6′ 调用一系列shutdown脚本(/etc/rc0.d/K*)来使系统优雅关机;
‘reboot’并不执行这些过程,reboot更是一个kernel级别的命令,不对应用使用shutdown脚本。 .
所以我们应该在通常情况下使用 init 6.
在出问题的状况下或强制重启时使用reboot.
reboot is a more aggresive command to use. init 6 is much graceful
use of `init 6` will give the cleanest and orderly reboot (init informs svc.startd of the runlevel change and will move to the appropriate milestone).
use of `shutdown -y -g0 -i6 **message**` will invoke init as well as give you grace period and messages to user (shutdown invoked the same as init above).
halt,reboot,poweroff will not run any of the shutdown scripts and should be last resort.
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.
“init 6″ 基于一系列/etc/inittab文件,并且每个应用都会有一个相应shutdown脚本。
‘init 6′ 调用一系列shutdown脚本(/etc/rc0.d/K*)来使系统优雅关机;
‘reboot’并不执行这些过程,reboot更是一个kernel级别的命令,不对应用使用shutdown脚本。 .
所以我们应该在通常情况下使用 init 6.
在出问题的状况下或强制重启时使用reboot.
reboot is a more aggresive command to use. init 6 is much graceful
use of `init 6` will give the cleanest and orderly reboot (init informs svc.startd of the runlevel change and will move to the appropriate milestone).
use of `shutdown -y -g0 -i6 **message**` will invoke init as well as give you grace period and messages to user (shutdown invoked the same as init above).
halt,reboot,poweroff will not run any of the shutdown scripts and should be last resort.
相关文章推荐
- Linux下关机命令的区别 (halt,poweroff,reboot,shutdown,init)
- Linux下关机命令的区别 (halt,poweroff,reboot,shutdown,init)
- 【Linux命令详解】6、关闭和重启Linux系统―(shutdown、halt、reboot、poweoff和init)
- 重启命令:reboot与init 6的区别
- Linux 关机重启命令 shutdown reboot init
- Linux重启中init6与reboot的区别
- linux下常用的关机/重启命令shutdown、halt、reboot、init
- linux常用关机命令及其区别-Shutdown halt reboot init
- Linux/Unix关机、重启(shutdown\reboot\halt\init)等命令
- linux下常用的关机/重启命令shutdown、halt、reboot、init
- Linux下关机命令,shutdown -r now reboot及halt命令的区别
- Linux下halt,poweroff,reboot,shutdown命令的区别
- LINUX 命令:init 6 (重启)
- Linux重启命令reboot
- linux服务器重启init 6和reboot区别
- linux 关机命令-shutdown、halt、reboot、及init
- linux 关机重启 shutdown和reboot的区别
- ubuntu误加命令到/etc/init/rc.conf导致reboot很久都没见重启成功
- Linux下halt,poweroff,reboot,shutdown命令的区别
- Linux用init命令关机、重启、切换模式