linux关机流程

将内存中的数据同步到硬盘

sync

语法

shutdown [OPTIONS...] [TIME] [WALL...]
【options】
-r, reboot
Reboot the machine.(重新启动设备)
-h
Equivalent to poweroff(定时关机)
【time】
+m 表示从现在开始的制定分钟数
时间字符串可以是“hh:mm”格式的小时/分钟,指定在24小时内执行关机的时间格式

实例

shutdown -h now 立马关机
shutdown -h 23:15 系统会在今天的23:15关机
shutdown -h +10 系统会在10分钟后关机
shutdown -c 取消即将进行的关机
shutdown -r now 马上重启 等同于reboot
shutdown -r +10 系统会在10分钟后重启

posted @ 2019-11-18 00:04  网事如疯  阅读(599)  评论(0)    收藏  举报