命令說(shuō)明
命令如下:
sudo shutdown [-h | -r | -s] [time]
此命令需要管理員權(quán)限參數(shù)說(shuō)明:
-
-h
:關(guān)機(jī)(halt) -
-r
:重啟(reboot) -
-s
:休眠(sleep) -
time
:執(zhí)行操作的時(shí)間- yymmddhhmm :指定年月日時(shí)分,如 17022318 表示2017年2月23日18時(shí)
- now :現(xiàn)在
- +n :n分鐘后
- hh:mm :今天某時(shí)某分
- 其他關(guān)機(jī)和重啟命令
立刻關(guān)機(jī):sudo halt
立刻重啟:sudo reboot
例子
- 在 2017年2月23日18時(shí) 關(guān)機(jī)
sudo shutdown -h 1702231800
- 立刻重啟
sudo shutdown -r now
或者
sudo reboot
- 今晚 20 點(diǎn)休眠
sudo shutdown -s 20:00