How To

How To Adjust Boot Priority on Linux Systems

February 13, 2026 4 分で読む Updated: February 13, 2026

After setting up a dual-boot system, it’s pretty common for the secondary OS—like Linux or Windows—to become the default boot option. Sometimes it’s not what you want, especially if you’re constantly booting into one OS. Knowing how to tweak the boot order can save a lot of headaches. Whether you’re dealing with GRUB in Linux or the boot order in your firmware, there are ways to set it up so the right OS boots first, automatically. Helps avoid that annoying manual selection every time. Here’s a quick rundown of what worked on a few setups, but be aware: some details might vary depending on the distro or hardware.

Ways to Change Boot Order

The methods below were tested on Ubuntu, but they’re pretty much applicable to most Linux distros. The only difference? The location of the config files or the way the BIOS/UEFI menus are laid out. So, if one doesn’t work perfectly, another often does—just a heads up because of course, hardware makes things a bit random sometimes.

Edit GRUB Config File

Changing the default boot entry on Linux mainly involves editing the /etc/default/grub file. It’s the central place for customizing how GRUB loads up. Before making changes, it’s always a good idea to make a backup in case something goes sideways:

sudo cp /etc/default/grub /etc/default/grub.bak

This way, if messing with the config erases all your settings, you can just restore it. To see what entries are available in GRUB, you can run cat /boot/grub/grub.cfg | grep menuentry. That’s useful because sometimes the order isn’t obvious, especially if you’ve got multiple kernels, OSes, or special boot options.

Note: The menu entries are zero-indexed, meaning the first one is 0, second is 1, and so on. So, if your preferred system is the second in the list, you’d set GRUB_DEFAULT=1.

Steps to Set the Default Boot Entry

  • Open the config file with nano or your favorite text editor: sudo nano /etc/default/grub
  • Look for the line that says GRUB_DEFAULT. Change its value to match your preferred entry index. For example, set GRUB_DEFAULT=0 for the first entry, or 1 for the second.
  • Save the file by pressing CTRL + O, hit Enter, then exit with CTRL + X.
  • Finally, update GRUB so it applies the changes: sudo update-grub.(On some distros, it might be sudo grub-mkconfig -o /boot/grub/grub.cfg instead.)

This seems to do the trick most of the time, but sometimes after a reboot or system update, it resets. Not entirely sure why, but a quick re-edit usually fixes it.

Use EFI Boot Manager to Rearrange Boot Priority

If your system is UEFI-based, there’s also a tool called efibootmgr. It allows you to change the actual boot order, not just the default entry as seen by GRUB. This is handy if your firmware is overriding GRUB’s settings or if Windows is set to boot first because of the BIOS settings.

Here’s what often works: open a terminal and run efibootmgr to see the current order. Like:

sudo efibootmgr

Look at the BootOrder line and identify the entries. To change it, use the -o flag with the desired order, e.g., sudo efibootmgr -o 0002, 0001, 0000. These numbers correspond to the boot entries listed, so double-check because messing this up can make your machine forget how to boot.

Keep in mind, this only works on UEFI systems—Legacy BIOS setups have different procedures, usually inside the BIOS menu itself.

Change Boot Priority Directly in BIOS/UEFI Settings

This is often the simplest but least flexible approach—if the firmware lets you reorder boot options manually. On startup, press the key that gets you into the BIOS or UEFI setup screen (often Del, F2, or F10).If you have Fast Boot enabled, it can be hard to catch, so try holding Shift (for BIOS) or pressing Esc repeatedly when booting (for UEFI) to get into the firmware menu.

Once inside, go to the Boot or Boot Order tab, and move your preferred OS or bootloader (like GRUB) higher on the list. Save and exit. When you reboot, your machine should boot into your chosen OS first. For Linux dual-boot setups, this is often enough, but if it still boots Windows first, double-check the Windows Boot Manager priority and switch it to the Linux bootloader if needed.

Because of how BIOS/UEFI works, sometimes Windows sets the boot order to prioritize itself, so changing it directly might be necessary. Just don’t forget to save! And if things get weird, you can always reset BIOS to defaults and start over.