Set Windows as Default OS when dual booting Windows and Ubuntu

You are dual booting Windows and Ubuntu on your computer. When you restart your computer, what do you see? Ubuntu takes the priority of booting. So, while restarting, if you are away from your computer, the system loads Ubuntu and not Windows. This becomes a major problem when you want to load Windows mostly. Since Ubuntu is set as default OS, every time you start your computer, you have to select Windows. Frustrated? Don’t worry. Today, I am posting a 3-step procedure to set Windows as default OS when dual booting Windows and Ubuntu.

Windows Ubuntu bootloader grub

Set Windows Default for Dual Boot with Ubuntu:

If you are imagining this method to be too difficult or lengthy, you are wrong! You can’t imagine how simple the steps are! The procedure contains one minor edit: simply changing the digit from “0? to your desired one and you are done! This helps in saving a lot of time and frustration. So, let us begin:

1. In Ubuntu, open the terminal and type in this command:

sudo gedit /boot/grub/grub.cfg

Set Windows as Default OS

It is used to open your grub.cfg file which decides the priority of bootloader. So, we will edit this file to set Windows as default OS.

You will be asked to enter your password. After entering your password, hit on Enter to see:

Dual booting Windows and Ubuntu

2. In the newly opened file, look for set default field. In your case, it will contain value “0?. Here “0? represents the first entry i.e. Ubuntu. Now, note the position at which your Windows OS appears when you start your system. Usually for computers with two operating systems, Windows is the 5th entry. So, its value becomes “4? because counting starts from 0. In my case, Windows appears at 6th position. Hence, its value becomes “5?.

Note: Making any mistakes while editing this file will result in Grub failure. Make sure you don’t make any other changes to this file. Also, for knowing the position of Windows on your computer, restart your computer and count the position at which Windows OS appears. If it is at position 5, enter value one less i.e. “4?.

3. Once you have done the changes, save it(Ctrl+S). Now, restart your computer and you will find Windows set as default OS.

I hope you can now set Windows as default OS to dual boot Windows and Ubuntu. Henceforth, you don’t have to wait and select Windows in bootloader every time you start your computer. Enjoy simplified computing!

This was a short tutorial on how to edit Grub file to set Windows as default OS. If you have any problem while dual booting Windows and Ubuntu, please let us know in comments.

Share this post