Master dmidecode: Retrieve Detailed Hardware Info on Linux
This guide explains what dmidecode does, how to install it on CentOS 7.9, its command syntax and options, and provides practical examples for extracting BIOS, system, memory, processor and other hardware details using various dmidecode commands.
Tool Overview
dmidecode retrieves hardware information from a host via DMI, outputting details such as BIOS, system, motherboard, processor, memory, and cache.
What is DMI? DMI (Desktop Management Interface) consists mainly of the Management Information Format (MIF) database, which stores all information about the computer system and its components.
Installing dmidecode
Example on CentOS 7.9:
# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)Install dmidecode:
# yum -y install dmidecodeCommand Syntax
dmidecode [options]
Options:
- d: (default:/dev/mem) read from device file, same output as without parameters.
- h: display help information.
- s: show only the specified DMI string (string).
- t: show only the specified type entry (type).
- u: display raw, undecoded entry data.
--dump-bin file: dump DMI data to a binary file.
--from-dump FILE: read DMI data from a binary file.
- V: display version information.Common Usage
# Print all hardware information
dmidecode
# Print concise hardware information
dmidecode -q
# Show help
dmidecode -h
# Filter for a specific string
dmidecode | grep 'Product Name'
# Show BIOS information
dmidecode --type bios
# Show system information
dmidecode --type system
# Show motherboard information
dmidecode --type baseboard
# Show chassis information
dmidecode --type chassis
# Show processor information
dmidecode --type processor
# Show memory information
dmidecode --type memory
# Show motherboard serial number
dmidecode | grep 'Serial Number'
# Show system serial number
dmidecode -s system-serial-number
# Show OEM information
dmidecode -t 11Supported Numeric Types
Type – Information
0 – BIOS
1 – System
2 – Baseboard
3 – Chassis
4 – Processor
5 – Memory Controller
6 – Memory Module
7 – Cache
8 – Port Connector
9 – System Slots
10 – On Board Devices
11 – OEM Strings
12 – System Configuration Options
13 – BIOS Language
14 – Group Associations
15 – System Event Log
16 – Physical Memory Array
17 – Memory Device
18 – 32-bit Memory Error
19 – Memory Array Mapped Address
20 – Memory Device Mapped Address
21 – Built-in Pointing Device
22 – Portable Battery
23 – System Reset
24 – Hardware Security
25 – System Power Controls
26 – Voltage Probe
27 – Cooling Device
28 – Temperature Probe
29 – Electrical Current Probe
30 – Out-of-band Remote Access
31 – Boot Integrity Services
32 – System Boot
33 – 64-bit Memory Error
34 – Management Device
35 – Management Device Component
36 – Management Device Threshold Data
37 – Memory Channel
38 – IPMI Device
39 – Power Supply
40 – Additional Information
41 – Onboard Devices Extended Information
42 – Management Controller Host Interface
Usage Examples
01 Query Memory Information
# Query number of memory modules
dmidecode -t 17 | grep "Size.*MB" | wc -l
1
# Query maximum supported memory
dmidecode -t 16
Handle 0x0036, DMI type 16, 15 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: Multi-bit ECC
Maximum Capacity: 96 GB
Error Information Handle: Not Provided
Number Of Devices: 1202 More Concise Information Display
# Concise output
dmidecode -q
// BIOS information
BIOS Information
Vendor: Bochs
Version: Bochs
Release Date: 01/01/2011
Address: 0xE8000
Runtime Size: 96 kB
ROM Size: 64 kB
Characteristics:
BIOS characteristics not supported
Targeted content distribution is supported
BIOS Revision: 1.0
// System information
System Information
Manufacturer: Bochs
Product Name: Bochs
Version: Not Specified
Serial Number: 641ab5b5-f6c0-431f-864c-4e750d27de04
UUID: 641AB5B5-F6C0-431F-864C-4E750D27DE04
Wake-up Type: Power Switch
SKU Number: Not Specified
Family: Not Specified
// Chassis information
Chassis Information
Manufacturer: Bochs
Type: Other
... (additional fields omitted for brevity)Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Open Source Linux
Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
