![無法將運行等級從 5 變更為 3](https://rvso.com/image/1108656/%E7%84%A1%E6%B3%95%E5%B0%87%E9%81%8B%E8%A1%8C%E7%AD%89%E7%B4%9A%E5%BE%9E%205%20%E8%AE%8A%E6%9B%B4%E7%82%BA%203.png)
我正在嘗試透過運行命令從運行級別 5 更改為運行級別 3 sudo init 3
。
由於某種原因它不再做任何事情了。
奇怪的是,如果我運行該命令,runlevel
它會顯示我位於level 3
.
試著逃跑init 5
,然後init 3
仍然一無所獲。
有人知道如何修復它嗎?
答案1
來自線上說明頁:
Runlevels are a concept from UNIX(R) System V used by the init(8)
daemon or other system initialisation system to define modes of system
operation.
The Upstart init(8) daemon has no native concepts of runlevel, and
unlike the System V daemon, makes no attempt to keep track of the
current runlevel.
Ubuntu 和其他現代 Linux 發行版已替換System V init
為暴發戶:
Upstart 是 /sbin/init 守護程序的基於事件的替代品,它在引導期間處理任務和服務的啟動,在關閉期間停止它們並在系統運行時監督它們。
如果您必須切換到現在最接近的服務,runlevel 3
請停止您的gdm
或lightdm
服務。
答案2
在啟動時按住 Shift 鍵,選擇恢復 nmode,然後選擇 root,您現在可以輕鬆地在運行等級之間切換。