Ubuntu 14启动时由图形启动改为命令行启动

本文介绍如何将Ubuntu系统的启动默认模式从图形界面更改为文本模式。通过修改/etc/default/grub文件中的GRUB_CMDLINE_LINUX参数为text,然后运行sudo update-grub命令更新配置,重启后即可实现开机直接进入命令行界面。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在网上查了一些资料后,大多数提到在/etc/inittab中修改运行级别,但是在ubuntu中没有这个文件。

ubuntu中要修改/etc/default/grub,打开该文件,看到如下内容

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=2
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""

把GRUB_CMDLINE_LINUX="" 的值改成text

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=2
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX="text"
最后一步,把grub文件更新一下 ,运行命令
sudo update-grub

再重启ubuntu,就使用命令行登录了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值