Linux Dmidecode Command Explained: Check BIOS, Memory and Hardware Details

SeekLinux tutorial banner illustrating Linux dmidecode command to check BIOS, memory, and hardware details
What is the Dmidecode Command?
The dmidecode stands for Desktop Management Interface Table decoder is a very handy tool for Linux administrators to retrieve detailed information about the system’s hardware components. It is used to convert the system’s DMI table into a human-readable format. It allows administrators and users to see information about the system's hardware components configuration. This tool provides information about the processor, memory, BIOS, board and other components etc.

Why Use the dmidecode Command?

When you need some information about your system hardware component on an urgent basis, then dmidecode is in place to solve this problem. No need to access the system components physically to retrieve the hardware information. It displays the current system configuration and maximum information of the system, such as CPU support and memory. This is commonly used to ensure the hardware specifications for inventory purposes and hardware upgrades.


Dmidecode commands

Syntax:
#sudo dmidecode [options]
Note: some Linux or UNIX system needs root permissions to run dmidecode commands. For running these commands, sudo can grant such permissions.

1. DMI Version
To check the current version of the dmidecode command is
#sudo dmidecode --v
or
#sudo dmidecode -V 
Terminal screenshot showing the 'dmidecode --version' command output displaying the installed DMI Decode utility version on a Linux system

2. Dmidecode Help Command
The help command shows the summary of all the available options and their usage.
#sudo dmidecode --help 
Linux terminal displaying dmidecode --help command options and usage information

3. Simple Dmidecode Command
This command shows all the DMI information.
#sudo dmidecode 
Terminal screenshot showing the 'sudo dmidecode' command output displaying detailed hardware information such as BIOS version, system manufacturer, and memory details on a Linux system

This command provides complete output of all the available DMI information including various hardware components.
To see the information in a presentable way use more option with the dmidecode command.
# sudo dmidecode | more

Terminal screenshot showing the 'sudo dmidecode' command output displaying detailed hardware information such as BIOS version, system manufacturer, and memory details on a Linux system

DMI Types
The -t or --type option is used to filter the output for the specific DMI types. To see the supportive types just issue dmidecode command with --type.
#sudo dmidecode -t or --typesTerminal screenshot showing the 'sudo dmidecode -t memory' command output displaying specific hardware details for the memory type on a Linux system

Common Types

4. Dmidecode BIOS Information
To display the BIOS information command is
#sudo dmidecode -t bios
or
#sudo dmidecode --type biosUbuntu terminal running dmidecode command displaying BIOS version and manufacturer information

DMI type ID can also be used to fetch BIOS information. Both commands display the same BIOS information.
#sudo dmidecode -t 0
Terminal screenshot showing the 'sudo dmidecode -t memory' command output displaying specific hardware details for the memory type on a Linux system

5. Dmidecode Board Information
To display the baseboard information command is
#sudo dmidecode -t baseboard
or
#sudo dmidecode -t 2
Terminal screenshot showing the 'sudo dmidecode -t baseboard' command output displaying motherboard information such as manufacturer, product name, version, and serial number on a Linux system

6. Dmidecode Processor Information
To display the processor information command is
#sudo dmidecode -t processor
or
#sudo dmidecode -t 
Example of dmidecode command listing system hardware details such as CPU and motherboard

7. Dmidecode Memory Information
To display the information about Physical Memory and DIMMs, run the following command
#sudo dmidecode -t memory
or
#sudo dmidecode -t 6
Linux terminal output of dmidecode showing detailed RAM and memory slot information

8. Dmidecode Chassis Information
To display chassis information command is
#dmidecode -t chassis
or
#dmidecode -t 3
Terminal screenshot showing the 'sudo dmidecode -t chassis' command output displaying Linux system chassis details such as manufacturer, type, serial number, and asset tag

9. Dmidecode System Information
To get the system information command is
#sudo dmidecode -t system
or
#sudo dmidecode -t 1
Terminal screenshot displaying the 'sudo dmidecode -t system' command output with Linux system details including manufacturer, product name, version, and serial number

