shutdown -r
和有什么区别shutdown -P
?
答案1
您可以通过输入以下命令获取有关命令的信息:
man <command>
对于该shutdown
命令你得到:
OPTIONS
-r Requests that the system be rebooted after it has been brought down.
-h Requests that the system be either halted or powered off after it has been brought down, with the choice as to
which left up to the system.
-H Requests that the system be halted after it has been brought down.
-P Requests that the system be powered off after it has been brought down.
-c Cancels a running shutdown. TIME is not specified with this option, the first argument is MESSAGE.
-k Only send out the warning messages and disable logins, do not actually bring the system down.
答案2
关闭过程通常需要 30 秒才能停止每个正在运行的服务。服务按字母顺序关闭。
-r 关机完成后重新启动系统。
-p 关闭系统而不超时或发出类似以下警告-H
答案3
shutdown -p
将关闭您的系统。
shutdown -r
将重新启动它。