[Ubuntu] 14.04 關閉桌面

http://blog.csdn.net/orangleliu/article/details/43370405

一直在用Ubuntu的桌面來做調試環境,最近發現桌面會有崩潰的時候,佔用資源也比較大,所以想把桌面關閉,只用command界面。

我的系統是Ubuntu14.04

Ctrl+Alt+F1 可以轉到命令行,但是沒有把桌面關掉
Alt+F7 可以回到桌面

參考一個別人的的提問
這個回答中對於不同情況給了詳細的說明。


使用  Ctrl+Alt+t 打開命令行界面
sudo service lightdm stop

這樣進入了一個黑屏的界面。。但是呢,用ssh連接什麼還是可以的,要的就是這麼個結果。

如果想恢復桌面
sudo service lightdm start

下面是認同最多的一個答案:

For Ubuntu 11.10 and higher

Edit /etc/default/grub with your favorite editor,

sudo nano /etc/default/grub

Find out this line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Change it to:

GRUB_CMDLINE_LINUX_DEFAULT="text"

Update Grub:

sudo update-grub

No need to remove / disable lightdm upstart conf, it already does that for you.

lightdm.conf

# Check kernel command-line for inhibitors, unless we are being called
        # manually
        for ARG in $(cat /proc/cmdline); do
            if [ "$ARG" = "text" ]; then
                plymouth quit || :
                stop
                exit 0
            fi
        done

You will still be able to use X by typing startx after you logged in.


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章