您的当前位置:首页正文

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

2024-11-10 来源:个人技术集锦

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:

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.

Top