华域联盟 Linux 详解 Linux中的关机和重启命令

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

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

一 shutdown命令

shutdown [选项] 时间

选项:

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

二 shutdown实战

[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 [email protected] (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 [email protected] (Sat 2017-07-15 09:31:03 CST):
 
The system shutdown has been cancelled at Sat 2017-07-15 09:32:03 CST!

 三 其他关机命令

halt
init 0
poweroff 


四 其他重启命令

reboot
init 6
 

五 系统运行级别

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

runlevel
cat /etc/inittab

七 登出

logout

八 实战

[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 中关机重启的命令详解,感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!

您可能感兴趣的文章:

本文由 华域联盟 原创撰写:华域联盟 » 详解 Linux中的关机和重启命令

转载请保留出处和原文链接:https://www.cnhackhy.com/66209.htm

本文来自网络,不代表华域联盟立场,转载请注明出处。

作者: sterben

发表回复

联系我们

联系我们

2551209778

在线咨询: QQ交谈

邮箱: [email protected]

工作时间:周一至周五,9:00-17:30,节假日休息

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

关注微博
返回顶部