無法將運行等級從 5 變更為 3

無法將運行等級從 5 變更為 3

我正在嘗試透過運行命令從運行級別 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請停止您的gdmlightdm服務。

答案2

在啟動時按住 Shift 鍵,選擇恢復 nmode,然後選擇 root,您現在可以輕鬆地在運行等級之間切換。

相關內容