LinuxCommandLibrary

dmidecode

Decode system's DMI (SMBIOS) table data

TLDR

Show all DMI table contents

$ sudo dmidecode
copy

Show the BIOS version
$ sudo dmidecode [[-s|--string]] bios-version
copy

Show the system's serial number
$ sudo dmidecode [[-s|--string]] system-serial-number
copy

Show BIOS information
$ sudo dmidecode [[-t|--type]] bios
copy

Show CPU information
$ sudo dmidecode [[-t|--type]] processor
copy

Show memory information
$ sudo dmidecode [[-t|--type]] memory
copy

SYNOPSIS

dmidecode [OPTION]...

PARAMETERS

-d, --dev-mem FILE
    Read DMI data from memory device FILE (default: /dev/mem)

-h, --help
    Display usage message and exit

-q, --quiet
    Suppress error messages; BIOS info only

-s, --string KEYWORD
    Show value of specific DMI string (e.g., system-uuid)

-t, --type TYPE
    Display only structures of given type (e.g., 0, bios)

-u, --dump
    Dump raw hexadecimal DMI data without decoding

-v, --version
    Print version information

DESCRIPTION

dmidecode is a Linux command-line tool that retrieves and decodes the system's Desktop Management Interface (DMI) or SMBIOS tables from physical memory, presenting hardware inventory in readable text format. These tables, provided by the BIOS/UEFI firmware, contain static details on components like CPU, memory modules, motherboard, chassis, BIOS version, serial numbers, UUIDs, and more.

Primarily used by system administrators, hardware diagnosticians, and support teams, it enables quick hardware profiling without disassembly or vendor-specific software. Output is organized by SMBIOS structure types (e.g., Type 0: BIOS, Type 1: System, Type 4: Processor), showing handle references, sizes, and decoded fields. Vendor-specific extensions may add custom data.

Accessing /dev/mem requires root privileges; modern kernels may restrict it via lockdown or memfd. Poorly implemented BIOS can yield incomplete or inaccurate info. Alternatives like dmidecode in user-space or efibootmgr complement it for dynamic queries.

CAVEATS

Requires root privileges to read /dev/mem. Kernel security (e.g., lockdown) may block access; use --dev-mem=/dev/crash as workaround. BIOS quality affects data accuracy and completeness. Not for runtime/dynamic hardware info.

COMMON TYPES

0=bios, 1=system, 2=baseboard, 3=chassis, 4=processor, 16=physical-memory-array, 17=memory-device, 19=onboard-devices

STRING KEYWORDS

bios-vendor, system-uuid, processor-version, memory-serial-number, chassis-type (vendor-specific allowed)

HISTORY

Written by Jean Delvare in 2002 for lm_sensors project. Evolved to support SMBIOS 3.x; maintained independently. Widely packaged in distros since early 2000s for hardware probing.

SEE ALSO

lshw(1), lspci(8), lscpu(1), hwinfo(1), inxi(1)

Copied to clipboard