您的位置:首页 > 其它

[Ubuntu] 14.04 关闭桌面

2015-02-01 11:17 232 查看
一直在用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 采用署名-非商业性使用-相同方式共享协议
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ubuntu 桌面 关闭 lightdm