Once you install Ubuntu alongside Windows 11 or Windows 10, the GRUB boot menu automatically highlights Ubuntu at the top and starts a 10-second countdown. Unless you hover over the keyboard during startup and tap the Down arrow key in time, your PC drops straight into Linux — which quickly wears thin if Windows is still the system you use most days for work or games.
Two Ways to Change Your Default Operating System
Instead of reinstalling anything or breaking your boot partition, you can edit one plain configuration file inside Ubuntu so GRUB either:
- Remembers whichever OS you picked last time (the safest option if Windows updates split across multiple restarts, because updates won’t drop into Ubuntu mid-install).
- Pins Windows Boot Manager permanently to the top default slot every time you turn on the PC.
Option 1: Make GRUB Remember Your Last Choice (Recommended)
Because GRUB numbers entries starting from zero and Linux kernel updates can shift list order over time, letting GRUB remember your most recent choice works reliably without hardcoding row numbers.
- Boot into Ubuntu and open Terminal (press Ctrl + Alt + T).
- Open the GRUB configuration file with admin rights:
sudo nano /etc/default/grub - Find the line
GRUB_DEFAULT=0and change it to:GRUB_DEFAULT=saved - On a new line directly below it, add:
GRUB_SAVEDEFAULT=true - Press Ctrl + O, hit Enter to save, then press Ctrl + X to close nano.
- Apply the updated settings to your boot menu:
sudo update-grub
Reboot once, highlight Windows Boot Manager with the arrow keys, and press Enter. From that restart onward, GRUB highlights Windows automatically until the day you manually choose Ubuntu again.
Option 2: Always Boot Windows First Every Single Time
If you share the PC with family who only use Windows and never want Ubuntu remembered as the default even after you visit Linux, point GRUB directly to the exact Windows menu title instead of a number:
- List the exact Windows entry name stored inside your GRUB config:
grep -i "menuentry " /boot/grub/grub.cfg - Copy the exact Windows text inside single quotes — on modern UEFI systems this is normally
Windows Boot Manager (on /dev/nvme0n1p1)orWindows Boot Manager. - Run
sudo nano /etc/default/gruband replaceGRUB_DEFAULT=0with that exact quoted string:GRUB_DEFAULT="Windows Boot Manager (on /dev/nvme0n1p1)" - Save with Ctrl + O, exit with Ctrl + X, and run
sudo update-grub.
Why You Should Also Check Time Sync and System Snapshots
Keep GRUB_TIMEOUT=5 (or leave it at 10) rather than setting 0, so you never lock yourself out of selecting Ubuntu when you need it. If you notice Windows and Ubuntu clocks jumping several hours apart after switching between them, follow our guide to fixing dual-boot clock time mismatches between Windows and Ubuntu, and consider setting up backups with Timeshift system snapshots on Ubuntu before major system upgrades.