Possible Duplicate:
How do I set Windows to boot as the default in the boot loader?

I just installed Ubuntu 11. on my computer but the default is Ubuntu. How do I change it so that Windows 7 is the default?

marked as duplicate by Jorge Castro, Marco Ceppi Apr 22 '12 at 1:26

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Which does not contain a complete (and up-to-date) answer. I've added one below (with link to 'duplicate'). – david6 Apr 21 '12 at 23:32

Adapted from: How do I set Windows to boot as the default in the boot loader?

For Ubuntu 11.x (or higher), with Grub2

Find out what you boot options are called:

sudo update-grub

One of the entries should be 'Windows 7'.

Edit /etc/default/grub to set this as boot default:

sudo gedit /etc/default/grub



to: (for example)

    GRUB_DEFAULT="Windows 7 (loader) (on /dev/sda2)"

Save file, then (again) run:

sudo update-grub

Run this in your terminal to open the GRUB configuration file in Gedit Text Edior:

gksudo gedit /boot/grub/grub.cfg

In that file, on line 13, you'll find this:

set default="0"

The number represents the default boot-item in the boot-menu, where the first item is 0. If Windows 7 is number 5 on your boot menu, change "0" to "5". Remember to save the file before you close it.

Apply the changes by running this in the terminal:

sudo update-grub

To always have an easy way to change the default boot-item, change the default in the field to

set default=saved

Update grub using the command above (sudo grub-update), and then you can easily change the default boot item at any time by using the command

sudo grub-set-default 

followed by the number of the menu-item you want to set as default.

  • It is better NOT editing /boot/grub/grub.cfg. It is created (from templates) when Grub2 content is updated. It contains the following warning: 'DO NOT EDIT THIS FILE'. – david6 Apr 21 '12 at 23:45
  • You are of course correct. – Esso Apr 22 '12 at 1:13
  • "sudo grub-update"? --> You mean update-grub? – weakish Jul 28 '13 at 5:00
  • Hm, yes.. Fixing it now. Thanks! – Esso Jul 29 '13 at 10:22

You can also download StartUp-Manager at Ubuntu Software Center, it comes with a GUI and it's simple to use! = )

Not the answer you're looking for? Browse other questions tagged or ask your own question.