Ubuntu和windows 双系统,通过设置grub2默认启动项实现默认启动windows的功能。
[root~]# sudo cd /etc/grub.d
[root~]# ls
这时我们可以看到
00_header 05_debian_theme 10_linux 30-os-prober
20_memtest86+ 40_custom README
(这是我系统里的,你的可能不一样)
[root~]# mv 30_os-prober 06_os-prober (30_os-prober重命名为06_os-prober)
[root~]# update-grub
这时打开grub.cfg会看到windows系统已经排在前面了,这种方法简单,且以后不管进行多少次update-grub,windows系统项总是会排在第一位。