本文环境为Win11+Ubuntu22.04

进入Ubuntu,修改配置

sudo vim /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=2
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=-1
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

说明

  • GRUB_DEFAULT=2 指定进入grub时默认选择的选项,从0开始。也就是说第一个ubuntu的启动选项的编号是0,第二个Advanced ...的编号是1,第三个一般是Windows系统,所以这里改为2,代表默认选中windows。
  • GRUB_TIMEOUT=-1指停留在grub界面的时间,以秒为单位。-1代表如果用户不选择会一直停留在grub界面。

更新配置

执行

sudo update-grub

更新配置信息,重启配置生效。


版权声明:本文为qq_19007335原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/qq_19007335/article/details/128322684