设置Ubuntu默认启动方式

Posted 1156184981651a

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了设置Ubuntu默认启动方式相关的知识,希望对你有一定的参考价值。

一、设置Ubuntu启动时默认进入终端命令行

1、修改grub文件

nano /etc/default/grub

把以下行:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
(也可能是这样:GRUB_CMDLINE_LINUX_DEFAULT="")
替换为:
GRUB_CMDLINE_LINUX_DEFAULT="text"

取消行
#GRUB_TERMINAL=console
的注释。

2、更新grub

sudo update-grub

3、执行下面命令默认启动到命令行

systemctl set-default multi-user.target

4、重启系统 reboot(或init 6)

二、恢复桌面系统启动

5.1 执行如下命令启动到桌面
sudo systemctl start lightdm

5.2 恢复默认启动到桌面,执行
systemctl set-default graphical.target

5.3 重启系统使设置生效
reboot(或init 6)

来源:迅闻网
 

以上是关于设置Ubuntu默认启动方式的主要内容,如果未能解决你的问题,请参考以下文章