双重启动Ubuntu时将Windows设置为默认操作系统

When you install a dual-boot of Ubuntu, one of the frustrating things that you’ll immediately notice is that Ubuntu is now set as the default operating system in the Grub loader. There’s an easy way to switch back to using Windows as the default.

当您安装Ubuntu的双引导时,您会立即注意到的一件令人沮丧的事情是,现在Ubuntu已在Grub加载程序中设置为默认操作系统。 有一种简单的方法可以切换回使用Windows作为默认设置。

To make this change, you’ll first have to boot into Ubuntu, and then run the following command:

要进行此更改,您首先必须启动到Ubuntu,然后运行以下命令:

sudo gedit /boot/grub/menu.lst

须藤gedit /boot/grub/menu.lst

Find this section of the file:

查找文件的这一部分:

## default num# Set the default entry to the entry number NUM. Numbering starts from 0, and# the entry number 0 is the default if the command is not used.## You can specify ‘saved’ instead of a number. In this case, the default entry# is the entry saved with the command ‘savedefault’.# WARNING: If you are using dmraid do not change this entry to ‘saved’ or your# array will desync and will not let you boot your system.default 0

##默认编号#将默认条目设置为条目号NUM。 编号从0开始,并且#如果不使用该命令,则默认输入编号0。##您可以指定“ saved”代替数字。 在这种情况下,默认条目#是使用命令'savedefault'保存的条目。#警告:如果您使用dmraid,请不要将此条目更改为'saved',否则您的#数组将不同步并且将不允许您引导系统。 .default 0

The important line is the last one. You will need to change that number 0 to match the Windows boot section. Typically it’s always going to be 4 on a default dual-boot configuration. Change this value to 4, and then save and reboot your machine. You should go into Windows instead of Ubuntu automatically.

重要的是最后一行。 您将需要更改该数字0以匹配Windows启动部分。 通常,在默认双启动配置下,它总是为4。 将此值更改为4,然后保存并重新启动计算机。 您应该自动进入Windows而不是Ubuntu。

Note: The blocks at the bottom of the file match the items in the menu. You can change this value to match whichever item you want as default, just remember that numbering starts at 0.

注意:文件底部的块与菜单中的项目匹配。 您可以更改此值以匹配您想要作为默认项的任何一项,只需记住编号从0开始。

翻译自: https://www.howtogeek.com/howto/ubuntu/set-windows-as-default-os-when-dual-booting-ubuntu/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值