詳解 Linux中的關機和重啟命令
一 shutdown命令
shutdown [選項] 時間
選項:
-c:取消前一次關機命令-h:關機-r:重啟
二 shutdown實戰
[root@localhost tmp]# dateSat Jul 15 09:28:35 CST 2017[root@localhost tmp]# shutdown -r 05:30Shutdown scheduled for Sun 2017-07-16 05:30:00 CST, use 'shutdown -c' to cancel.[root@localhost tmp]# shutdown -r 05:30 &[1] 4936[root@localhost tmp]# Shutdown scheduled for Sun 2017-07-16 05:30:00 CST, use 'shutdown -c' to cancel. Broadcast message from root@localhost.localdomain (Sat 2017-07-15 09:30:00 CST): The system is going down for reboot at Sun 2017-07-16 05:30:00 CST! ^C[1]+ Done shutdown -r 05:30[root@localhost tmp]# shutdown -c Broadcast message from root@localhost.localdomain (Sat 2017-07-15 09:31:03 CST): The system shutdown has been cancelled at Sat 2017-07-15 09:32:03 CST!
三 其他關機命令
haltinit 0poweroff
四 其他重啟命令
rebootinit 6
五 系統運行級別
六 查看系統運行級別以及修改系統的默認級別
runlevelcat /etc/inittab
七 登出
logout
八 實戰
[root@localhost tmp]# [root@localhost tmp]# runlevelN 5[root@localhost tmp]# init 3PolicyKit daemon disconnected from the bus.We are no longer a registered authentication agent.[root@localhost tmp]# runlevel5 3[root@localhost tmp]# logout
如有疑問請留言或者到本站社區交流討論,以上就是Linux 中關機重啟的命令詳解,感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!
新聞熱點
疑難解答