shutdown 命令用来系统关机命令。shutdown 指令可以关闭所有程序,并依用户的需要,进行重新开机或关机的动作。
参考:http://man.linuxde.net/shutdown
示例:
# 指定现在立即关机
shutdown -h now
# 指定 5 分钟后关机,同时送出警告信息给登入用户
shutdown +5 "System will shutdown after 5 minutes"shutdown [选项] 时间 [消息]-h 关机-r 重启-c 取消已排程的关机now 立即执行+N N 分钟后执行HH:MM 指定时刻shutdown -h now shutdown +5 "System will shutdown after 5 minutes" ★ 生产环境执行前先确认目标主机;建议用 shutdown -c 留后悔药
shutdown 命令用来系统关机命令。shutdown 指令可以关闭所有程序,并依用户的需要,进行重新开机或关机的动作。
参考:http://man.linuxde.net/shutdown
示例:
# 指定现在立即关机
shutdown -h now
# 指定 5 分钟后关机,同时送出警告信息给登入用户
shutdown +5 "System will shutdown after 5 minutes"内容与示例整理自 dunwu/linux-tutorial,遵循 CC BY-SA 4.0;本站保留原作者署名与许可,命令仅供学习,执行前请核对目标环境。