




已阅读5页,还剩8页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
reboot命令是干什么的?怎么用?正确的说法,应该是重新引导机器的,reboot是unix类操作系统一个基本的命令,相当于 init 6 ,一般unix类操作系统有7种加载模式,分别为 0123456, 0 关闭系统 1 单用户模式 2 多用户模式 3 带网络的多用户模式 4 未使用 5 启用X Window的网络多用户模式 6 重新引导 你可以用 init n (n=0,1,2,3,4,5,6)来使系统进入不同的模式命令简介:该命令用来重启Linux系统。相当于Windows系统中的restart命令。命令语法:/sbin/reboot -n -w -d -f -i或reboot -n -w -d -f -i命令参数:参数长参数描叙-d重新启动时不把数据写入记录文件/var/tmp/wtmp-f强制重新开机,不调用shutdown指令的功能。-h在系统关机或poweroff之前,将所有的硬盘处于待机模式-i关闭网络设置之后再重新启动系统-n保存数据后再重新启动系统-pWhen halting the system, do a poweroff. This is the default when halt is called as poweroff-w仅做测试,并不真的将系统重新开机,只会把重开机的数据写入/var/log目录下的wtmp记录文件-help显示命令在线帮助使用示例:1: 查看reboot命令的帮助信息rootDB-Server # reboot -helpusage: reboot -n -w -d -f -h -i -n: dont sync before halting the system -w: only write a wtmp reboot record and exit. -d: dont write a wtmp record. -f: force halt/reboot, dont call shutdown. -h: put harddisks in standby mode. -i: shut down all network interfaces.rootDB-Server # man rebootrootDB-Server # man rebootHALT(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 -hDESCRIPTION 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, miquelscistron.nlSEE ALSO shutdown(8), init(8), pam_console(8) Nov 6, 2001 HALT(8)(END) 2:强制重新开机,不调用shutdown指令的功能rootDB-Server # reboot -f3:关闭网络设置之后再重新启动系统rootDB-Server # reboot -iBroadcast message from root (pts/1) (Mon Jul 28 11:31:28 2014):The system is going down for reboot NOW!4:保存数据后再重新启动系统rootDB-Server # reboot -nBroadcast message from root (pts/1) (Mon Jul 28 11:33:57 2014)
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 山东省菏泽单县北城三中2026届九上化学期中检测模拟试题含解析
- 2026届陕西省西安市陕西师大附中化学九上期中达标测试试题含解析
- 河北省石家庄康福外国语学校2026届九上化学期中学业质量监测模拟试题含解析
- 2026届四川省遂宁四校联考化学九年级第一学期期末学业水平测试模拟试题含解析
- 山东省德州市八校2026届九年级英语第一学期期末经典试题含解析
- 2026届辽宁省沈阳市和平区化学九上期中统考模拟试题含解析
- 2026届舟山市重点中学九年级化学第一学期期中联考试题含解析
- 2026届安庆九一六校九年级化学第一学期期末达标检测试题含解析
- 一般合同和租赁合同5篇
- 文化创意产业园区土地出让与产业孵化服务合同
- 做有梦想的少年+课件-2025-2026学年统编版道德与法治七年级上册
- 医院2025年院感防控及传染病考核试题及答案
- 老乡贷贷款管理办法
- 2025年职业技能内河船员证理论知识-理论知识参考题库含答案解析(5卷)
- 安装大棚合同(标准版)
- (2025秋新版)人教版八年级历史上册全册教案
- 2025年小麦种子研发与应用技术合作开发协议
- 维稳工作汇报课件
- 企业重污染天气应急预案
- 2025年食安员、食品安全总监、主要负责人考试题及答案
- 初中音乐新教材培训讲座
评论
0/150
提交评论