Change Boot order in Grub

1 minute read

I recently had to change my primary development environment to Windows.  Because all of my machines are dual boot machines (between Windows XP/7 and Ubuntu 11.x) I needed to change the boot order so that every time the machine reboots it goes into Windows.  Below are the files I’ve modified and the command I executed to achieve this goal:

sudo vim /etc/default/grub

I then modified this file and looked for the following line:


where ‘##’ is the index for the Windows Operating System (or any other OS installed on the machine) that you wish to boot up to automatically.

where ‘##’ is the number of seconds you want to wait before GRUB boots into the selected operating system. Afterwards, I had to run the following command to make the change permanent:

sudo update-grub

One other thing, for those that are inpatient, you can also make a change to the /etc/default/grub file to have the computer select the appropriate OS faster.  You will need to change one setting to the desired seconds value.  See the line below that you’ll need to change in this file to do this:


All you have to do is to replace the ## with the desired timeout period (i.e. period to wait) to have Grub select the OS for you automatically.



Leave a comment