Linux common commands-116: shutdown

shutdown command is used to shut down the system and is equivalent to the halt command.

Syntax format: shutdown [parameter]

Common parameters

Example

 # 立即关闭系统shutdown -h now # 立即重启系统shutdown -r now # 10分钟后关机,同时发送消息给登录用户shutdown +10 "马上关机啦,赶快保存资料,不然一天白忙啦!" # 设定系统关闭时间也就是定时关机,如20:30 shutdown -h 20:30 # 如果之前设定了定时关机,可以取消shutdown -c

This article is reprinted from https://xugaoxiang.com/2022/10/11/linux-cmds-116-shutdown/
This site is for inclusion only, and the copyright belongs to the original author.