If you have installed Linux and Windows both on the same system then probably you’ll be viewing grub boot screen every time you start your computer. Now if you have installed Linux after windows , by default Linux ( in my case Ubuntu ) is the default selected operating system. You can edit these settings and select the default operating according to your choice. For that, you have to edit the Grub.So Login to your Ubuntu Linux as root and open your terminal. Type:grep menuentry /boot/grub/grub.cfg

Your terminal will show list of choices something like this :

List of available choices in Grub boot loader
List of choices

This screen show the choices shown in grub boot during computer startup. In my case i have installed Windows 8 and Ubuntu. Now we’ll edit the grub file. So in the terminal type:

gksudo gedit /etc/default/grub

If asked for password , type your password and then in grub file find the GRUB_DEFAULT and set it’s value as your choice. Here in the list the first choice is Ubuntu has value 0 . Means the value of the first option is 0. In my case for windows 8 the value is 4. So for this example if i want to set the default choice to Windows 8 , i’ll set :

GRUB_DEFAULT = 4

Or you can also use the name of the OS choice , as:
GRUB_DEFAULT= “Windows 8 (loader) (on /dev/sda1)”

Upadate the Grub boot setting

Now after editing the grub file , we’ll update it so that changes can be effective. So change directory by typing :
cd /boot/grub
Now update it :
sudo update-grub
it’ll show results similar to this image :
Results of Grub update for default OS change
Results of grub update
Now reboot your computer. You’ll find that your preferred OS is selected default operating system.