[linux] reboot和shutdown-r的区别
google看看:
先搜英文的资料
http://askubuntu.com/questions/441969/what-is-the-difference-between-reboot-and-shutdown-r
(ubuntu论坛)
结论是:reboot uses shutdown -r
http://unix.stackexchange.com/questions/64280/what-is-the-difference-between-reboot-init-6-and-shutdown-r-now
(好像讨论的是linux问题)
结论是:reboot uses the shutdown command (with the -r switch).
再搜索中文的资料
http://bbs.chinaunix.net/forum.php?mod=viewthread&tid=1383005&highlight=reboot%2Bshutdown%2B-r
(freebsd论坛)
结论是:reboot命令重启动系统时是删除所有的进程,而不是平稳地终止它们
先看下freebsd 9.3
root@93a:~ # man reboot
REBOOT() FreeBSD System Manager's Manual REBOOT(8)
DESCRIPTION
The halt and reboot utilities flush the file system cache to disk, send
all running processes a SIGTERM (and subsequently a SIGKILL) and, respec-
tively, halt or restart the system. The action is logged, including
entering a shutdown record into the user accounting database. root@93b:~ # man shutdown
SHUTDOWN() FreeBSD System Manager's Manual SHUTDOWN(8)
DESCRIPTION
The shutdown utility provides an automated shutdown procedure for super-
users to nicely notify users when the system is shutting down, saving
them from system administrators, hackers, and gurus, who would otherwise
not bother with such niceties. -r The system is rebooted at the specified time.
本人英文较烂,按自己的翻译能力得知:
reboot过程会把系统的缓存写到硬盘,先发送SIGTERM再发送SIGKILL;
shutdown过程友好地通知线上用户,然后完好地保存。
结论即是:reboot与shutdown -r过程一致
下面是自己实际操作的结果


很明显reboot没有出现deamon平稳地终止过程,这是闹哪样啊。
顺便看下centos 6.7
[root@vhost102 ~]# man reboot
DESCRIPTION
These programs allow a system administrator to reboot, halt or poweroff the system. When called with --force or when in runlevel or , this tool invokes the reboot() system call itself and directly reboots the system. Otherwise this simply invokes the shutdown()
tool with the appropriate arguments. Before invoking reboot(), a shutdown time record is first written to /var/log/wtmp [root@vhost102 ~]# man shutdown
DESCRIPTION
shutdown arranges for the system to be brought down in a safe way. All logged-in users are notified that the system is going down and, within the last five minutes of TIME, new logins
are prevented.
OPTIONS
-r Requests that the system be rebooted after it has been brought down.
reboot --force 调用reboot重启系统,否则调用适当的shutdown参数
shutdown会安全地关机
结论即是:reboot与shutdown -r过程一致
reboot的过程

shutdown -r now的过程

