To make this change, you’ll first have to boot into Ubuntu, and then run the following command:
Find this section of the file:
The important line is the last one. You will need to change that number 0 to match the Windows boot section. Typically it’s always going to be 4 on a default dual-boot configuration. Change this value to 4, and then save and reboot your machine. You should go into Windows instead of Ubuntu automatically.
Note: The blocks at the bottom of the file match the items in the menu. You can change this value to match whichever item you want as default, just remember that numbering starts at 0.