Linux Find Out BIOS Version Using a Command Line Option nixCraft Updated Tutorials/Posts

How do I find out BIOS version using a Linux command line option? How do I check the motherboard BIOS version using Linux command line option?

To find out BIOS version under Linux operating systems use the dmidecode command which is a tool to analyze BIOS data. You must log in as root user to run dmidecode command.

Tutorial details
Difficulty level Easy
Root privileges Yes
Requirements dmidecode on Linux
bash for loop example to get more info:

for d in system-manufacturer system-product-name bios-release-date bios-version
do echo "${d^} : " $(sudo dmidecode -s $d)
done
Linux Find Out BIOS Version using dmidecode commandLinux Find Out BIOS Version using dmidecode command

Use the dmidecode command on Linux to find out BIOS version, release date and more

It is possible to print all bios related info using the following syntax too:
sudo dmidecode --type bios
Sample outputs:

# dmidecode 3.1
Getting SMBIOS data from sysfs.
SMBIOS 3.0.0 present.
 
Handle 0x0000, DMI type 0, 24 bytes
BIOS Information Vendor: American Megatrends Inc. Version: GL702ZC.305 Release Date: 05/10/2018 Address: 0xF0000 Runtime Size: 64 kB ROM Size: 16 MB Characteristics: PCI is supported BIOS is upgradeable BIOS shadowing is allowed Boot from CD is supported Selectable boot is supported BIOS ROM is socketed EDD is supported 5.25"/1.2 MB floppy services are supported (int 13h) 3.5"/720 kB floppy services are supported (int 13h) 3.5"/2.88 MB floppy services are supported (int 13h) Print screen service is supported (int 5h) Serial services are supported (int 14h) Printer services are supported (int 17h) ACPI is supported USB legacy is supported Smart battery is supported BIOS boot specification is supported Targeted content distribution is supported UEFI is supported BIOS Revision: 5.12

Finding Thinkpad X1 laptop BIOS firmware version

Simply run:

for d in system-manufacturer system-product-name bios-release-date bios-version
do echo "${d^} : " $(sudo dmidecode -s $d)
done

Here is what I see:

[sudo] password for vivek: System-manufacturer : LENOVO
System-product-name : 20QVCTO1WW
Bios-release-date : 02/18/2021
Bios-version : N2OET51W (1.31 )

How to update BIOS version on Thinkpad

You can grab the cab file for your model from Llenovo.com and then run it as follows:
$ sudo fwupdmgr install N2OET52W.cab

Decompressing… [***************************************]
Authenticating… [ - ]
Authenticating… [***************************************]
Installing on System Firmware… ]
Scheduling… [***************************************]
Successfully installed firmware
 
An update requires a reboot to complete. Restart now? [y|N]: y

Getting BIOS and other information using the /sys/class/dmi/id/

Try the cat command as follows:
cat /sys/class/dmi/id/bios_version
ls -l /sys/class/dmi/id/

Then bash for loop as follows:

for i in board_vendor board_version bios_vendor bios_version
do echo "${i^} : " $(</sys/class/dmi/id/$i)
done

Conclusion

The dmidecode command summarizes information about your system’s hardware (laptop/desktop/server) as described in your system BIOS. It works with i386, x86-64, ia64 and arm64. For more info see the official project homepage here.

ADVERTISEMENT

Posted by Contributor