ubuntu16.04不启动GUI

xiaoxiao2021-02-28  123

一直在用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 采用署名-非商业性使用-相同方式共享协议

在ubuntu16.04中,修改grub 

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_TERMINAL=console 没什么用,启动后还是会进入lightdm。 修改/etc/X11/default-display-manager 内容为false会直接导致系统启动出错。 所以还是干脆一点 sudo service lightdm stop

转载请注明原文地址: https://www.6miu.com/read-41964.html

最新回复(0)