The dmidecode command in Linux: firmware and BIOS information

Introduction

In the world of Linux system administration, knowing the details of hardware and firmware is essential for diagnostic, upgrade, and capacity planning tasks. The dmidecode command positions itself as a key tool for extracting information directly from the DMI (Desktop Management Interface) table of the BIOS/UEFI, providing a clear and structured view of components such as the motherboard, processor, memory, and more.

What is dmidecode?

dmidecode is a command-line utility that interprets the DMI table and presents it in a human-readable format. It does not require special privileges to run, although some sensitive fields may need root permissions. The information comes from the system firmware, so it reflects what the manufacturer has programmed into the motherboard’s non-volatile memory.

Installation

In most Linux distributions, dmidecode comes preinstalled. If it is 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 in any terminal.

Basic Usage

Running dmidecode without arguments displays the entire DMI table:

sudo dmidecode

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

Most Used Information Types

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 (motherboard, manufacturer, serial number)
  • Type 2: Base Board Information
  • Type 3: Chassis Information
  • Type 4: Processor Information
  • Type 5: Memory Controller Information
  • Type 6: Memory Module Information
  • Type 7: Cache Information
  • Type 17: Physical Memory Array Information
  • Type 19: Slot Information
  • Type 32: System Boot Information
  • Type 41: Power Supply Information

For example, to view only the processor data, execute:

sudo dmidecode -t 4

Practical Examples

Get the motherboard serial number:

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

List the capacity and speed of RAM memory:

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

View the BIOS version:

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

Display all information in a script-friendly format:

sudo dmidecode -q

The -q (quiet) modifier removes the

This post is also available in ESPAÑOL.

Leave a Reply

Your email address will not be published. Required fields are marked *

Esta obra está bajo una Licencia Creative Commons Atribución 4.0 Internacional para Francesc Roig francesc@vivaldi.net .