$linuxjunkies
>

bootctl(1)

Manage the EFI boot loader and boot environment on systemd-boot systems.

UbuntuDebianFedoraArch

Synopsis

bootctl [OPTIONS...] COMMAND

Description

bootctl is a command-line utility for managing EFI boot entries and the systemd-boot bootloader. It allows you to query boot loader status, list available boot entries, set default and next-boot targets, and manage boot loader installations on EFI systems.

This tool operates on EFI firmware boot variables and the systemd-boot configuration, making it essential for systems using systemd-boot instead of GRUB. It requires EFI firmware and root privileges for most operations.

Common options

FlagWhat it does
-p, --print-esp-pathPrint the path to the EFI System Partition (ESP) and exit
-x, --print-boot-pathPrint the path to the XBOOTLDR partition and exit
--no-pagerDo not pipe output into a pager
--gracefulDo not fail if EFI firmware or boot entries are not available
-q, --quietSuppress output messages
--make-machine-id-directory=yes|no|autoCreate a machine-specific boot directory when installing
--entry-token-type=auto|literal|machine-id| uuidSpecify how to identify the installed boot loader
-H, --json=prettyOutput status information in JSON format

Examples

Display the current boot loader status, including firmware, ESP location, and installed boot loader version

bootctl status

List all available boot entries and their configured options

bootctl list

Install or update the systemd-boot bootloader to the EFI System Partition

sudo bootctl install

Set the default boot entry to the saved/persistent selection

bootctl set-default @saved

Configure the system to boot into the 'Linux' entry only on the next boot

bootctl set-oneshot 'Linux'

Remove the systemd-boot bootloader from the EFI System Partition

sudo bootctl remove

Print the path to the EFI System Partition without additional information

bootctl -p

Output boot loader status in formatted JSON for parsing by scripts

bootctl --json=pretty status

Related commands