Practical examples of the efibootmgr command in Linux

Last update: 09/06/2025
Author Isaac
  • The efibootmgr command is essential to manage the Boot UEFI and control multiple systems.
  • Allows you to easily view, modify, create and delete UEFI boot entries from the terminal.
  • Correct use of efibootmgr requires booting the system in UEFI mode and taking precautions with partitions.

linux tutorial

Managing boot on modern systems can be a real pain, especially if you have multiple OS, you experiment with different distributions of Linux or you just need to sort through the mess of entries that appear in the UEFI boot menu. Fortunately, there's a powerful tool called efibootmgr that, when used properly, gives you complete control over how and what boots up on your computer, preventing problems and making life easier for both advanced users and those new to the Linux world.

This article is a practical and very complete guide on The efibootmgr command: from what it is, how to install it correctly depending on your distribution, to detailed usage examples for listing, modifying, adding, or removing UEFI boot entries, including tips for avoiding mistakes and troubleshooting common errors. It contains the most important, up-to-date, and clear information you can find, explained with real-life examples, so you can get the most out of your equipment and keep it running at 100%.

What is efibootmgr and what is it used for?

efibootmgr is a command-line utility commands for Linux that allows you to read and modify the UEFI (Unified Extensible Firmware Interface) boot configuration directly from the operating system. Thanks to this tool you can:

  • See what boot entries you have configured and what order they occupy.
  • Change boot priority to boot Linux sooner, Windows or other system.
  • Add new entries when you install another system or want to launch an alternative kernel.
  • Delete old or erroneous entries that you no longer use or that cause confusion.
  • Enable or disable specific entries according to your needs.

All of this is crucial when you're dual-booting or experimenting with different systems, as the UEFI tends to accumulate entries whenever you install or remove systems. The fine-grained control that efibootmgr offers is especially useful for regaining access to Linux if Windows takes over the boot, or if the boot menu doesn't display all the options correctly.

Prerequisites and basic tips

Before you jump into managing UEFI boot with efibootmgr, there are a few key points you should be clear about to avoid any issues:

  • Your system must boot in UEFI mode, not in BIOS/Legacy mode. efibootmgr only takes effect if the firmware is booting in UEFI.
  • You must have administrator permissions (root or sudo) to manipulate boot entries, since you modify sensitive information on the computer.
  • The EFI partition must be properly mounted (usually in /boot/efi). If it doesn't exist, the system won't be able to handle UEFI booting.
  • Not all UEFIs implement standards equally., so always consult your motherboard's documentation if something doesn't work as expected.
  How to share folders between the virtualized system and the host in VirtualBox

If you have any doubts about whether your computer is in UEFI mode, you can check by running the command: && echo "UEFI" || echo "BIOS".

Installing efibootmgr on different distributions

efibootmgr is usually available on most current Linux distributions, but in case you don't have it installed, here's how to do it depending on your system:

  • Debian, Ubuntu, Linux Mint and similar:
    • sudo apt-get update
    • sudo apt-get install efibootmgr
  • Fedora, CentOS, RHEL:
    • sudo dnf install efibootmgr
  • Arch Linux, Manjaro:
    • sudo pacman -S efibootmgr
  • openSUSE:
    • sudo zypper install efibootmgr
  • Gentoo:
    • emerge sys-boot/efibootmgr

It is advisable to have the EFI partition mounted at /boot/efi before performing any major operations.

View UEFI boot entries and order

The first step to getting started is to see what's currently configured on your computer. Simply run:

sudo efibootmgr

The result will show a list with the boot order (BootOrder), the currently active option (BootCurrent) and all created entries (Boot0000, Boot0001, etc). Each entry has its hexadecimal identifier and a name, sometimes followed by an asterisk if it is active.

If you want more information, the parameter -v It will give you details about the bootloader path, partition type, UUID, and more technical data:

sudo efibootmgr -v

This is the best starting point to understand how your system is configured and what will boot first.

