您的位置:首页 > 运维架构 > Linux

Linux & windows 双系统时,将windows 设置为默认系统

2012-01-08 16:17 465 查看


Set Windows as Default
OS when Dual Booting Ubuntu

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.

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

sudo 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

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.

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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息