The Linux dmidecode command: firmware information and BIOS

Introduction

In the world of Linux system management, knowing the details of hardware and firmware is essential for diagnostic, updating and capacity planning. The commanddmidecodeis positioned as a key tool to extract information directly from the BIOS / UEFI Desktop Management Interface, providing a clear and structured look at components such as the base plate, processor, memory and more.

What is dmidecode?

dmidecode is a command line utility that interprets the DMI table and presents it in readable format for humans. It does not require special privileges for its execution, although some sensitive fields may need root permits. The information comes from the system firmware, so it reflects what the manufacturer has programmed in the non-volatile memory of the base plate.

Installation

In most Linux distributions, dmidecode comes pre-installed. If missing, it can be easily added from the official repositories:

  • Debian / Ubuntu:sudo apt-get install dmidecode
  • Fedora:sudo dnf install dmidecode
  • Arch Linux:sudo pacman -S dmidecode

After installation, the command is immediately available at any terminal.

Basic use

Run dmidecode without arguments shows the entire DMI table:

sudo dmidecode

The output can be extensive; therefore, it is common to filter by type of information using the option-tfollowed by the number or name of the type.

Most commonly used types of information

The DMI types are numbered and each corresponds to a hardware category. Some of the most relevant are:

  • Type 0: BIOS information
  • Type 1: System information (base plate, manufacturer, serial number)
  • Type 2: Base plate information
  • Type 3: Chassis information
  • Type 4: processor information
  • Type 5: Memory Controller Information
  • Type 6: Information on memory modules
  • Type 7: Cache information
  • Type 17: Information on physical memory modules (RAM)
  • Type 19: Expansion Slots Information
  • Type 32: Information of the boot system
  • Type 41: Information on the feed components

For example, to see only the processor data is run:

sudo dmidecode -t 4

Practical examples

Get the serial number of the base plate:

sudo dmidecode -t 2 | grep -i 'serial'

List RAM memory capacity and speed:

sudo dmidecode -t 6 | grep -E 'Size|Speed'

See the BIOS version:

sudo dmidecode -t 0 | grep -i 'version'

Show all information in readable format for scripts:

sudo dmidecode -q

The modifier-q(quiet) removes headers of each type, facilitating processing with tools such asawkorsed.

Security considerations

Although dmidecode only reads information, some data such as serial numbers or UUID can be sensitive in high-security environments. It is recommended to restrict its use to users of confidence or throughsudowith specific policiessudoers. In addition, in virtual machines, the DMI table can reflect the configuration of the hyperviewer rather than the physical hardware, so the results should be interpreted in that context.

Conclusion

dmidecode is an essential tool for system administrators who need to access reliable firmware and hardware data without using proprietary utilities or restart the machine. Its simple syntax, the ability to filter by type and the legible output make it a quick solution for inventory, diagnosis and update planning. Integrating dmidecode into monitoring scripts or audit processes ensures that you always have a clear and up-to-date view of the physical status of servers and workstations under management.

This work is under aCreative Commons License Attribution 4.0 International for Francesc Roig francesc @ vivaldi.net.

EnglishenEnglishEnglish