Change the boot order: prioritize your favorite system

Does Linux or Windows always boot earlier and you want to change it? Very easy! You just need to modify the BootOrder so that the entry you prefer appears first.

  • Find out the current order with: sudo efibootmgr
  • For example, if you have BootOrder: 0012,0013,0014 and you want 0014 to be the first:
sudo efibootmgr -o 0014,0012,0013

And that's it! The next reboot will start with the entry you're most interested in.

Always remember to use identifiers as they appear in the list, and separate them with commas.

  Top 5 Video Codec Packs for Windows 10 to Play All File Formats

Create a new UEFI boot entry

This is especially useful if you've installed a new distribution or alternative kernel and it doesn't appear in the boot menu. To create a new entry you need:

  • The disk number (-d), and the EFI partition (-p).
  • The exact path of the .efi boot loader from the root of the EFI partition (for example, \EFI\ubuntu\grubx64.efi), wearing double backslash.
  • The name you want to give to the new entry (-L).

Basic example to add an entry (adapt the values ​​to your case):

sudo efibootmgr -c -d /dev/sda -p 1 -L "Ubuntu Custom" -l '\EFI\ubuntu\grubx64.efi'

Keep in mind: If your EFI partition was created by another system (such as Windows), the directory may vary (for example, \EFI\Microsoft). You can check the system structure with This tutorial to modify the boot menu timeout and make sure the .efi loader is in the correct place.

If you want to add kernel parameters, you can do so with -u (not all firmware supports it):

sudo efibootmgr -c -d /dev/sda -p 1 -L "Linux Kernel" -l '\EFI\linux\vmlinuz.efi' -u 'root=/dev/sda5'

This is essential when your system doesn't recognize a Linux installation after a major change, or when trying an alternative kernel.

Delete boot entries you no longer use

It's easy to accumulate old entries in UEFI from systems that no longer exist, which can complicate booting. The process to delete them is:

  • First locate the entry identifier with: sudo efibootmgr
  • Then remove the entry using the -b and -B parameters:
sudo efibootmgr -b 0013 -B

This will remove the Boot0013 entry from the UEFI menu. It's immediate and safe if you make sure to delete only the unnecessary entries.

Enable or disable specific boot menu entries

You may want to keep an entry but temporarily disable it (or vice versa), as active entries are marked with an asterisk.

  • To activate an entry: sudo efibootmgr -a -b 0012
  • To disable it: sudo efibootmgr -A -b 0012

This way, you can have multiple boot configurations ready and decide on the fly which one to prioritize.

  Tips to fix the "iTunes Library.itl" error that cannot be learned

Troubleshooting common issues with efibootmgr and UEFI

Managing UEFI boot is sometimes complicated by manufacturer quirks or bugs in the process itself. Here are the most common problems and how to solve them:

  • efibootmgr not working or showing no entries: Confirm that the system has booted in UEFI mode, not Legacy/MBR mode. If you only see one entry, you're probably in legacy BIOS mode.
  • New entries do not appear after creating them: Check that you have used the correct path and backslash format, and that the .efi file exists on the EFI partition.
  • Old entries continue to appear after deleting systems: Remove them manually as explained above, and if they persist, check if there is a system that is restoring the configuration at every boot (some manufacturers add their own tools).
  • Your system always boots to Windows and does not show Linux: BootOrder probably isn't prioritizing your distribution's entry. Use efibootmgr -o to reset it.
  • Black screen when booting or “grub>” message after installing Linux: You can temporarily boot with the "configfile" command at the GRUB prompt to load the configuration, then check the boot order with efibootmgr and reinstall GRUB if necessary.
  • The command gives a permission error or access denied: Check that you are running as root/sudo and that the EFI partition is mounted.

If none of this works, tools like boot-repair in live mode can help you rebuild your EFI settings automatically.

Modify the boot menu timeout-6
Related article:
How to Change the Boot Menu Timeout in Windows and Linux