共计 1131 个字符,预计需要花费 3 分钟才能阅读完成。
[v_act]格式:shutdown [OPTIONS…] [TIME] [WALL…]
-r:重启系统
-h:关闭系统
-c:取消关机或重启操作
TIME:
now: 立刻
+m: 相对时间表示法,从命令提交开始多久之后;例如 +3。
hh:mm: 绝对时间表示,指明具体时间(24小时制)。[/v_act]
立即重启系统
[root@localhost ~]# shutdown -r now
立即关闭系统
[root@localhost ~]# shutdown -h now
3分钟后重启系统
[root@localhost ~]# shutdown -r +3
Shutdown scheduled for Thu 2017-02-02 20:23:18 CST, use 'shutdown -c' to cancel.
[root@localhost ~]#
Broadcast message from root@localhost.localdomain (Thu 2017-02-02 20:20:18 CST):
The system is going down for reboot at Thu 2017-02-02 20:23:18 CST!
3分钟后关闭系统
[root@localhost ~]# shutdown -h +3
Shutdown scheduled for Thu 2017-02-02 20:24:10 CST, use 'shutdown -c' to cancel.
Broadcast message from root@localhost.localdomain (Thu 2017-02-02 20:21:10 CST):
The system is going down for power-off at Thu 2017-02-02 20:24:10 CST!
指定时间重启系统
[root@localhost ~]# shutdown -r 21:30
Shutdown scheduled for Thu 2017-02-02 21:30:00 CST, use 'shutdown -c' to cancel.
指定时间关闭系统
[root@localhost ~]# shutdown -h 21:30
Shutdown scheduled for Thu 2017-02-02 21:30:00 CST, use 'shutdown -c' to cancel.
终止重启(关闭)系统操作
[root@localhost ~]# shutdown -c
Broadcast message from root@localhost.localdomain (Thu 2017-02-02 20:23:23 CST):
The system shutdown has been cancelled at Thu 2017-02-02 20:24:23 CST!
正文完