dmidecode reads SMBIOS/DMI (Desktop Management Interface) tables and prints hardware inventory details such as BIOS, system vendor/model, serial number, baseboard, chassis, CPU, and RAM slot information.
It’s commonly used for:
- Inventory / auditing (model, serial, UUID, BIOS/firmware version)
- Memory planning (slot count, populated DIMMs, max capacity)
- Hardware verification (what the platform reports, independent of drivers)
- Automation (scripts that tag hosts by model/serial, check BIOS versions, etc.)
Note: Many distros require root for full output because dmidecode may need direct access to SMBIOS tables.
dmidecode Quick Reference
dmidecode is used to read SMBIOS/DMI tables exposed by system firmware.
It helps identify BIOS version, hardware model, serial number, CPU, and memory layout on Linux systems.
Command syntax
sudo dmidecode [OPTIONS]
Commonly used options
| Purpose | Command |
|---|---|
| Display complete DMI/SMBIOS information | sudo dmidecode |
| Show BIOS vendor, version, and release date | sudo dmidecode -t bios |
| Show system memory slots and modules | sudo dmidecode -t memory |
| Print a single hardware field | sudo dmidecode -s system-serial-number |
| Hide unknown, inactive, or OEM entries | sudo dmidecode -q |
| Dump decoded SMBIOS data in hexadecimal | sudo dmidecode -u |
| Save raw DMI data to a binary file | sudo dmidecode –dump-bin dmi.bin |
| Read and decode data from a binary dump | sudo dmidecode –from-dump dmi.bin |
dmidecode vs Other Hardware Tools
dmidecode reads firmware-exposed SMBIOS/DMI data, which means it reports what the BIOS/UEFI claims about the hardware, not what the kernel is actively using.
This makes dmidecode ideal for inventory, audits, and asset identification, but less suitable for real-time performance or runtime configuration checks.
When to use dmidecode
Use dmidecode when you need:
- BIOS / UEFI firmware version and release date
- System manufacturer, model, serial number, and UUID
- Motherboard, chassis, and asset-tag information
- Memory slot layout and maximum supported capacity
- Hardware identity independent of drivers or kernel state
dmidecode vs commonly used alternatives
Each of the following tools focuses on runtime kernel information, not firmware tables.
-
lshw
Best for a detailed hardware tree as detected by the kernel, including drivers, capabilities, and device state. -
lscpu
Focuses on CPU architecture and topology, including cores, threads, NUMA nodes, and runtime frequencies. -
lsblk
Lists block devices and storage layout, including disks, partitions, and mount points. -
lspci / lsusb
Show PCI and USB devices detected by the kernel, useful for troubleshooting peripherals and expansion cards. -
inxi
Provides a human-readable system summary, combining CPU, memory, disk, and OS information in a single view.
Key difference to remember
dmidecodeanswers: “What does the firmware report?”- Kernel tools answer: “What is the OS currently using?”
For accurate system analysis, these tools are often used together, not as replacements for one another.
Before You Start
Install dmidecode
Install dmidecode using your distribution’s package manager.
# Ubuntu / Debian
sudo apt update
sudo apt install -y dmidecode
# RHEL / CentOS / Fedora
sudo dnf install -y dmidecode
Why sudo is often required
dmidecode reads firmware-level SMBIOS data from sysfs or physical memory.
Without elevated privileges, access is usually denied.
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied
/dev/mem: Permission denied
Run the command with sudo to retrieve full and accurate hardware details.
dmidecode inside containers
In containers, SMBIOS tables are often not exposed by the host, resulting in empty or incomplete output.
sudo dmidecode
For reliable hardware identification, run dmidecode directly on the host system, not inside a container.
Understanding DMI Types in dmidecode
DMI (Desktop Management Interface) data is organized into types, where each type represents a specific hardware component such as BIOS, system, processor, or memory.
dmidecode allows querying these types using keywords or numeric IDs.
List supported DMI type keywords
This command shows which DMI keywords are supported on your system.
dmidecode --type
If an error indicates that an argument is required, it means dmidecode is displaying the valid keywords available on your platform.
Common DMI keyword to type mapping
The following keywords are most frequently used for hardware inspection:
- bios → type 0 (and sometimes 13)
- system → type 1
- baseboard → type 2
- chassis → type 3
- processor → type 4
- memory → types 16 and 17
- cache → type 7
- connector → type 8
- slot → type 9
Querying Hardware Components by Type
Display all available SMBIOS/DMI information
Displays the entire decoded SMBIOS/DMI table as reported by system firmware.
Useful for full hardware inventory, audits, and troubleshooting when you need all available details.
sudo dmidecode
For easier navigation when the output is large:
sudo dmidecode | less
Display BIOS information
Retrieves BIOS vendor, version, release date, and firmware details, helping verify firmware versions during upgrades or compatibility checks.
sudo dmidecode -t bios
Display system information
Shows system manufacturer, product name, version, serial number, and UUID, commonly used for asset tracking, licensing, and automation.
sudo dmidecode -t system
Display baseboard (motherboard) information
Identifies the motherboard vendor, model, and serial number, useful for hardware replacement, firmware matching, or support cases.
sudo dmidecode -t baseboard
Display chassis information
Reports chassis type, serial number, and asset tag, helping distinguish between desktop, rack, blade, or virtual systems.
sudo dmidecode -t chassis
Display processor (CPU) information
Provides detailed CPU identification, including model name, core count, thread count, and maximum supported speed.
sudo dmidecode -t processor
Inspecting Memory Configuration
Display memory arrays and slots
Displays the maximum supported memory, number of slots, and how DIMMs are arranged across memory banks.
sudo dmidecode -t memory
This helps determine:
- Total RAM slots available on the system
- Which memory slots are populated
- Maximum memory capacity supported by the motherboard
List only populated memory modules
Filters out empty slots and shows only installed DIMMs, making it easier to audit actual memory usage.
sudo dmidecode -t memory | awk 'BEGIN{RS="\n\n"} /Memory Device/ && !/No Module Installed/'
Display memory slot, size, and speed in compact form
Summarizes slot location, module size, and memory speed, useful for quickly validating RAM configuration consistency.
sudo dmidecode -t memory | grep -E 'Locator:|Size:|Speed:|Configured Memory Speed'
Reading Individual DMI Fields Using Strings
Commonly used DMI string queries
These commands return frequently required hardware identifiers in a clean, one-line format.
sudo dmidecode -s bios-version
sudo dmidecode -s bios-release-date
sudo dmidecode -s system-manufacturer
sudo dmidecode -s system-product-name
sudo dmidecode -s system-serial-number
sudo dmidecode -s system-uuid
Get BIOS version
Returns the currently installed BIOS/UEFI firmware version, useful before upgrades or vendor support cases.
sudo dmidecode -s bios-version
Get BIOS release date
Shows the firmware release date, helping determine whether the system is running an outdated BIOS.
sudo dmidecode -s bios-release-date
Get system product name (model)
Identifies the exact hardware model, commonly used for driver compatibility and asset classification.
sudo dmidecode -s system-product-name
Get system serial number
Retrieves the unique hardware serial number, often required for inventory management and warranty tracking.
sudo dmidecode -s system-serial-number
Get system UUID
Displays the globally unique system identifier, widely used in automation, virtualization, and licensing workflows.
sudo dmidecode -s system-uuid
Output Control and Filtering
Filter output using grep or sed
Useful when you need specific identifiers without scrolling through the full DMI table.
Show only the System Information block:
sudo dmidecode -t system | sed -n '/System Information/,$p' | head -n 30
Search for commonly required identifiers such as serial number, UUID, or BIOS:
sudo dmidecode | grep -iE 'serial|uuid|bios|base board|chassis'
Hide unknown or inactive entries
Suppresses OEM-specific, inactive, and unknown fields, resulting in cleaner and more readable output.
sudo dmidecode -q
Dumping and Reusing DMI Data
Dump DMI table as hexadecimal
Outputs the raw SMBIOS table in hexadecimal format, mainly used for debugging or low-level analysis.
sudo dmidecode -u
Save raw DMI data to a binary file
Stores SMBIOS data in binary form for later inspection or transfer to another system.
sudo dmidecode --dump-bin dmi.bin
Read DMI data from a binary dump
Decodes and displays DMI information from a previously saved binary file.
sudo dmidecode --from-dump dmi.bin
Use an alternate memory device or dump file
Advanced option for reading SMBIOS data from a custom memory source or memory image.
sudo dmidecode --dev-mem FILE
Conclusion
dmidecode is a practical “hardware identity” tool for Linux. Use it to quickly retrieve BIOS version, system vendor/model, serial/UUID, memory slot details, and CPU data—especially for audits, troubleshooting, and automation.
Also Read
Further reading
linux.die.net - man page for dmidecode command