10. Dmidecode Cache Information
To check the cache information command is
#sudo dmidecode -t cache
or
#sudo dmidecode -t 7
Terminal screenshot displaying the 'sudo dmidecode -t cache' command output showing CPU cache information on a Linux system, including L1, L2, and L3 cache details

11. Dmidecode Connector Information
To check the connector information command is
#dmidecode -t connector
or
#dmidecode -t 8
Terminal screenshot of 'sudo dmidecode -t connector' command output displaying detailed hardware connector information on a Linux system

12. Dmidecode Slot Information
To check the slot information command is
#sudo dmidecode -t slot
or
#sudo dmidecode -t 9
Terminal screenshot of 'sudo dmidecode -t slot' command output showing detailed hardware slot information on a Linux system

Information using Dmidecode Keywords
String keyword is also an available option to get the information about any system component. Its syntax is
#sudo dmidecode -s or sudo dmidecode --string
If only -s option is used without any DMI keyword, it shows all the available valid keywords with an error message.
Terminal output of the Linux dmidecode command using a specific keyword option to display detailed hardware and BIOS information.

13. Bios Vendor Check
To check the BIOS vendor command is
#sudo dmidecode -s bios-vendor
Linux terminal showing dmidecode output with detailed BIOS vendor information and version details.

14. BIOS Release Date
To check the BIOS release date command is
#sudo dmidecode -s bios-release-date
Linux terminal output of dmidecode displaying BIOS release date information.

15. Check BIOS Version 
To check the BIOS version command is
#sudo dmidecode -s bios-versionLinux terminal screenshot showing dmidecode command output to check BIOS version.

16. Check System Manufacturer Information
To check the system manufacturer information command is
#sudo dmidecode -s system-manufacturer
Linux terminal screenshot showing dmidecode command output displaying the system manufacturer details.

17. Check System Product Name
To check the system product name command is
#sudo dmidecode -s system-product-name
Linux terminal screenshot showing dmidecode command output with the system product name information.

18. Check Processor Version
To check the processor version command is
#sudo dmidecode -s processor-version
Linux terminal screenshot displaying dmidecode command output with detailed processor version information.

19. Check Processor Manufacturer
To check the manufacturer of the processor command is
#sudo dmidecode -s processor-manufacturer
Linux terminal screenshot showing dmidecode command output with detailed processor manufacturer information.

20. Check Baseboard Product Name
To check the name of the baseboard command is
#sudo dmidecode -s baseboard-product-name
Linux terminal screenshot displaying dmidecode output showing the baseboard product name information.

How to Hide Information in Output
To hide some information in the output of the dmidecode, you need to enable quiet mode. For this purpose, use the -q switch with the dmidecode command. For example, to display the system information, use the dmidecode command with -q --quiet switch.
#sudo dmidecode -qt system
Linux terminal screenshot showing dmidecode command output with certain hardware details hidden or masked for privacy.

Information as Hexadecimal
To display the information in hexadecimal and ASCII, run the dmidecode command with -u switch.
#sudo dmidecode -ut memory
Hexadecimal number system chart showing digits 0 to F with binary and decimal equivalents

How to dump DMI information in a File
To dump the DMI information in the file command is
#sudo dmidecode --dump-bin testfile
Linux terminal showing dmidecode command dumping hardware information to a text file

How to Retrieve DMI Data from the Binary File
To retrieve the DMI data from the test file that is created with the --dump-bin option, this command is used.
#sudo dmidecode --from-dump testfile
Linux terminal displaying dmidecode command reading hardware info from a saved dump file

Multiple components Information
To retrieve the multiple components' information with one command, dmidecode is used with the grep or egrep switch. Commands can be combined with pipes and specify multiple patterns with grep.

Use grep to get Multiple Patterns
To get multiple information about the system, use grep with the dmidecode command.
#sudo dmidecode -t system | grep -E ‘Manufacturer|Product Name| Serial Number’

