About dmidecode
The dmidecode command reads and displays the contents of the DMI (Desktop Management Interface) table, also known as SMBIOS (System Management BIOS). This provides detailed information about system hardware components as reported by the BIOS/UEFI firmware.
Common Use Cases:
- Identifying installed hardware without physical inspection
- Checking memory configuration and available slots
- Finding system and motherboard serial numbers for warranty
- Determining maximum supported memory capacity
- Identifying CPU specifications and features
- Documenting hardware for inventory and compliance
- Verifying BIOS/firmware versions
- Planning hardware upgrades (RAM, CPU compatibility)
Requirements: Must be run as root or with sudo, as it accesses system firmware tables.
| Option | Description |
|---|---|
-t TYPE |
Display only entries of specified type (bios, system, baseboard, chassis, processor, memory, cache, connector, slot) |
-s STRING |
Display only the value of specified DMI string (system-serial-number, baseboard-product-name, etc.) |
-q |
Quiet mode - show less verbose output |
-u |
Show raw DMI data in hex dump format |
--from-dump FILE |
Read DMI data from a binary dump file instead of from /dev/mem |
--dump-bin FILE |
Dump DMI data to a binary file for later analysis |
-H |
Display numeric handles for all structures |
| Type | Number | Information Provided |
|---|---|---|
| bios | 0 | BIOS vendor, version, release date |
| system | 1 | System manufacturer, product name, serial number, UUID |
| baseboard | 2 | Motherboard manufacturer, product, version, serial |
| chassis | 3 | Chassis type, manufacturer, serial number |
| processor | 4 | CPU family, manufacturer, version, speed, cores |
| memory | 16, 17 | Memory array info, module size, speed, type |
| cache | 7 | CPU cache configuration and sizes |
| slot | 9 | Expansion slot types and current usage |
Example 1Display All System Information
Show complete DMI table contents:
Explanation:
- Displays complete DMI table with all hardware information
- Shows SMBIOS version (3.2.0 in this example)
- Each entry has a Handle (0x0000) and DMI type
- Output can be very long - pipe to
lessfor navigation - Requires root/sudo to access /dev/mem
- Information comes directly from BIOS/UEFI firmware
Example 2Check Memory Configuration
Display detailed memory information including slots and capacity:
Explanation:
-t memory: Shows types 16 and 17 (memory array and devices)- Maximum Capacity: System's RAM limit (64GB here)
- Number Of Devices: Total memory slots (4 slots)
- Size: Installed module capacity (16384 MB = 16GB)
- Speed: Memory frequency (3200 MT/s = DDR4-3200)
- Locator: Physical slot designation (DIMM_A1)
- "No Module Installed" indicates empty slots
Example 3Get System Serial Numbers
Extract specific identification strings for warranty and inventory:
Explanation:
-s: Extract single string value (no labels)- system-serial-number: System/service tag
- system-uuid: Unique system identifier (never changes)
- baseboard-serial-number: Motherboard serial
- chassis-serial-number: Case/chassis serial
- Output is clean - perfect for scripts and automation
echo "$(hostname),$(sudo dmidecode -s system-serial-number),$(sudo dmidecode -s system-product-name)" >> inventory.csv
Example 4Identify CPU Information
Display processor details including cores, threads, and capabilities:
Explanation:
- Shows CPU model and exact specifications
- Core Count vs Thread Count reveals hyperthreading status
- Max Speed: Turbo boost capability (4.9 GHz)
- Current Speed: Base frequency (3.6 GHz)
- Socket type important for upgrade planning
- Flags show CPU capabilities (virtualization, etc.)
Example 5Check BIOS Version and Date
Display BIOS/UEFI firmware information:
Explanation:
- Vendor: BIOS manufacturer (often AMI, Award, Phoenix)
- Version: Current BIOS version (1.40)
- Release Date: When this BIOS version was released
- Characteristics: Supported features and capabilities
- "UEFI is supported" confirms modern firmware
- Critical for checking if BIOS updates are needed
Example 6Examine System and Motherboard Details
Get system manufacturer and motherboard information:
Explanation:
- System Information: Overall system details
- Product Name: System model (PowerEdge R740)
- UUID: Unique identifier for licensing and tracking
- Base Board: Motherboard-specific information
- Product Name (baseboard): Motherboard model number
- Serial numbers critical for warranty service
Example 7List All Available Expansion Slots
Check PCIe and other expansion slot configuration:
Explanation:
- Designation: Slot label on motherboard
- Type: Slot interface and speed (PCIe 3.0 x16)
- Current Usage: Available (empty) or In Use (occupied)
- Shows both PCIe slots and M.2 NVMe slots
- Bus Address: PCI bus location for identification
- Essential for planning GPU, NIC, or storage expansion
Example 8Create Hardware Inventory Report
Generate a comprehensive hardware report for documentation:
Explanation:
-q: Quiet mode - less verbose outputtee: Display output and save to file simultaneously- Creates documentation for asset management
- Useful for capacity planning and upgrades
- Can be parsed by configuration management tools
- Timestamp the file for historical tracking
sudo dmidecode -q | tee hardware-report-$(date +%Y%m%d).txt. Store these reports in version control or asset management system.
Example 9Dump and Restore DMI Data
Save DMI table for offline analysis or historical comparison:
Explanation:
--dump-bin: Save raw DMI table to binary file- Creates portable backup of hardware configuration
--from-dump: Read from file instead of /dev/mem- Can analyze offline without root access
- Useful for comparing configurations before/after changes
- Transfer to another system for analysis
Example 10Quick Memory Summary Script
Create a useful one-liner for memory capacity planning:
Explanation:
- Filters memory output to show only key information
- Maximum Capacity: System's RAM ceiling
- Size: Shows populated vs empty slots
- Speed: Current RAM frequency
- Locator: Physical slot identification
- Quick view for planning memory upgrades
sudo dmidecode -t memory | grep "Size.*MB" | grep -v "No Module" | awk '{sum+=$2} END {print "Total RAM: " sum/1024 " GB"}'
Running dmidecode without root access fails.
Solution: Always use sudo dmidecode or run as root. The command needs to access /dev/mem which requires elevated privileges. No way around this on physical hardware.
Virtual machines may show limited or incorrect DMI information.
Solution: VMs often present synthetic DMI data. For actual hardware specs, run on physical machines. Some hypervisors (VMware, KVM) pass through limited real hardware info; others (VirtualBox) provide mostly placeholder values.
Some systems (especially very old or embedded) lack SMBIOS tables.
Solution: SMBIOS was introduced in mid-1990s. Very old systems or some embedded devices may not have it. Use alternative tools like lshw or direct kernel interfaces.
Some vendors fill DMI tables with "Not Specified" or incorrect data.
Solution: Enterprise servers (Dell, HP, Lenovo) generally have accurate DMI data. Consumer motherboards and OEM systems may have incomplete info. Cross-reference with lshw, lscpu, and lspci for verification.
Locator names don't always match physical silk-screen labels on motherboard.
Solution: When installing RAM, document which physical slot corresponds to which DIMM locator name. Some motherboards number slots differently than BIOS reports them. Install one module, run dmidecode, note location, repeat.
Automate hardware inventory collection:
Run via cron or configuration management for automated tracking.
Before buying used servers, ask seller to provide:
Verify actual specs match listing. Catches misrepresented hardware.
Calculate maximum affordable RAM configuration:
Helps plan balanced memory configurations.
Before and after BIOS updates, capture DMI snapshot:
Documents what changed during firmware update.
Extract and validate warranty info:
Quick links to manufacturer warranty status.
Ensure all RAM modules running at same speed:
Mismatched speeds can cause system to downclock all modules.
| Task | Command |
|---|---|
| Show all hardware info | sudo dmidecode | less |
| Check memory configuration | sudo dmidecode -t memory |
| Get system serial number | sudo dmidecode -s system-serial-number |
| Show CPU information | sudo dmidecode -t processor |
| Display BIOS version | sudo dmidecode -t bios |
| List expansion slots | sudo dmidecode -t slot |
| System and motherboard info | sudo dmidecode -t system -t baseboard |
| Quiet mode (less verbose) | sudo dmidecode -q |
| Save DMI table to file | sudo dmidecode --dump-bin backup.bin |
| Read from saved dump | dmidecode --from-dump backup.bin |
| String Identifier | Description |
|---|---|
bios-vendor |
BIOS manufacturer |
bios-version |
BIOS version number |
bios-release-date |
BIOS release date |
system-manufacturer |
System vendor name |
system-product-name |
System model number |
system-serial-number |
System service tag |
system-uuid |
Unique system identifier |
baseboard-manufacturer |
Motherboard vendor |
baseboard-product-name |
Motherboard model |
baseboard-serial-number |
Motherboard serial |
chassis-serial-number |
Chassis/case serial |
processor-version |
CPU model name |