linux 从入门到跑路-电源管理

linux 从入门到跑路

Note3 电源管理

关机

poweroff命令

halt命令

输入后立刻关机

重启

reboot命令

关闭系统

shutdown命令

以一种安全的方式关闭系统。所有登陆用户都可以看到关机信息提示

shutdown -r +分钟  在指定分钟后重启

shutdown -h +分钟  在指定分钟后关机

[root@localhost ~]# shutdown -r 10
Shutdown scheduled for 四 2020-10-01 16:13:52 CST, use 'shutdown -c' to cancel.
[root@localhost ~]# 
Broadcast message from root@localhost.localdomain (Thu 2020-10-01 16:03:52 CST):

The system is going down for reboot at Thu 2020-10-01 16:13:52 CST!

[root@localhost ~]# shutdown -h 10
Shutdown scheduled for 四 2020-10-01 16:15:43 CST, use 'shutdown -c' to cancel.
[root@localhost ~]# 
Broadcast message from root@localhost.localdomain (Thu 2020-10-01 16:05:43 CST):

The system is going down for power-off at Thu 2020-10-01 16:15:43 CST!

  

shutdown -c 取消关机或重启的计划

[root@localhost ~]# shutdown -c
[root@localhost ~]# 
Broadcast message from root@localhost.localdomain (Thu 2020-10-01 16:04:30 CST):

The system shutdown has been cancelled at Thu 2020-10-01 16:05:30 CST!

  

shutdown -r/h 时:分  在指定的绝对时间时重启/关机

[root@localhost ~]# shutdown -r 20:20
Shutdown scheduled for 四 2020-10-01 20:20:00 CST, use 'shutdown -c' to cancel.

  

原文地址:https://www.cnblogs.com/FrancisDrakeK/p/9301425.html