dmidecode Command in Linux: BIOS, Serial, Memory & CPU (Debian/Ubuntu)

dmidecode reads SMBIOS/DMI tables from firmware and prints hardware inventory: BIOS version, system vendor and serial, board, chassis, processor, and memory layout on Linux.

Published

Updated

Read time 8 min read

Reviewed byDeepak Prasad

dmidecode Command in Linux: BIOS, Serial, Memory & CPU (Debian/Ubuntu)
About dmidecode reads SMBIOS/DMI tables from firmware and prints hardware inventory: BIOS version, system vendor and serial, board, chassis, processor, and memory layout on Linux.
Tested on Ubuntu 25.04 (Plucky Puffin); dmidecode 3.6; kernel 7.0.0-27-generic
Package dmidecode
Man page dmidecode(8)
Privilege root / sudo on most hosts
Distros

Debian, Ubuntu, RHEL, Fedora, and most Linux distributions (dmidecode package).

Containers and some VMs expose incomplete SMBIOS data.

dmidecode — quick reference

DMI types

Query firmware tables by keyword (aligned with SMBIOS component groups).

When to use Command
Show every decoded DMI entry sudo dmidecode
BIOS firmware vendor, version, and date sudo dmidecode -t bios
System manufacturer, model, serial, UUID sudo dmidecode -t system
Motherboard / baseboard details sudo dmidecode -t baseboard
Chassis type and asset tag sudo dmidecode -t chassis
CPU entries from firmware sudo dmidecode -t processor
Memory arrays and DIMM slots sudo dmidecode -t memory
CPU cache information sudo dmidecode -t cache

Single-field strings

One-line answers for scripts and asset tags.

When to use Command
BIOS version only sudo dmidecode -s bios-version
BIOS release date sudo dmidecode -s bios-release-date
System manufacturer sudo dmidecode -s system-manufacturer
System product / model name sudo dmidecode -s system-product-name
System serial number sudo dmidecode -s system-serial-number
System UUID sudo dmidecode -s system-uuid

Output control

When to use Command
Hide unknown and inactive fields sudo dmidecode -q
List valid type keywords on this build dmidecode --list-types
List valid string keywords dmidecode --list-strings

Dump and offline decode

When to use Command
Save SMBIOS table to a binary file sudo dmidecode --dump-bin file.bin
Decode a saved binary dump sudo dmidecode --from-dump file.bin

Help and version

When to use Command
Show built-in usage text dmidecode --help
Show dmidecode version dmidecode --version

dmidecode — command syntax

Synopsis from dmidecode --help on Ubuntu 25.04 (dmidecode 3.6):

text
Usage: dmidecode [OPTIONS]

Common options: -t, --type TYPE, -s, --string KEYWORD, -q, --quiet, --dump-bin FILE, --from-dump FILE. Data is read from sysfs on modern kernels (/sys/firmware/dmi/).

Most full dumps need sudo because direct firmware access is restricted.


dmidecode — command examples

Essential Read BIOS version for a quick firmware audit

Support tickets and compliance checks often start with the firmware revision. -s prints one field without scrolling the full table.

Run the command:

bash
sudo dmidecode -s bios-version

Sample output:

text
VirtualBox

On physical hardware you will see a vendor-specific version string (for example F42 or 2.17.0).

Essential System manufacturer, model, serial, and UUID

Asset tracking scripts usually need model and serial in a predictable format.

Run the commands:

bash
sudo dmidecode -s system-product-name
sudo dmidecode -s system-serial-number
sudo dmidecode -s system-uuid

Sample output:

text
VirtualBox
VirtualBox-bd8dfb9a-5620-4d80-a653-e1327d964ce7
9afb8dbd-2056-804d-a653-e1327d964ce7

Compare with sudo dmidecode -t system when you need every field in one block.

Essential Full BIOS information block

Use -t bios when you need vendor, version, release date, and characteristics together.

Run the command:

bash
sudo dmidecode -t bios

Sample output:

text
# dmidecode 3.6
Getting SMBIOS data from sysfs.
SMBIOS 2.5 present.

