linux 的shutdown命令

使用说明: shutdown [选项]… 时间 [信息]
在系统关闭前。

选项:
-r                          重启系统
-h                         将系统关机,在某种程度上功能与halt命令相当。
-H                         关机后系统挂起
-P                         关机后,关闭电源
-c                          取消关机程序。
-k                          只是送出信息给所有用户,但并不会真正关机。
-q, –quiet               减少输出信息 ,只显示错误信息。
-v, –verbose            输出完整信息。
–help                     显示此帮助信息
–version                显示版本信息

时间可支持多种格式,最普通的就是“now”字符串,代表运行命令后,立即开始关机。
其他可定制有 +m和hh:mm两种格式,+m指定m秒之后开始关机,hh:mm是指定某个时间点(24h)关机。
登录的用户都会收到关机的通知信息,你可以自己定义额外的提示信息。而不会真的关机。
如果你设置了关机时间,那么命令会运行在后台,直到开始关机。当它还运行在后台,并未真的开始关机的时候,你可以用Ctr+c或者-c取消关机的程序。

原文内容:

使用说明: shutdown [选项]… 时间 [信息]
在系统关闭前。

选项:
-r reboot after shutdown
-h halt or power off after shutdown
-H halt after shutdown (implies -h)
-P power off after shutdown (implies -h)
-c cancel a running shutdown
-k only send warnings, don’t shutdown
-q, –quiet reduce output to errors only
-v, –verbose increase output to include informational messages
–help display this help and exit
–version output version information and exit

TIME may have different formats, the most common is simply the word ‘now’ which
will bring the system down immediately. Other valid formats are +m, where m is
the number of minutes to wait until shutting down and hh:mm which specifies the
time on the 24hr clock.

Logged in users are warned by a message sent to their terminal, you may include
an optional MESSAGE included with this. Messages can be sent without actually
bringing the system down by using the -k option.

If TIME is given, the command will remain in the foreground until the shutdown
occurs. It can be cancelled by Control-C, or by another user using the -c
option.

This entry was posted in 英语学习. Bookmark the permalink.

Comments are closed.