2-1關閉和重啟linux系統
0x01 shutdown命令
語法:shutdown [選項][時間][警告資訊]
選項 | 含義 |
---|---|
-k | 並不執行shutdown,只是發出警告資訊 |
-r | 重新啟動系統 |
-h | 關閉系統 |
-c | 取消運行shutdown |
shutdown -h now
#立即關閉電腦
shutdown -h +45
#45分鐘後關閉
shutdown -r now "system will be reboot now"
#立即重啟,發出警告
shutdown -r 01:01
#定時,在01:01重啟電腦
0x02 halt命令
halt
#相當於shutdown -h,
0x03 reboot命令
語法:reboot [選項]
與halt相似,reboot電腦重啟,而halt是電腦關閉
reboot
0x04 man命令
man pwd
#獲取pwd的使用幫助
#man手冊頁的資源主要位於/usr/share/man目錄下。
0x05–help
pwd --help
#顯示命令的使用方法以及命令選項的意義。