Handle 0x0000, DMI type 0, 20 bytes
BIOS Information
	Vendor: innotek GmbH
	Version: VirtualBox
	Release Date: 12/01/2006
	Address: 0xE0000
	Runtime Size: 128 kB
	ROM Size: 128 kB
	Characteristics:
		ISA is supported
		PCI is supported
		PC Card (PCMCIA) is supported
		BIOS is upgradeable
		BIOS shadowing is allowed
		ESCD support is available
		USB legacy is supported
		ACPI is supported
		Boot from CD is supported
		Selectable boot is supported
		EDD is supported
		Print screen service is supported (int 5h)
		8042 keyboard services are supported (int 9h)
		Serial services are supported (int 14h)
		Printer services are supported (int 17h)
		ACPI is supported
		Smart battery is supported
		BIOS boot specification is supported
		Targeted content distribution is supported

Values come from firmware, not from live kernel probing.

Common Motherboard / baseboard information

Replacement parts and warranty lookups often need board vendor and product strings.

Run the command:

bash
sudo dmidecode -t baseboard

Sample output:

text
# dmidecode 3.6
Getting SMBIOS data from sysfs.
SMBIOS 2.5 present.

Handle 0x0008, DMI type 2, 15 bytes
Base Board Information
	Manufacturer: Oracle Corporation
	Product Name: VirtualBox
	Version: 1.2
	Serial Number: 0
	Asset Tag: Not Specified
	Features:
		Board is a hosting board

Empty or Not Specified fields are common in VMs and budget hardware.

Common Memory arrays and DIMM slots

Plan upgrades by reading how many slots exist and which hold modules.

Run the command:

bash
sudo dmidecode -t memory | head -35

Sample output (truncated):

text
# dmidecode 3.6
Getting SMBIOS data from sysfs.
SMBIOS 2.5 present.

Handle 0x0007, DMI type 16, 23 bytes
Physical Memory Array
	Location: System Board Or Motherboard
	Use: System Memory
	Error Correction Type: None
	Maximum Capacity: 64 GiB
	Error Information Handle: Not Provided
	Number Of Devices: 1

Handle 0x0009, DMI type 17, 40 bytes
Memory Device
	Array Handle: 0x0007
	Error Information Handle: Not Provided
	Total Width: Unknown
	Data Width: Unknown
	Size: 16 GiB
	Form Factor: DIMM
	Set: None
	Locator: DIMM 0
	Bank Locator: BANK 0
	Type: RAM

Look for Size: No Module Installed on empty slots.

Common Cleaner output with -q

Default output includes many Unknown OEM fields. -q hides inactive and unknown entries.

Run the command:

bash
sudo dmidecode -q -t system

Sample output is shorter than the full dump — easier to paste into tickets.

Common Discover supported types and string keys

Keywords vary slightly by dmidecode version — list them on the host you script against.

Run the commands:

bash
dmidecode --list-types | head -10
dmidecode --list-strings | head -10

Sample output:

text
bios
system
baseboard
chassis
processor
memory
cache
connector
bios-vendor
bios-version
bios-release-date
bios-revision
firmware-revision
system-manufacturer
system-product-name
system-version

Use these names with -t and -s in automation.

Advanced Save and decode SMBIOS offline

Capture firmware tables on an air-gapped host, then decode the file elsewhere.

Run the commands:

bash
sudo dmidecode --dump-bin /tmp/dmi.bin
sudo dmidecode --from-dump /tmp/dmi.bin | head -12
rm -f /tmp/dmi.bin

Sample output:

text
# Writing 31 bytes to /tmp/dmi.bin.
# Writing 499 bytes to /tmp/dmi.bin.
# dmidecode 3.6
Reading SMBIOS/DMI data from file /tmp/dmi.bin.
SMBIOS 2.5 present.
10 structures occupying 499 bytes.

Handle 0x0000, DMI type 0, 20 bytes
BIOS Information
	Vendor: innotek GmbH
	Version: VirtualBox
	Release Date: 12/01/2006

