shutdown

关机或重启linux

语法

   shutdown [options] when [message]

选项



   -c    取消正在进行的关闭

   -f    快速重新引导,在重新引导时取消对fsck的正常调用

   -h    关闭电源

   -k    打印警告消息,但禁止实际关机(模拟关机,不是真的关机)

   -n    不调用init进程进行关机,而是强行关机

   -r    重新启动

   -t sec 
         确保在杀死进程和更改运行级别之间有sec秒的延迟.

例子

立即关机:

shutdown -h now

立即重启:

shutdown -r now 

晚上8点关机:

shutdown -h 20:00

10分钟后关机:

shutdown -h +10 

shutdown 命令实例:

linux命令:shutdown --poweroff --poweroff shutdown shutdown --poweroffrootopen.com
linux命令:shutdown --poweroff --poweroff shutdown shutdown --poweroffrootopen.com
2018-09-11 09:55:30

linux命令:shutdown -h 60 60 -h shutdown shutdown -h 60rootopen.com
linux命令:shutdown -h 60 60 -h shutdown shutdown -h 60rootopen.com
2018-03-03 23:37:48

linux命令:shutdown -rF now now -rF shutdown shutdown -rF nowrootopen.com
linux命令:shutdown -rF now now -rF shutdown shutdown -rF nowrootopen.com
2018-03-06 07:43:48

linux命令:shutdown -r now now -r shutdown shutdown -r nowrootopen.com
linux命令:shutdown -r now now -r shutdown shutdown -r nowrootopen.com
2018-05-29 08:22:48

linux命令:shutdown -h $((60 * 4)) 4)) * $((60 -h shutdown shutdown -h $((60 * 4))rootopen.com
linux命令:shutdown -h $((60 * 4)) 4)) * $((60 -h shutdown shutdown -h $((60 * 4))rootopen.com
2018-02-12 04:13:48

linux命令:shutdown -h 240 & disown disown & 240 -h shutdown shutdown -h 240 & disownrootopen.com
linux命令:shutdown -h 240 & disown disown & 240 -h shutdown shutdown -h 240 & disownrootopen.com
2018-04-16 01:58:48

linux命令:shutdown -h +240 +240 -h shutdown shutdown -h +240rootopen.com
linux命令:shutdown -h +240 +240 -h shutdown shutdown -h +240rootopen.com
2018-06-03 12:44:48

linux命令:shutdown 60*4 & disown disown & 60*4 shutdown shutdown 60*4 & disownrootopen.com
linux命令:shutdown 60*4 & disown disown & 60*4 shutdown shutdown 60*4 & disownrootopen.com
2018-04-13 01:36:48

linux命令:shutdown now -r -r now shutdown shutdown now -rrootopen.com
linux命令:shutdown now -r -r now shutdown shutdown now -rrootopen.com
2018-04-16 20:25:48

Linux的Bash命令行(A-Z排序)