Steps to Set Windows as Default OS when Dual Booting with Ubuntu

I have Ubuntu (Linux operating system) installed in my computer along with the Windows XP. The most irritating thing that I experience daily is to select Windows XP from the list of Operating Systems installed. Sometimes when I forget to scroll down, Ubuntu loads up and then I have to restart the computer again.

This is the most frustrating thing for someone who doesn’t wish to use Ubuntu. This happens as Ubuntu is set as the default operating system in the Grub loader. But here is how you can select XP as the default OS while booting.


1.    Boot into Ubuntu.

2.    Run the terminal and then type in the following command

sudo gedit /boot/grub/menu.lst

You will be asked to enter your password, enter it.

3.    A new window will open as shown.

Just locate the highlighted code inside it.

4.    Now just change the value of default from 0 to 4 in the last line of that code and save the file.
Note: 4 is the place of Windows XP where it is located after the Ubuntu OS while booting in the startup screen as shown.

It may be different as well, as in my case it was 6. I have 4 Ubuntu listed in the Boot Section and 5th was Ubuntu Memtest86+. Windows XP was listed in 6th place in the boot order.

Rebooting will now take you the XP by default even if you forget to select any OS. Did it help you?

One Reply to “Steps to Set Windows as Default OS when Dual Booting with Ubuntu”

Leave a Reply