Have you ever wondered about how your computer boots into Linux?
Am I using EFI or Legacy BIOS?
Does my BIOS support TPM? TPM2?
Does my computer support secure boot? Am I using secure boot?
What boot loader am I using currently?
What is my default boot loader?
Which initramfs am I using?
Have you ever noticed, when you go into your UEFI boot options, it will list the name of the
distro's you have booted from at least once. Where did it get that info?
Now of course there are multiple ways to find these things out.
You can always boot into the UEFI/BIOS and see some of these things for yourself if you know where to look and what to look for.
But that's sometimes inconvenient to do every time I want to get a little info.
So Use the bootctl command
It's very easy to use.
Note: This only works on EFI systems. If it doesn't work, you're probably booted using Legacy BIOS.
There are some flags that will give you more specific information, You can use help to see them.
But if you don't add an option flag, it shows you pretty much everything.
On my distro, this partially runs as any user, but I do get some errors.
If I sudo or run as root, then I get no errors.
One thing I found interesting here. This command will show you where your UEFI
expects the path of your bootloader to be. Believe it or not, not all Linux distro's
use these default directories. It still works, but adds a second or two to your boot time
while your computer figures it out.
Am I using EFI or Legacy BIOS?
Does my BIOS support TPM? TPM2?
Does my computer support secure boot? Am I using secure boot?
What boot loader am I using currently?
What is my default boot loader?
Which initramfs am I using?
Have you ever noticed, when you go into your UEFI boot options, it will list the name of the
distro's you have booted from at least once. Where did it get that info?
Now of course there are multiple ways to find these things out.
You can always boot into the UEFI/BIOS and see some of these things for yourself if you know where to look and what to look for.
But that's sometimes inconvenient to do every time I want to get a little info.
So Use the bootctl command
It's very easy to use.
Code:
bootctl
Note: This only works on EFI systems. If it doesn't work, you're probably booted using Legacy BIOS.
There are some flags that will give you more specific information, You can use help to see them.
Code:
bootctl --help
But if you don't add an option flag, it shows you pretty much everything.
On my distro, this partially runs as any user, but I do get some errors.
If I sudo or run as root, then I get no errors.
One thing I found interesting here. This command will show you where your UEFI
expects the path of your bootloader to be. Believe it or not, not all Linux distro's
use these default directories. It still works, but adds a second or two to your boot time
while your computer figures it out.
Last edited: