Reboot与init 6的区别
起因在于:重启服务器后有时候服务不会启动,而有时候又可以自动运行,唯一差别在于重启命令用的是reboot还是init 6.
后查了相关资料,竟然大有玄机:
对这两个操作使用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.
转载于:https://blog.51cto.com/ufoman/1392388
Reboot与init 6的区别相关推荐
- Linux开关机命令:shutdown,reboot,halt,init之间的区别
在linux下一些常用的关机/重启命令. 1.shutdown shutdown命令安全地将系统关机. 有些用户会使用直接断掉电源的方式来关闭linux,这是十分危险的.因为linux与win ...
- Linux开关命令(shutdown,reboot,halt,init)
命令简短 shutdown,poweroff,reboot,halt,init都能够进行关机,大致使用方法. /sbin/halt [-n] [-w] [-d] [-f] [-i] [-p] ...
- linux开关机日志文件,Linux开关机命令(shutdown,reboot,halt,init)
命令简介 shutdown,poweroff,reboot,halt,init都可以进行关机,大致用法. /sbin/halt [-n] [-w] [-d] [-f] [-i] [-p] [-h] / ...
- 初始化仓库git init和git init --bare的区别和使用场景
文章目录 初始化仓库git init和git init --bare的区别 git init --bare 使用场景 初始化仓库git init和git init --bare的区别 我们搭建好一个G ...
- Linux下关机命令的区别 (halt,poweroff,reboot,shutdown,init)
https://blog.csdn.net/ylspirit/article/details/7453329 在linux下一些常用的关机/重启命令. 1.shutdown shutdown命令安全地 ...
- linux 5.5 关机,linux杂记(五)正确关机方法(shutdown,reboot,init,halt)
前言:由于在linux底下,每个程序(或者说是服务)都是在背景下运行的,因此,在你看不到的屏幕背后其实可能有相当多人同时在你的主机上面工作,如果 你直接按下电源开关来关机,则可能导致其他人的数据就此中 ...
- Linux/Unix关机、重启(shutdown\reboot\halt\init)等命令
1.shutdown shutdown命令安全地将系统关机. 有些用户会使用直接断掉电源的方式来关闭linux, 这是十分危险的.因为linux与windows不同,其后台运行着许多进程,所以强 ...
- linux etc/init 与etc/init.d的区别
一直迷惑/etc/init 与/etc/init/init.d,最近有点时间学习下,打开目录 /etc/init 目录下的都是配置文件 [root@iZ9488z4qfcZ init]# ls ...
- 关于jvm-java中init与clint区别
init是instance实例构造器,对非静态变量解析初始化,而clinit是class类构造器对静态变量,静态代码块进行初始化 class X { static Log log = LogFa ...
最新文章
- 工作随笔之nginx 应用场景
- 证券一哥炼成记——郭树清
- iconv android 编译,将iconv编译成lua接口
- python-if条件判断与while/for循环
- 一文让你了解RT-Thread
- leetcode 寻找两个有序数组的中位数
- suse系统_据传 SUSE 将进行 IPO,高达 60 亿美元 | 新闻拍一拍
- 会计凭证BAPI_ACC_DOCUMENT_POST
- Kotlin协程的迷惑
- SQLyog下载地址—Mysql的可视化(建议收藏)
- cms php vue 开源_2020最受欢迎的企业网站CMS建站系统排行榜
- caffe 利用python绘制loss曲线以及accuracy曲线
- [Linux] ubuntu 安装 Wireshark
- 使用Pspice进行电路仿真
- python3菜鸟教程
- linux下编译jrtplib和jthread,Linux下编译jrtplib和jthread(转)
- 《麦肯锡方法》读书笔记15
- 一起学爬虫(Python) — 03
- 区块链项目需要服务器吗,区块链需要服务器吗
- matlab形位公差,基于最小区域法的形位公差精确算法.PDF
热门文章
- 什么Linux服务器最适合你?
- VS2013的项目转到VS2010需要修改的
- 从命令行及java程序运行MyBatis Generator 1.3.x生成MyBatis3.x代码
- Prototype1.5.1源代码解读分析-1
- html相邻兄弟选择器,CSS CSS 相邻兄弟选择器 - 闪电教程JSRUN
- python最简单单例模式_Python单例模式的4种实现方法 | 学步园
- AWS — AWS EC2
- Linux Kernel TCP/IP Stack — Overview
- FD.io/VPP — Overview
- 为Keil添加注释的快捷键