{"id":18806,"date":"2023-09-19T21:50:53","date_gmt":"2023-09-19T18:50:53","guid":{"rendered":"https:\/\/kifarunix.com\/?p=18806"},"modified":"2024-03-10T10:52:02","modified_gmt":"2024-03-10T07:52:02","slug":"quickly-check-if-linux-system-is-using-bios-or-uefi","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/quickly-check-if-linux-system-is-using-bios-or-uefi\/","title":{"rendered":"Quickly Check If Linux System is Using BIOS or UEFI"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1063\" height=\"599\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/Linux-find-out-uefi-bios.png\" alt=\"Quickly Check If Linux System is Using BIOS or UEFI\" class=\"wp-image-18813\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/Linux-find-out-uefi-bios.png?v=1695148955 1063w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/09\/Linux-find-out-uefi-bios-768x433.png?v=1695148955 768w\" sizes=\"(max-width: 1063px) 100vw, 1063px\" \/><\/figure>\n\n\n\n<p>Is your Linux system in BIOS or UEFI mode? Don&#8217;t worry, this guide will show you quick ways to check if Linux system is using BIOS or UEFI. BIOS (<em>Basic Input\/Output System<\/em>) or <a href=\"https:\/\/uefi.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">UEFI<\/a> (<em>Unified Extensible Firmware Interface<\/em>) are two different firmware interfaces that are used to boot up a computer. BIOS is the older interface, while UEFI is the newer interface. Most modern computers use UEFI, but some older computers may still be using BIOS.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#checking-if-linux-system-is-using-bios-or-uefi\">Checking If Linux System is Using BIOS or UEFI<\/a><ul><li><a href=\"#check-the-sys-firmware-efi-directory\">Check the \/sys\/firmware\/efi directory<\/a><\/li><li><a href=\"#check-the-linux-partitioning-scheme\">Check the Linux Partitioning Scheme<\/a><ul><li><a href=\"#using-parted-command\">Using parted command<\/a><\/li><li><a href=\"#using-gdisk-command\">Using gdisk command<\/a><\/li><li><a href=\"#using-fdisk-command\">Using fdisk command<\/a><\/li><\/ul><\/li><li><a href=\"#check-from-system-dmi-smbios-table-using-dmidecode\">Check from System DMI\/SMBIOS table using dmidecode<\/a><\/li><li><a href=\"#check-from-kernel-startup-log-using-dmesg-command\">Check from kernel startup log using dmesg command<\/a><\/li><li><a href=\"#check-from-the-boot-menu\">Check from the Boot Menu<\/a><\/li><li><a href=\"#other-tutorials\">Other Tutorials<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"checking-if-linux-system-is-using-bios-or-uefi\">Checking If Linux System is Using BIOS or UEFI<\/h2>\n\n\n\n<p>So, how can you know if Linux system is using BIOS or UEFI?<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"check-the-sys-firmware-efi-directory\">Check the <code>\/sys\/firmware\/efi<\/code> directory<\/h3>\n\n\n\n<p>From the Linux terminal, run the command below to check if the <code>\/sys\/firmware\/efi<\/code> is present on your system.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls -d \/sys\/firmware\/efi<\/code><\/pre>\n\n\n\n<p>This directory is usually only present in the systems using UEFI. Therefore, if it exists, it means your system is using UEFI. Otherwise, it&#8217;s likely using BIOS.<\/p>\n\n\n\n<p>See sample output from two different systems;<\/p>\n\n\n\n<p>System using BIOS;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls -d \/sys\/firmware\/efi<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>ls: cannot access '\/sys\/firmware\/efi': No such file or directory<\/code><\/pre>\n\n\n\n<p>On UEFI systems;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls -d \/sys\/firmware\/efi<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\/sys\/firmware\/efi<\/code><\/pre>\n\n\n\n<p>You can also simplify your command as follows;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91; -d \/sys\/firmware\/efi ] &amp;&amp; echo \"UEFI\" || echo \"BIOS\"<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"check-the-linux-partitioning-scheme\">Check the Linux Partitioning Scheme<\/h3>\n\n\n\n<p>There are two main types of partitioning schemes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Master Boot Record (MBR)<\/strong>: MBR is the older partitioning scheme and is supported by all BIOS-based computers.<\/li>\n\n\n\n<li><strong>GUID Partition Table (GPT)<\/strong>: GPT is the newer partitioning scheme and is supported by all UEFI-based computers. It is however possible that BIOS based systems use GPT.<\/li>\n<\/ul>\n\n\n\n<p>Thus, you can simply use commands such as <strong>parted<\/strong> or <strong>gdisk<\/strong> or <strong>fdisk<\/strong> to find out if the system is using BIOS or UEFI.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"using-parted-command\">Using <strong>parted<\/strong> command<\/h4>\n\n\n\n<p>You can use parted command to determine if the Linux system is using using BIOS or UEFI.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo parted \/dev\/&lt;device&gt; p<\/code><\/pre>\n\n\n\n<p>Where <strong><code>&lt;device&gt;<\/code><\/strong> can be <strong><code>vd{a,b,c...}<\/code><\/strong>, or <strong><code>sd{a,b,c...}<\/code><\/strong> e.t.c.<\/p>\n\n\n\n<p>For example;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo parted \/dev\/vda p<\/code><\/pre>\n\n\n\n<p>Sample output for BIOS based system, see Flags section (<strong>bios_grub<\/strong>);<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>Model: Virtio Block Device (virtblk)\nDisk \/dev\/vda: 118GB\nSector size (logical\/physical): 512B\/512B\nPartition Table: gpt\nDisk Flags: \n\nNumber  Start   End     Size    File system  Name  Flags\n 1      1049kB  2097kB  1049kB                     <strong>bios_grub<\/strong>\n 2      2097kB  1881MB  1879MB  ext4\n 3      1881MB  118GB   116GB\n<\/code><\/pre>\n\n\n\n<p>Sample output for UEFI based system;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>Model: Virtio Block Device (virtblk)\nDisk \/dev\/vda: 107GB\nSector size (logical\/physical): 512B\/512B\nPartition Table: gpt\nDisk Flags: \n\nNumber  Start   End     Size    File system  Name  Flags\n 1      1049kB  1128MB  1127MB  fat32              <strong>boot, esp<\/strong>\n 2      1128MB  3276MB  2147MB  ext4\n 3      3276MB  107GB   104GB\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"using-gdisk-command\">Using <strong>gdisk<\/strong> command<\/h4>\n\n\n\n<p>You can use gdisk command to determine if Linux system is using BIOS or UEFI as follows;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo gdisk -l \/dev\/&lt;device&gt;<\/code><\/pre>\n\n\n\n<p>Where <strong><code>&lt;device&gt;<\/code><\/strong> can be <strong><code>vd{a,b,c...}<\/code><\/strong>, or <strong><code>sd{a,b,c...}<\/code><\/strong> e.t.c.<\/p>\n\n\n\n<p>For example;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo gdisk -l \/dev\/vda<\/code><\/pre>\n\n\n\n<p>Check the <strong>Code<\/strong> field for the values, EF00 and EF02.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If you see the code <code><strong>EF00<\/strong><\/code>, it indicates that the partition has the &#8220;EFI System Partition&#8221; (ESP) attribute set. This is a strong indicator that the partition is used for UEFI booting.<\/li>\n\n\n\n<li>If you see the code <code><strong>EF02<\/strong><\/code>, it represents a BIOS boot partition<\/li>\n<\/ul>\n\n\n\n<p>Sample output for EFI system;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>GPT fdisk (gdisk) version 1.0.8\n\nPartition table scan:\n  MBR: protective\n  BSD: not present\n  APM: not present\n  GPT: present\n\nFound valid GPT with protective MBR; using GPT.\nDisk \/dev\/vda: 209715200 sectors, 100.0 GiB\nSector size (logical\/physical): 512\/512 bytes\nDisk identifier (GUID): AF42249F-263F-40FD-93B3-301C8727B9ED\nPartition table holds up to 128 entries\nMain partition table begins at sector 2 and ends at sector 33\nFirst usable sector is 34, last usable sector is 209715166\nPartitions will be aligned on 2048-sector boundaries\nTotal free space is 4029 sectors (2.0 MiB)\n\nNumber  Start (sector)    End (sector)  Size       Code  Name\n   1            2048         2203647   1.0 GiB     <strong>EF00<\/strong>  \n   2         2203648         6397951   2.0 GiB     8300  \n   3         6397952       209713151   96.9 GiB    8300 \n<\/code><\/pre>\n\n\n\n<p>Sample output for BIOS system;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>GPT fdisk (gdisk) version 1.0.8\n\nPartition table scan:\n  MBR: protective\n  BSD: not present\n  APM: not present\n  GPT: present\n\nFound valid GPT with protective MBR; using GPT.\nDisk \/dev\/vda: 230686720 sectors, 110.0 GiB\nSector size (logical\/physical): 512\/512 bytes\nDisk identifier (GUID): 28658D22-F7C9-45F7-A38A-1A0D7EE63AA2\nPartition table holds up to 128 entries\nMain partition table begins at sector 2 and ends at sector 33\nFirst usable sector is 34, last usable sector is 230686686\nPartitions will be aligned on 2048-sector boundaries\nTotal free space is 2014 sectors (1007.0 KiB)\n\nNumber  Start (sector)    End (sector)  Size       Code  Name\n   1            2048            4095   1024.0 KiB  <strong>EF02<\/strong>  \n   2            4096         3674111   1.8 GiB     8300  \n   3         3674112       230686686   108.2 GiB   8300 \n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"using-fdisk-command\">Using <strong>fdisk<\/strong> command<\/h4>\n\n\n\n<p>Similarly, you can find out about BIOS or UEFI using <strong>fdisk<\/strong> command.<\/p>\n\n\n\n<p>You can use gdisk command to find out if Linux system is using BIOS or UEFI as follows;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo fdisk -l \/dev\/&lt;device&gt;<\/code><\/pre>\n\n\n\n<p>Where <strong><code>&lt;device&gt;<\/code><\/strong> can be <strong><code>vd{a,b,c...}<\/code><\/strong>, or <strong><code>sd{a,b,c...}<\/code><\/strong> e.t.c.<\/p>\n\n\n\n<p>For example;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo fdisk -l \/dev\/vda<\/code><\/pre>\n\n\n\n<p>Check the <strong>Type<\/strong> column.<\/p>\n\n\n\n<p>BIOS based systems output (Type: <strong>BIOS boot<\/strong>);<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>Disk \/dev\/vda: 110 GiB, 118111600640 bytes, 230686720 sectors\nUnits: sectors of 1 * 512 = 512 bytes\nSector size (logical\/physical): 512 bytes \/ 512 bytes\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\nDisklabel type: gpt\nDisk identifier: 28658D22-F7C9-45F7-A38A-1A0D7EE63AA2\n\nDevice       Start       End   Sectors   Size Type\n\/dev\/vda1     2048      4095      2048     1M <strong>BIOS boot<\/strong>\n\/dev\/vda2     4096   3674111   3670016   1.8G Linux filesystem\n\/dev\/vda3  3674112 230686686 227012575 108.2G Linux filesystem\n<\/code><\/pre>\n\n\n\n<p>UEFI based systems output (Type: <strong>EFI system<\/strong>);<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>Disk \/dev\/vda: 100 GiB, 107374182400 bytes, 209715200 sectors\nUnits: sectors of 1 * 512 = 512 bytes\nSector size (logical\/physical): 512 bytes \/ 512 bytes\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\nDisklabel type: gpt\nDisk identifier: AF42249F-263F-40FD-93B3-301C8727B9ED\n\nDevice       Start       End   Sectors  Size Type\n\/dev\/vda1     2048   2203647   2201600    1G <strong>EFI System<\/strong>\n\/dev\/vda2  2203648   6397951   4194304    2G Linux filesystem\n\/dev\/vda3  6397952 209713151 203315200 96.9G Linux filesystem\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"check-from-system-dmi-smbios-table-using-dmidecode\">Check from System DMI\/SMBIOS table using dmidecode<\/h3>\n\n\n\n<p>You can check if the Linux system is using BIOS or UEFI from the desktop management interface using <strong>dmidecode<\/strong> command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dmidecode -t 0<\/code><\/pre>\n\n\n\n<p>Sample output from BIOS;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code># dmidecode 3.3\nGetting SMBIOS data from sysfs.\nSMBIOS 2.8 present.\n\nHandle 0x0000, DMI type 0, 24 bytes\nBIOS Information\n\t<strong>Vendor: SeaBIOS<\/strong>\n\tVersion: 1.16.2-debian-1.16.2-1\n\tRelease Date: 04\/01\/2014\n\tAddress: 0xE8000\n\tRuntime Size: 96 kB\n\tROM Size: 64 kB\n\tCharacteristics:\n\t\tBIOS characteristics not supported\n\t\tTargeted content distribution is supported\n\tBIOS Revision: 0.0\n<\/code><\/pre>\n\n\n\n<p>Sample output from EFI system;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code># dmidecode 3.3\nGetting SMBIOS data from sysfs.\nSMBIOS 2.8 present.\n\nHandle 0x0000, DMI type 0, 26 bytes\nBIOS Information\n\t<strong>Vendor: EFI Development Kit II \/ OVMF<\/strong>\n\tVersion: 0.0.0\n\tRelease Date: 02\/06\/2015\n\tAddress: 0xE8000\n\tRuntime Size: 96 kB\n\tROM Size: 64 kB\n\tCharacteristics:\n\t\tBIOS characteristics not supported\n\t\tTargeted content distribution is supported\n\t\tUEFI is supported\n\t\tSystem is a virtual machine\n\tBIOS Revision: 0.0\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"check-from-kernel-startup-log-using-dmesg-command\">Check from kernel startup log using dmesg command<\/h3>\n\n\n\n<p>You can also check from the kernel startup logs;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dmesg | grep  \"EFI v\"<\/code><\/pre>\n\n\n\n<p>If there is a hit, then the system is UEFI based. If no hit, then it is most likely BIOS.<\/p>\n\n\n\n<p>Sample output;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;    0.000000] efi: EFI v2.70 by EDK II<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"check-from-the-boot-menu\">Check from the Boot Menu<\/h3>\n\n\n\n<p>You can also check from the system boot menu. Restart your computer and access the boot menu during the boot process to confirm whether it is using UEFI or BIOS.<\/p>\n\n\n\n<p>And that is it! You have how to check if Linux system is using BIOS or UEFI.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"other-tutorials\">Other Tutorials<\/h3>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/how-to-create-lvm-logical-volumes-in-linux\/\" target=\"_blank\" rel=\"noreferrer noopener\">Create LVM Logical Volumes in Linux<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/shrink-kvm-virtual-machine-lvm-partitioned-disk\/\" target=\"_blank\" rel=\"noreferrer noopener\">Shrink KVM Virtual Machine LVM Partitioned Disk<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Is your Linux system in BIOS or UEFI mode? Don&#8217;t worry, this guide will show you quick ways to check if Linux system is using<\/p>\n","protected":false},"author":10,"featured_media":18813,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,49],"tags":[7243,7245,7244],"class_list":["post-18806","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","category-command-cheatsheets","tag-check-if-linux-is-using-uefi-or-bios","tag-how-do-i-know-if-i-am-using-uefi-or-bios","tag-linux-bios-or-uefi","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/18806"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=18806"}],"version-history":[{"count":8,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/18806\/revisions"}],"predecessor-version":[{"id":20845,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/18806\/revisions\/20845"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/18813"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=18806"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=18806"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=18806"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}