Sometime it’s necessary to check BIOS, UEFI, or motherboard information, mostly for hardware upgrade and troubleshooting purpose. Its possible to get those information by checking the hardware manufacturer’s site, but doing so could be a pain.
In a Linux system it’s easy to find bios version, get the Linux uefi related information, motherboard serial number with the
dmidecode command. There is another command
biosdecode to check Linux bios info.
The dmidecode and biosdecode commands are Linux distro independent and preinstalled in most of them, lets start !
A little about the dmidecode command
DMI stands for Desktop Management Interface, legacy version of SMBIOS system management interface, developed by the DMTF (Desktop Management Task Force).
The command parses the
/sys directory and RAM for DMI and SMBIOS related information and prints them in a human readable format. The command requires root privilege.
This will return every available hardware information, we just need to filter that result.
Filtering the result with DMI type
- -type command line switch is used to display information about the selected DMI type only. Example
sudo dmidecode -t 0
The above command will show only dmidecode Linux BIOS version.
Few useful DMI types
- 0 for BIOS version, BIOS vendor etc.
- 1 for OEM hardware information, serial number etc.
- 2 for motherboard related information.
- 3 for hardware chassis related information.
- 4 for CPU related details.
- 9 for available expansion slots.
- 17 for available RAM slots and connected RAMs.
- 10 for on board devices.
- 22 for batteries, if available.
- 27 cooling fan, thermal management.
There are many other DMI/SMBIOS type, it’s better to check the man page
Checking the dmidecode Linux BIOS related information
The BIOS related information is available with dmi type 0 and dmi type 13, the type 13 for BIOS language support.
sudo dmidecode -t 0 sudo dmidecode -t 13
# dmidecode 3.0 Getting SMBIOS data from sysfs. SMBIOS 2.7 present. Handle 0x0000, DMI type 0, 24 bytes BIOS Information Vendor: Acer Version: V1.05 Release Date: 06/08/2011 ROM Size: 2560 kB Characteristics: PCI is supported BIOS is upgradeable BIOS shadowing is allowed Boot from CD is supported Selectable boot is supported EDD is supported Japanese floppy for NEC 9800 1.2 MB is supported 8042 keyboard services are supported (int 9h) CGA/mono video services are supported (int 10h) ACPI is supported USB legacy is supported BIOS boot specification is supported Targeted content distribution is supported UEFI is supported BIOS Revision: 5.240
Checking motherboard serial number with dmidecode
This could be done by selecting the dmi type 1 or by directly quarrying the system-serial-number string.
sudo dmidecode -s system-serial-number
This command will return the motherboard dmidecode serial number directly. Another example is selecting the dmi type and stripping the result with
sudo dmidecode -t 1 | grep 'Serial Number:'
Other useful commands to get BIOS, UEFI related information
There are some other commands to get those info, namely biosdecode, vpddecode and ownership.
biosdecodecommand works for almost every hardware, but less informative.
vpddecodecommand for IBM and Lenovo hardware only, the vpd stands for vital product data .
ownershipcommand is for only Compaq hardware, to get Compaq specific ownership tag info.
Hope this will help you to know the basic hardware configuration of your PC. Don’t hesitate to drop comments if you have any suggestion, question or just say hello. Don’t forget to share this with your friends too !