总结一个吧
freebsd 9.3 reoot与shutdwon -r now不一致,reoot没有平稳地终止服务强制重启。
centos 6.7 reoot与shutdwon -r now一致,两者都是平稳地终止服务后重启。
[linux] reboot和shutdown-r的区别的更多相关文章
- reboot与shutdown -r now 区别与联系(又收集了init和halt的小知识)
在linux命令中reboot是重新启动,shutdown -r now是立即停止然后重新启动,都说他们两个是一样的,其实是有一定的区别的. shutdown命令可以安全地关闭或重启Linux系统,它 ...
- linux reboot ,shutdown,halt区别
reboot ,shutdown,halt区别 重启 reboot 和 shutdown -r now 效果是一样的都是重启 区别在于reboot 是重启时,删除所有的进程,为不是平稳的终止他 ...
- Linux Reboot And Poweroff Command
1.Environment:RedHat Linux Enterprise 6+Vmware Workstation 12 Pro 2.Linux shutdown and restart comma ...
- linux下reboot和shutdown关机命令详解
我 们在操作Linux v/服务器的时候肯定会有需要重启系统,或者关闭系统等操作.有些用户是直接到VPS主机商家面板上操作的,这样一来比较麻烦,二来有些面板还不易于使用 容易导致面板卡死.所以最好的方 ...
- Linux开关命令(shutdown,reboot,halt,init)
命令简短 shutdown,poweroff,reboot,halt,init都能够进行关机,大致使用方法. /sbin/halt [-n] [-w] [-d] [-f] [-i] [-p] ...
- Linux reboot与init 6区别
Reboot与init 6的区别 - flyingcloud_2008的专栏 - CSDN博客https://blog.csdn.net/flyingcloud_2008/article/detail ...
- 64个命令,每天一个linux命令目录, shutdown,tee,rcp,
每天一个linux命令目录 开始详细系统的学习linux常用命令,坚持每天一个命令,所以这个系列为每天一个linux命令.学习的主要参考资料为: 1.<鸟哥的linux私房菜> 2.htt ...
- linux 关机命令shutdown
linux系统,正确的关机很重要,因为linux是多任.多用户系统,在后台可能同时有很多人在主机上面工作.不正确的挂机可能会导致数据中断. 1.关机前的操作(可以不进行) 可以使用who命令查看系统有 ...
- centos关机与重启命令 shutdown -r now 立刻重启
centos关机与重启命令详解与实战 Linux centos重启命令: .reboot .shutdown -r now 立刻重启(root用户使用) .shutdown -r 过10分钟自动重启( ...
随机推荐
- Extjs6 怎么重写框架的类
创建一个覆写(override)类的推荐方法如下: Ext.define('MyApp.overrides.panel.Panel', { override: 'Ext.panel.Panel', c ...
- MySQL->复制表[20180509]
MySQL复制表 通常复制表所采用CREATE TABLE .... SELECT 方式将资料复制,但无法将旧表中的索引,约束(除非空以外的)也复制. 完整复制MySQL数据表所需步骤: ...
- Spark SQL join的三种实现方式
引言 join是SQL中的常用操作,良好的表结构能够将数据分散到不同的表中,使其符合某种规范(mysql三大范式),可以最大程度的减少数据冗余,更新容错等,而建立表和表之间关系的最佳方式就是join操 ...
- nRF52832 BLE_DFU空中升级OTA(一)安装软件(SDK14.2.0)
准备工作,需要安装好几个软件,详细的过程请参考下面的文章(http://www.cnblogs.com/iini/p/9314246.html)这里说的非常详细,而且也有工具在云盘,对于初学者非常友好 ...
- python 时间time模块介绍和应用
1.其中format_string 类型的时间和struct_time之间可以转换,timestamp时间戳可以和struct_time之间进行转化,但是时间戳和格式化时间是不能直接转换的. time ...
- python教程(七)·字典
本文介绍本系列教程最后一个数据结构--字典 在现实生活中,查英语字典的时候,我们通常根据单词来查找意思.而python中的字典也是类似的,根据特定的 "键"(单词)来查找 &quo ...
- Java学习笔记三十:Java小项目之租车系统
Java小项目之租车系统 一:项目背景介绍: 根据所学知识,编写一个控制台版的“呱呱租车系统” 功能: 1.展示所有可租车辆: 2.选择车型.租车量: 3.展示租车清单,包含:总金额.总载货量以及其车 ...
- Python 爬虫 多进程清洗代理
利用多线程检测代理网站提供的免费代理是否可用 import requests from lxml import etree import time import multiprocessing def ...
- DOM操作和jQuery实现选项移动操作
DOM: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF- ...
- 20155229付钰涵-虚拟机安装及LINUX命令学习
安装Ubuntu遇到的问题 问题一: 新建虚拟电脑的版本只有32-bit,与老师所给教程中的64-bit不符.为此我上百度搜寻了答案. 第一种方法: 控制面板--程序与功能--启动或关闭windows ...