首先打开终端,输入以下命令查看所有启动菜单
awk -F\' '/menuentry / { print i++, $2}' /boot/grub/grub.cfg
结果如下
0 Ubuntu
1 Ubuntu, with Linux 6.8.0-39-generic
2 Ubuntu, with Linux 6.8.0-39-generic (recovery mode)
3 Ubuntu, with Linux 6.8.0-38-generic
4 Ubuntu, with Linux 6.8.0-38-generic (recovery mode)
5 memtest86+
6 Memory test (memtest86+x64.efi, serial console)
7 Windows Boot Manager (on /dev/sda1)
8 UEFI Firmware Settings
现在想要把 Windows 作为默认启动项,在终端中输入
sudo nano /boot/grub/grub.cfg
输入上述指令后会打开一个文件,只需将里面“set default = 0”中的“0”更改即可,比如我的刚刚是默认ubuntu为启动项,所以这里是0,我要改成windows,那就把这里改成7即可。
参考链接:
http://t.csdnimg.cn/B39Un
http://t.csdnimg.cn/WDYk4
标签:菜单,grub,Ubuntu,默认,Linux,6.8 From: https://www.cnblogs.com/maruko/p/18338388