答案1
您需要的是-P
,而不是-p
。它区分大小写。另外请注意,您必须是 root 才能这样关机。
目前,有多种进入方式。摘自man shutdown
:
TIME may have different formats, the most common is simply the word
'now' which will bring the system down immediately. Other valid for‐
mats 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.
例子:
$ sudo shutdown -P 20:30
[sudo] password for ward:
Broadcast message from ward@sekhmet
(/dev/pts/0) at 20:14 ...
The system is going down for power off in 16 minutes!