[Ubuntu] 14.04 关闭桌面

来源:互联网 发布:武汉有单片机培训机构 编辑:程序博客网 时间:2024/04/27 22:49
一直在用Ubuntu的桌面来做调试环境,最近发现桌面会有崩溃的时候,占用资源也比较大,所以想把桌面关闭,只用command界面。
我的系统是Ubuntu14.04

Ctrl+Alt+F1 可以转到命令行,但是没有把桌面关掉
Alt+F7 可以回到桌面

参考一个别人的的提问
http://askubuntu.com/questions/16371/how-do-i-disable-x-at-boot-time-so-that-the-system-boots-in-text-mode
这个回答中对于不同情况给了详细的说明。


使用  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.


本文出自 “orangleliu笔记本” 博客,转载请务必保留此出处http://blog.csdn.net/orangleliu/article/details/43370405

作者orangleliu 采用署名-非商业性使用-相同方式共享协议

1 0
原创粉丝点击