命令简介:

该命令用来重启Linux系统。相当于Windows系统中的restart命令。

命令语法:

/sbin/reboot [-n] [-w] [-d] [-f] [-i]

reboot [-n] [-w] [-d] [-f] [-i]

命令参数:

使用示例:

1: 查看reboot命令的帮助信息[root@DB-Server ~]# reboot --help

usage: reboot [-n] [-w] [-d] [-f] [-h] [-i]

-n: don't sync before halting the system

-w: only write a wtmp reboot record and exit.

-d: don't write a wtmp record.

-f: force halt/reboot, don't call shutdown.

-h: put harddisks in standby mode.

-i: shut down all network interfaces.

[root@DB-Server ~]# man reboot[root@DB-Server ~]# man reboot

HALT(8) Linux System Administrator鈥檚 Manual HALT(8)

NAME

halt, reboot, poweroff - stop the system.

SYNOPSIS

/sbin/halt [-n] [-w] [-d] [-f] [-i] [-p] [-h]

/sbin/reboot [-n] [-w] [-d] [-f] [-i]

/sbin/poweroff [-n] [-w] [-d] [-f] [-i] [-h]

DESCRIPTION

Halt notes that the system is being brought down in the file /var/log/wtmp, and then either tells the kernel to halt, reboot or poweroff the system.

If halt or reboot is called when the system is not in runlevel 0 or 6, in other words when it鈥檚 running normally, shutdown will be invoked instead (with

the -h or -r flag). For more info see the shutdown(8) manpage.

The rest of this manpage describes the behaviour in runlevels 0 and 6, that is when the systems shutdown scripts are being run.

OPTIONS

-n Don鈥檛 sync before reboot or halt. Note that the kernel and storage drivers may still sync.

-w Don鈥檛 actually reboot or halt but only write the wtmp record (in the /var/log/wtmp file).

-d Don鈥檛 write the wtmp record. The -n flag implies -d.

-f Force halt or reboot, don鈥檛 call shutdown(8).

-i Shut down all network interfaces just before halt or reboot.

-h Put all harddrives on the system in standby mode just before halt or poweroff.

-p When halting the system, do a poweroff. This is the default when halt is called as poweroff.

DIAGNOSTICS

If you鈥檙e not the superuser, you will get the message 鈥榤ust be superuser鈥? Users logged in locally on the console can call halt, reboot, and poweroff

without supplying the root password, due to pam_console (8).

NOTES

Under older sysvinit releases , reboot and halt should never be called directly. From release 2.74 on halt and reboot invoke shutdown(8) if the system is

not in runlevel 0 or 6. This means that if halt or reboot cannot find out the current runlevel (for example, when /var/run/utmp hasn鈥檛 been initialized

correctly) shutdown will be called, which might not be what you want. Use the -f flag if you want to do a hard halt or reboot.

The -h flag puts all harddisks in standby mode just before halt or poweroff. Right now this is only implemented for IDE drives. A side effect of putting

the drive in standby mode is that the write cache on the disk is flushed. This is important for IDE drives, since the kernel doesn鈥檛 flush the write-cache

itself before poweroff.

The halt program uses /proc/ide/hd* to find all IDE disk devices, which means that /proc needs to be mounted when halt or poweroff is called or the -h

switch will do nothing.

AUTHOR

Miquel van Smoorenburg, miquels@cistron.nl

SEE ALSO

shutdown(8), init(8), pam_console(8)

Nov 6, 2001 HALT(8)

(END)

2:强制重新开机,不调用shutdown指令的功能

[root@DB-Server ~]# reboot -f

3:关闭网络设置之后再重新启动系统[root@DB-Server ~]# reboot -i

Broadcast message from root (pts/1) (Mon Jul 28 11:31:28 2014):

The system is going down for reboot NOW!

4:保存数据后再重新启动系统[root@DB-Server ~]# reboot -n

Broadcast message from root (pts/1) (Mon Jul 28 11:33:57 2014):

The system is going down for reboot NOW!

5:重新启动时不把数据写入记录文件/var/tmp/wtmp[root@DB-Server ~]# reboot -d

Broadcast message from root (pts/2) (Mon Jul 28 11:23:26 2014):

The system is going down for reboot NOW!

本文原创发布php中文网,转载请注明出处,感谢您的尊重!

