How do I determine whether a particular running Ubuntu system was booted using EFI/UEFI, or BIOS?
The easiest way is to check to see if
It's very easy to tell if a system was booted in EFI (or not, in which case it must be BIOS):
Example of bash script usage based on grep's exit code:
... dmesg | grep -q "EFI v" # -q tell grep to output nothing if [ $? -eq 0 ] # check exit code; if 0 EFI, else BIOS then echo "You are using EFI boot." else echo "You are using BIOS boot" fi ...