在Ubuntu18.04系統(tǒng)中,如何進(jìn)行關(guān)機重啟?本文將針對此問題進(jìn)行說明。
1.shutdown
格式:shutdown -選項 時間
說明:不指定選項和參數(shù),默認(rèn)表示 1 分鐘之后關(guān)閉電腦
常用命令示例
# 重新啟動操作系統(tǒng),其中 now 表示現(xiàn)在
$ shutdown -r now
# 立刻關(guān)機,其中 now 表示現(xiàn)在
$ shutdown now
# 系統(tǒng)在今天的 20:25 會關(guān)機
$ shutdown 20:25
# 系統(tǒng)再過十分鐘后自動關(guān)機
$ shutdown 10
# 取消之前指定的關(guān)機計劃
$ shutdown -c
2.poweroff
立刻關(guān)機
3.reboot
立刻重啟
4.init
ubuntu系統(tǒng)的運行級別分為7個
0 代表系統(tǒng)停機也就是關(guān)機狀態(tài)
1 代表單用戶或者系統(tǒng)維護(hù)狀態(tài)
3 代表命令行
5 代表圖形界面
6 代表重新啟動
因此init 0可以用來關(guān)機
而init 6可以用來重啟