Introduction
Customizing Linux boot with efibootmgr is essential for those who want to manage system startup on machines with UEFI firmware in an advanced way. This command-line tool allows you to view, create, modify, or delete EFI boot entries directly from the terminal, without the need to access the BIOS or firmware setup. Whether you want to set a default operating system or rearrange the boot order, efibootmgr gives you complete control over the bootloader.
Install efibootmgr
- Debian/Ubuntu/Linux Mint
sudo apt install efibootmgr
- Fedora, CentOS, RedHat
sudo dnf install efibootmgr
View Boot element
- Open Terminal and type this command
sudo efibootmgr
- You’ll see something like this:

Change Boot order
- Open Terminal and type this command
sudo efibootmgr
- Copy the BootOrder string, for example:
0000,0002,0021,001D,001E,001F,0020,0022,0023,0024,0025,0026
- Type the following command followed by the modified boot order (for example, reversing 0000 and 0002)
sudo efibootmgr -o 0002,0000,0021,001D,001E,001F,0020,0022,0023,0024,0025,0026
Delete Boot element
- Open Terminal and type the following command, entering the boot number (for example, 0002)
sudo efibootmgr -b <bootnum> -B