reboot和init 6的区别
2016-07-22 21:38
435 查看
偶然一次机会:利用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
"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.
对此进行了搜索,结果如下:
对两个命令用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
"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.
相关文章推荐
- spring对配置属性的读取方式configure way
- UICollectionViewCell 3种创建方法
- Eclipse生成项目javadoc说明文档
- 解决Jetbrains旗下产品的插件下载失败问题(IntelliJ IDEA、RubyMine、WebStorm、PhpStorm、PyCharm、AppCode、Android Studio等)
- Doing Homework again<hdoj1789>
- 【科普·给学弟看的算法】队列的基础知识和基本运用(1):基本队列与优先队列
- noip 2012 提高组 day2 部分题解
- 【二】 Deep Learning训练过程
- linux文件目录权限管理
- 逆波兰计算器
- 查看linux内核版本信息
- 九度1032
- 格点和最大公约数
- Android原生SQLite操作以及greenDao框架操作SQLite
- RecycleView添加HeaderView宽度不能撑满,第一次加载HeaderView的子控件获取不到焦点
- HDU 1312 DFS
- 前段性能优化
- 关于提高网站性能的几点建议(二)
- ajax基本知识
- Caused by: java.sql.BatchUpdateException: ORA-01438: 值大于为此列指定的允许精度如何解决