
🪟 How to Set Windows as the Default Boot Option in GRUB on Dual-Boot Systems
A step-by-step guide to configuring GRUB to set Windows as the default operating system on dual-boot Linux and Windows systems.
How to Set Windows as the Default Boot Option in GRUB on Dual-Boot Systems
If you're dual-booting Linux and Windows, you might prefer to have Windows boot by default. This guide walks you through configuring GRUB to set Windows as the default operating system.
Step 1: Identify the Windows Boot Entry
First, determine the exact name of the Windows boot entry in GRUB:
sudo grep menuentry /boot/grub/grub.cfg
Look for a line similar to:
menuentry 'Windows Boot Manager (on /dev/sda1)' --class windows --class os {
Note the exact title: Windows Boot Manager (on /dev/sda1)
. This will be used in the configuration.
Step 2: Edit GRUB Configuration
Open the GRUB configuration file with a text editor:
sudo nano /etc/default/grub
Modify or add the following lines:
GRUB_DEFAULT="Windows Boot Manager (on /dev/sda1)"
GRUB_SAVEDEFAULT=true
GRUB_TIMEOUT=7
Explanation of the settings:
- GRUB_DEFAULT: Sets Windows as the default boot option.
- GRUB_SAVEDEFAULT: Remembers the last selected boot entry.
- GRUB_TIMEOUT_STYLE=hidden: Hides the GRUB menu by default.
- GRUB_TIMEOUT=7: Waits 7 seconds before booting the default OS, allowing time to select another OS if desired.
Save the file and exit the editor (in nano: press Ctrl+O, then Enter to save, and Ctrl+X to exit).
Step 3: Update GRUB
Apply the changes by updating GRUB:
sudo update-grub
This command regenerates the GRUB configuration file to include your changes.
Step 4: Reboot and Verify
Restart your computer:
sudo reboot
Upon reboot, your system should automatically boot into Windows. If you wish to access the GRUB menu to select a different operating system, press and hold the Shift key during startup.
Troubleshooting
If Windows Doesn't Boot by Default
Check the exact entry name: Make sure the name in
GRUB_DEFAULT
exactly matches the Windows entry in your GRUB menu.Try using the entry number: Instead of using the name, you can use the entry number (starting from 0). For example:
GRUB_DEFAULT=2
This would select the third entry in the GRUB menu.
Verify your changes: Check if your changes were saved correctly:
cat /etc/default/grub | grep GRUB_DEFAULT
If GRUB Menu Doesn't Show
If you need to access the GRUB menu but it's hidden:
- Press and hold the Shift key during startup.
- If that doesn't work, edit the GRUB configuration again and change:
This will make the menu visible during boot.GRUB_TIMEOUT_STYLE=menu
Conclusion
By following these steps, you've configured your system to boot into Windows by default while retaining the ability to choose other operating systems when needed. This setup provides the convenience of automatically booting into your preferred OS while maintaining the flexibility of a dual-boot system.
Kevin
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi at dolor vel lacus viverra bibendum at eu orci. Learn more about the author and their work on their profile page.
You might also like
Stay updated
Get notified when we publish new articles and insights
We respect your privacy. Unsubscribe at any time.