Dual Boot: Set Windows as Default OS | Ubuntu

Setting Windows as the Default OS in Grub After Ubuntu Installation
Following a dual-boot installation of Ubuntu, a common issue arises: Ubuntu often becomes the default operating system presented by the Grub bootloader. Fortunately, reverting to Windows as the default is a straightforward process.
To initiate this change, you must first boot into your Ubuntu installation. Once Ubuntu is running, you'll need to execute a specific command in the terminal.
Editing the Grub Configuration File
Open the Grub configuration file using the following command:
sudo gedit /boot/grub/menu.lst
This command will open the menu.lst file in a text editor with administrative privileges, allowing you to modify the boot order.
Locating the Default Boot Entry
Within the menu.lst file, locate the section that defines the default boot entry. It will appear similar to this:
## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default 0
Pay close attention to the last line within this section, which specifies the current default boot entry.
Changing the Default Boot Order
The crucial step is to modify the number following "default" to correspond with the Windows boot section.
In a standard dual-boot setup, Windows is typically assigned the entry number 4. Therefore, change the line to:
default 4
Important: The numbering of boot entries begins at 0. The blocks located towards the end of the file directly correlate to the options displayed in the Grub menu.
Saving and Rebooting
After making the change, save the menu.lst file. Then, reboot your computer.
Upon restarting, your system should now boot directly into Windows, bypassing the Ubuntu option unless you specifically select it from the Grub menu.
Remember to verify the correct entry number for Windows within your menu.lst file if the default doesn't change as expected.