How to Get Ubuntu to Boot Before Windows

Use an app or your computer's configuration utility to set device boot order

Young business woman sitting in the conference room office working on the project and achieving success.
urbazon / Getty Images

When you choose the option to install Ubuntu alongside Windows the expected result is that when you boot the computer a menu appears with options to boot either Ubuntu or Windows.

Sometimes things do not go to plan and Windows boots first without any option for starting Ubuntu.

Use 'efibootmgr' to Change the Boot Order Within Ubuntu

Change UEFI bootorder with efibootmgr

To modify the EFI boot order from within Ubuntu, install the efibootmgr app from the repository. When you run the app, you'll see a list of boot partitions.

The line BootOrder specifies the preferred sequence; the values correspond to specific boot partitions further in the list.

To change the order, use efibootmgr -o then specify an alternative setup. If you do not include a boot partition in the list, it will not appear on the start-up screen. each item should appear with its four-digit number, separated by commas without spaces. For example, to re-write the boot order to boot first to partition 2, then to partition 1, then to partition 3, execute:

sudo efibootmgr -o 0002,0001,0003

When you reboot, the new order should present on screen.

The Guaranteed Way to Set the Boot Order

Boot Setup Screen

If the first option doesn't work then you need to use the UEFI settings screen for your computer to adjust the boot order.

Most computers include a keypress sequence that launches the EFI configuration utility. Try these keys for common manufacturers:

  • Acer: Escape, F12, F9
  • ASUS: Escape, F8
  • Compaq: Escape, F9
  • Dell: F12
  • EMachines: F12
  • HP: Escape, F9
  • Intel: F10
  • Lenovo: F8, F10, F12
  • Samsung: Escape, F12
  • Sony: F10, F11
  • Toshiba: F12

You only have to press one of these keys for the boot menu to appear. Each manufacturer uses a different key and a manufacturer doesn't even keep it standard across its own range.

The menu that appears should show Ubuntu if it is installed and you can boot using this menu.

This approach isn't permanent—you must press the relevant key again to show the menu every time you boot. Most of these configuration utilities offer tools to permanently change the boot order. Check your manufacturer's documentation for specific procedures.