This command will show the information about the manufacturer, product name and serial number from the system section. 
Example of grep command matching several keywords in a single search on Linux

How to Get Memory Type
To display information about which type of memory is installed with grep command as DDR3, DDR4. Here T will be capital in -m2 Type.
#sudo dmidecode -t memory |grep -m2 Type

Different types of Information
Different types of information output can be combined using grep with the dmidecode command, for example, to display the information about the system, processor and memory the command is
# (sudo dmidecode -t system; sudo dmidecode -t processor; sudo dmidecode -t memory) | grep -E 'Manufacturer|Version|Size'
Using grep with extended regular expressions to capture multiple matches in Linux

Troubleshooting dmidecode Errors
While using the dmidecode command, you might encounter some common errors. Below are their causes and fixes:

Permission denied
This error occurs when the command is executed without administrative privileges.

Fix: Run the command with sudo — for example:
#sudo dmidecode -t systemTerminal screenshot showing the output of the command sudo dmidecode -t system, displaying detailed system information such as manufacturer, product name, version, and serial number on a Linux system.

SMBIOS not found
This means the system hardware doesn’t expose SMBIOS data or your platform doesn’t support DMI tables (common on some ARM-based systems or older machines).

Fix: Check if your hardware supports SMBIOS, or run the command on a different system.

dmidecode: command not found
This error appears when the dmidecode utility isn’t installed on your Linux system.

Fix: Install it using your distribution’s package manager:

For Debian/Ubuntu:
#sudo apt install dmidecodeTerminal screenshot showing the sudo apt install dmidecode command used to install the Dmidecode utility on an Ubuntu or Debian-based Linux system.

For RHEL/CentOS/Fedora:
#sudo yum install dmidecodeTerminal screenshot showing the sudo dnf install dmidecode command used to install the Dmidecode package on a Fedora, RHEL, or CentOS Linux system.

Empty or Incomplete Output in Virtual Machines
In some virtualized environments, DMI information is partially hidden for security reasons.

Fix: Some hypervisors, such as VMware or KVM, may mask SMBIOS data. You can check the VM settings or try running the command on a physical host for complete details.

Frequently Asked Questions (FAQ)

1. What is dmidecode used for in Linux?

The `dmidecode` command is used to display hardware information directly from the system’s DMI (Desktop Management Interface) tables. It provides details such as BIOS version, motherboard model, processor type, memory slots, and system serial numbers without requiring physical access to the hardware.

2. Can dmidecode run without root privileges?

No, most systems require administrative privileges to access the DMI tables. You should use `sudo` with dmidecode to retrieve complete hardware details.

3. Why does dmidecode show “permission denied”?

This error occurs when you try to execute dmidecode without `sudo` or root access. Simply prefix the command with `sudo` and enter your password to resolve the issue.

4. Is it safe to run dmidecode on production systems?
Yes, dmidecode is a read-only command that doesn’t modify system data or hardware configurations. It’s completely safe to use even on production servers for hardware inventory and diagnostics.

Practical Use Cases for dmidecode

·         Asset inventory automation
·         Firmware audit before BIOS update
·         Server documentation
·         Troubleshooting hardware mismatches

 Final Thoughts

The dmidecode command is a useful tool in the toolkit of every Linux administrator. It gives deep insights of hardware information without requiring you to open the system physically. From checking the BIOS version to serial number, to identifying memory slots to manufacturer details, dmidecode helps to streamline hardware audits, troubleshooting and system documentation. Always run this command with the appropriate permissions or as a root user and be careful when using this information for the automated scripts. As a Linux administrator, understanding and using dmidecode effectively can save your time, reduce hardware-related guesswork and enhance your ability to manage Linux systems confidently.

If you found this guide helpful, don't forget to share and subscribe SeekLinux for more updates and Linux administration tips.

Post a Comment

Previous Post Next Post