dmidecode Get System Hardware Information On Linux

dmidecode: Get System Hardware Information On Linux

Dmidecode is a Linux command-line tool used to retrieve information about your system’s hardware components in a human-readable format.

What is the dmidecode Command in Linux?

Dmidecode reads the data from DMI (Desktop Management Interface) table, which holds information for the system’s hardware components like BIOS Revision, Serial Number, RAM, CPU, manufacturer information, etc.

In other words, dmidecode acts as a decoder of the DMI table.

Dmidecode Use Cases

For example, you might run into situations where you need to find out the maximum RAM supported by the BIOS and motherboard, a serial number, or an essential piece of hardware information during troubleshooting.

So, rather than looking up hardware specs in a manual, you could instantly use the dmidecode command to grab this information.

How to Install dmidecode

Dmidecode comes pre-installed with most Linux distributions. However, if it is not installed already, you can install it using your distribution’s package manager.

Ubuntu / Debian / Linux Mint

sudo apt install dmidecode

Fedora / Cent OS / Alma Linux

sudo yum install dmidecode


sudo zypper in dmidecode

Arch Linux / Manjaro

sudo pacman -S dmidecode

DMI Types

To use dmidecode effectively, you need to know about the types of DMI and its keywords to play well without any problems. The specification defines the following DMI types.

Type Information Type Information
0 BIOS 21 Built-in Pointing Device
1 System 22 Portable Battery
2 Base Board 23 System Reset
3 Chassis 24 Hardware Security
4 Processor 25 System Power Controls
5 Memory Controller 26 Voltage Probe
6 Memory Module 27 Cooling Device
7 Cache 28 Temperature Probe
8 Port Connector 29 Electrical Current Probe
9 System Slots 30 Out-of-band Remote Access
10 On-Board Devices 31 Boot Integrity Services
11 OEM Strings 32 System Boot
12 System Configuration Options 33 64-bit Memory Error
13 BIOS Language 34 Management Device
14 Group Associations 35 Management Device Component
15 System Event Log 36 Management Device Threshold Data
16 Physical Memory Array 37 Memory Channel
17 Memory Device 38 IPMI Device
18 32-bit Memory Error 39 Power Supply
19 Memory Array Mapped Address 40 Additional Information
20 Memory Device Mapped Address 41 On-board Device

Keywords can be used instead of type numbers with --type or -t flags to pull all associated type codes into the command. Each keyword is equivalent to a list of type numbers. Following is the list of available keywords.

Keyword Types
bios 0
system 1, 12, 15, 23, 32
baseboard 2, 10, 41
chassis 3
processor 4
memory 5, 6, 16, 17
cache 7
connector 8
slot 9

How to Use the dmidecode Command

In the dmidecode command, we can use either keyword or type id to get hardware information of the system. Note that you need to execute commands as a root user or one with sudo privileges to get this information.

Get Memory Information in Linux

To get all memory information details, run dmidecode with the -t option below.

sudo dmidecode -t memory
Get Memory Information in Linux Using the dmidecode Comm

You can further filter details with the egrep command to filter only the required information.

sudo dmidecode -t memory | egrep "Maximum Capacity|Number Of Devices|Size|Type:" | egrep -v "No Module|Unknown|None"
Get Memory Information in Linux Using the dmidecode Command

Get CPU Information in Linux

To get processor information, use the following command.

sudo dmidecode -t processor
Get CPU Information in Linux Using the dmidecode Command

You can further filter details with the egrep command to filter only the required details.

sudo dmidecode -t processor | egrep "Family|Manufacturer|Version|Max Speed|Core Count|Thread Count"
Get CPU Information in Linux Using the dmidecode Command

Get Hardware Information on BIOS in Linux

To get the BIOS version, vendor, and other details, use the -t bios option.

sudo dmidecode -t bios
Get Hardware Information on BIOS in Linux Using the dmidecode Command

Get the System Information in Linux

Run the dmidecode command with the -t option followed by the system keyword to get system information.

sudo dmidecode -t system
Get the System Information in Linux Using the dmidecode Command

Get the Motherboard Model in Linux

sudo dmidecode -t baseboard
Get the Motherboard Model in Linux Using the dmidecode Command


That’s all from this article. Now you know how to use the dmidecode command and its options to get different hardware information. Then, of course, you can try other dmidecode options to obtain the system details you need.

If you want to read more  about dmidecode command you can refer to the official website.

Bobby Borisov
Bobby Borisov

Bobby is an Editor-in-Chief at Linuxiac. He is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, Bobby has worked as a Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Leave a Reply

Your email address will not be published. Required fields are marked *