Aller au contenu principal
Image d'illustration pour l'article "🪟 How to Set Windows as the Default Boot Option in GRUB on Dual-Boot Systems" par Kevin Otty, développeur web et mobile
Linux Windows Dual-Boot GRUB Tutorial

🪟 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.

K
Lecture : 2 min Linux, Windows, Dual-Boot, GRUB, Tutorial

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

  1. Check the exact entry name: Make sure the name in GRUB_DEFAULT exactly matches the Windows entry in your GRUB menu.

  2. 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.

  3. 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:

  1. Press and hold the Shift key during startup.
  2. If that doesn't work, edit the GRUB configuration again and change:
    GRUB_TIMEOUT_STYLE=menu
    
    This will make the menu visible during boot.

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.

Tags de l'article

#Linux #Windows #Dual-Boot #GRUB #Tutorial
K

KEVIN OTTY

Développeur Web & Mobile

Développeur Web & Mobile titulaire d'une licence en systèmes informatiques et logiciels. Passionné par l'innovation technologique, il cherche à mettre ses compétences techniques au service de projets concrets pour contribuer à la croissance des entreprises.

Articles similaires

Découvrez d'autres articles qui pourraient vous intéresser

Image d'illustration pour l'article "Trying Hackintosh on my HP ProBook 640 G5"
Hackintosh
7 mai 2025

Trying Hackintosh on my HP ProBook 640 G5

A step-by-step guide to installing macOS on an HP ProBook 640 G5 with Intel Core i5-8365U and UHD 620 graphics, including BIOS configuration, EFI setup, and troubleshooting tips.

#macOS #HP ProBook +2 autres
Lire l'article
Image d'illustration pour l'article "Top 7 des Meilleurs Sites Gratuits de Face Swap en 2025"
AI
26 avril 2025

Top 7 des Meilleurs Sites Gratuits de Face Swap en 2025

Découvrez les meilleurs outils gratuits pour échanger des visages sur photos et vidéos. Comparaison détaillée des 7 plateformes les plus performantes pour créer du contenu amusant et viral.

#Face Swap #Outils +1 autres
Lire l'article

Restez informé

Recevez une notification lors de la publication de nouveaux articles

Nous respectons votre vie privée. Désabonnement possible à tout moment.