php 调用reboot,Linux命令:reboot命令相关推荐

  1. Linux开关机命令:shutdown,reboot,halt,init之间的区别

    在linux下一些常用的关机/重启命令. 1.shutdown shutdown命令安全地将系统关机.     有些用户会使用直接断掉电源的方式来关闭linux,这是十分危险的.因为linux与win ...

  2. Linux下关机命令的区别 (halt,poweroff,reboot,shutdown,init)

    https://blog.csdn.net/ylspirit/article/details/7453329 在linux下一些常用的关机/重启命令. 1.shutdown shutdown命令安全地 ...

  3. linux常用关机命令及其区别-Shutdown halt reboot init

    1.shutdown  shutdown命令安全地将系统关机.  shutdown 参数说明:  [-t] 在改变到其它runlevel之前﹐告诉init多久以后关机.  [-r] 重启计算器.  [ ...

  4. linux开关机日志文件,Linux开关机命令(shutdown,reboot,halt,init)

    命令简介 shutdown,poweroff,reboot,halt,init都可以进行关机,大致用法. /sbin/halt [-n] [-w] [-d] [-f] [-i] [-p] [-h] / ...

  5. linux下reboot和shutdown关机命令详解

    我们在操作Linux v/服务器的时候肯定会有需要重启系统,或者关闭系统等操作.有些用户是直接到VPS主机商家面板上操作的,这样一来比较麻烦,二来有些面板还不易于使用容易导致面板卡死.所以最好的方法就 ...

  6. Linux重启命令reboot

    reboot 1.作用 reboot命令的作用是重新启动计算机,它的使用权限是系统管理者. 2.格式 reboot [-n] [-w] [-d] [-f] [-i] 3.主要参数 -n: 在重开机前不 ...

  7. Python下调用Linux的Shell命令

    转载:http://blog.csdn.net/my2010sam/article/details/18315785 有时候难免需要直接调用Shell命令来完成一些比较简单的操作,比如mount一个文 ...

  8. python shell运行当前程序、可以按下_Python下调用Linux的Shell命令的方法

    有时候难免需要直接调用Shell命令来完成一些比较简单的操作,比如mount一个文件系统之类的.那么我们使用Python如何调用Linux的Shell命令?下面来介绍几种常用的方法: 1. os 模块 ...

  9. python 如何调用linux系统中命令

    首先加载os模块 >>> import os 然后就可以愉快的调用linux系统的命令使用了 >>> os.system('ls') anaconda-ks.cfg ...

  10. linux内部调用摄像头的第三方程序(命令):cheese

    linux内部调用摄像头的第三方程序(命令):cheese  ($ sudo apt-get install cheese) 关于cheese的使用可能会出现异常: Clutter-WARNING * ...

最新文章

  1. 第六周项目一-分数类的雏形(1)
  2. python绘制灰度图片直方图-用python简单处理图片(5):图像直方图
  3. getopt( )和 getopt_long( )
  4. oracle的imp和exp
  5. go中如何使用easyjson_如何在 Go 中编写无 Bug 的 Goroutines?
  6. Installshield获取安装包版本的系统变量是IFX_PRODUCT_VERSION
  7. ORA-01810: 格式代码出现两次
  8. 实例36:python
  9. 电商千万级交易的金手指:分布式事务管理
  10. java加载properties文件的几种方式,java高级面试笔试题
  11. Linux as AirPrint server
  12. 数据库事务的四大特性
  13. 【Python】过滤表情字符
  14. VsCode镜像下载(国内镜像源,高速秒下)
  15. 求函数在x0处的增量_设函数y=2x^2,已知其在点x0处自变量增量时,对应函数增量的线性主部为-0.6,则x0=()A.0B.1C.-0....
  16. 命令式和声明式,哪个才是你的菜
  17. Docker中定制镜像的两种方法
  18. Pandas 数据预处理
  19. 诺禾-C语言实现尾递归求7的阶乘
  20. MySQL 使用自增ID主键和UUID 作为主键的优劣比较详细过程(500W单表)

热门文章

  1. 我所热爱的多触摸系统 bill buxton
  2. 使用MySQL进行地理坐标计算
  3. 知识图谱论文读后感001
  4. 【linux内核分析与应用-陈莉君】内核同步措施
  5. 电脑远程桌面连接怎么操作?
  6. Flask Marshmallow基本使用
  7. python卡方检验计算pvalue值_Python数据科学:卡方检验
  8. 如何正确使用 Mac 电脑的“恢复模式”?
  9. firefly 3399 开发板笔记
  10. 一篇关于批处理文件的经典文章