详解 Linux中的关机和重启命令

吾爱主题 阅读:126 2024-04-05 13:51:44 评论:0

详解 linux中的关机和重启命令

一 shutdown命令

shutdown [选项] 时间

选项:

?
1 2 3 -c:取消前一次关机命令 -h:关机 -r:重启

二 shutdown实战

?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 [root@localhost tmp]# date sat jul 15 09:28:35 cst 2017 [root@localhost tmp]# shutdown -r 05:30 shutdown scheduled for sun 2017-07-16 05:30:00 cst, use 'shutdown -c' to cancel. [root@localhost tmp]# shutdown -r 05:30 & [1] 4936 [root@localhost tmp]# shutdown scheduled for sun 2017-07-16 05:30:00 cst, use 'shutdown -c' to cancel.   broadcast message from root@localhost.localdomain (sat 2017-07-15 09:30:00 cst):   the system is going down for reboot at sun 2017-07-16 05:30:00 cst!   ^c [1]+ done shutdown -r 05:30 [root@localhost tmp]# shutdown -c   broadcast message from root@localhost.localdomain (sat 2017-07-15 09:31:03 cst):   the system shutdown has been cancelled at sat 2017-07-15 09:32:03 cst!

 三 其他关机命令

?
1 2 3 halt init 0 poweroff

四 其他重启命令

?
1 2 3 reboot init 6

五 系统运行级别

 六 查看系统运行级别以及修改系统的默认级别

?
1 2 runlevel cat /etc/inittab

七 登出

?
1 logout

八 实战

?
1 2 3 4 5 6 7 8 9 [root@localhost tmp] # [root@localhost tmp] # runlevel n 5 [root@localhost tmp] # init 3 policykit daemon disconnected from the bus. we are no longer a registered authentication agent. [root@localhost tmp] # runlevel 5 3 [root@localhost tmp] # logout

如有疑问请留言或者到本站社区交流讨论,以上就是linux 中关机重启的命令详解,感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!

原文链接:http://cakin24.iteye.com/blog/2391507

可以去百度分享获取分享代码输入这里。
声明

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

【腾讯云】云服务器产品特惠热卖中
搜索
标签列表
    关注我们

    了解等多精彩内容