Delete the dump file when you are done — it can contain serial numbers.

Advanced Permission and container limitations

Without privileges or without SMBIOS exposed, dmidecode fails or returns little data.

Run without sudo (may fail):

bash
dmidecode -s bios-version 2>&1 || true

Sample output on a restricted host:

text
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied

Inside containers, tables are often missing — run dmidecode on the host for inventory. For live kernel-detected hardware, use lshw or lscpu.


dmidecode — when to use / when not

Use dmidecode when Use something else when
  • You need firmware-reported model, serial, UUID, or BIOS version
  • You are planning RAM upgrades (slot count, populated DIMMs)
  • You want static inventory independent of loaded drivers
  • You are scripting asset tags from -s string keys
  • You need live CPU topology or current frequency → lscpu
  • You want kernel device tree with drivers → lshw
  • You are inside a container without SMBIOS → run on the host
  • You need block device layout → lsblk
  • You need PCI/USB device lists → lspci / lsusb

dmidecode vs lshw

dmidecode lshw
Source Firmware SMBIOS tables Kernel and sysfs
Data age Static at boot/firmware Reflects current detection
Best for Serial, BIOS, slot layout Driver tree, buses, capabilities

Use both when you need firmware identity plus kernel view.


Command One line
dmidecode Firmware SMBIOS inventory (this page)
lsblk Block devices and partitions

Browse the full index in our Linux commands reference.


dmidecode — interview corner

What is dmidecode used for?

dmidecode decodes SMBIOS/DMI tables that firmware exposes. It answers inventory questions: who made the system, BIOS version, serial number, UUID, memory slots, and processor records.

It reports what firmware claims, not necessarily what the kernel is actively using right now.

A strong answer is:

"dmidecode reads SMBIOS firmware tables for hardware inventory — BIOS version, model, serial, memory slots. It's static firmware data, not live kernel state."

Why does dmidecode usually need root?

On many systems the SMBIOS table nodes under /sys/firmware/dmi/ or legacy /dev/mem access are restricted to root for security — the tables can include serial numbers and UUIDs.

Modern dmidecode prefers sysfs but still needs privilege when those nodes are root-only.

A strong answer is:

"SMBIOS data is sensitive and sysfs nodes are often root-only — I run sudo dmidecode on servers for full output."

Does dmidecode work in VMs and containers?

It runs, but the data may be generic or incomplete — hypervisors synthesize SMBIOS (for example VirtualBox as product name). Containers frequently lack tables entirely.

For real hardware inventory, run on the bare-metal host or VM parent, not inside an unprivileged container.

A strong answer is:

"VMs return hypervisor-provided SMBIOS; containers often have nothing useful. I run dmidecode on the host for asset data."

When do you use -t versus -s?

-t selects a whole DMI type (for example all BIOS or memory structures). Good for human review.

-s prints a single string keyword (for example system-serial-number) — ideal for scripts and CMDB hooks.

A strong answer is:

"-t for full sections like memory or bios; -s for one-line scriptable fields like system-uuid or bios-version."

How is dmidecode different from lscpu?

dmidecode reads firmware CPU records (model name, max speed as advertised).

lscpu reads kernel CPU topology: online cores, threads, NUMA, current scaling.

They complement each other — dmidecode for asset labels, lscpu for runtime layout.

A strong answer is:

"dmidecode is firmware inventory; lscpu is kernel CPU topology. I use dmidecode for asset tags and lscpu for live core and NUMA layout."


Troubleshooting

Symptom Likely cause Fix
Permission denied on sysfs Non-root user sudo dmidecode …
All fields Not Specified Generic SMBIOS in VM/container Run on physical host
Invalid keyword for -s Typo or old dmidecode dmidecode --list-strings
Very old or missing data Pre-SMBIOS hardware Cross-check with lshw
Unknown option Flag not in your build dmidecode --help

Rohan Timalsina

is a technical writer and Linux enthusiast who writes practical guides on Linux commands and system administration. He focuses on simplifying complex topics through clear explanations.