Get System Info with dmidecode

๐Ÿ“… August 28, 2017
The Desktop Management Interface (DMI) is a vendor-neutral, standardized framework for managing and gathering information about a computer system.




Which memory slots are populated?

What is the BIOS revision number?

What ports are located on the motherboard?

What is the processor version?

Using a program called dmidecode, these questions and many, many other technical details can be retrieved and displayed at the command line without having to open your computer case and reading tiny print on labels or in poorly-translated multi-lingual manuals.

As long as your hardware supports the DMI protocol, which is almost all modern hardware these days, then you can view the information using dmidecode.

Do you need to know the configured clock speed of your RAM? dmidecode will report the speed without needing to reboot into BIOS. Sure, fancy GUI programs, such as hardinfo, report identical information, but sometimes you simply want to impress your inner geek with command-line goodness.

First Of All…

The DMI referred to in this article describes the Desktop Management Interface. This is completely different from Direct Media Interface (also abbreviated DMI), which is a proprietary protocol that allows Intel processors to communicate with chipsets via a dedicated link operating similar to PCIe (PCI Express). (DMI 3.0 is not PCIe even though the underlying hardware mechanism is similar. For example, DMI uses lanes and differential signaling just like PCIe.)

Same acronym, but different technologies.

For more information about the two, here are a few links:

DMI (Desktop Management Interface)

DMI (Direct Media Interface)


dmidecode might already be installed with your distribution. Just run dmidecode from the command line. If not installed, check the repository using Synaptic or install from the command line.

sudo apt install dmidecode


dmidecode requires root privileges. That means sudo.

“Permission denied.” dmidecode requires root permissions. Shown here is an attempt to run it as a regular user.

sudo dmidecode

By default, dmidecode returns everything it can find in a single listing. Shown here is a small section of hardware information regarding the onboard motherboard devices and CPU cache information.

What Does dmidecode Return?

The hardware shown by dmidecode is not live information. Instead, it returns the hardware information about your system stored in tables. As a result, some of the data might be outdated or inaccurate. In fact, the man page warns about this.

man dmidecode

From my use, I have checked the results of dmidecode with the actual hardware specifications, and all information was mostly correct. A few minor inconsistencies did appear, but nothing deal-breaking. dmidecode remained useful. Your usage might vary depending upon your hardware and system.

Narrowing the Results

dmidecode returns a wealth of hardware information. We can limit this by specifying types. dmidecode will return information for the given type.

There are nine type names. Use these with the -t option.

  • bios
  • system
  • baseboard
  • chassis
  • processor
  • memory
  • cache
  • connector
  • slot
sudo dmidecode -t memory

Shows how many RAM slots are on your motherboard, the maximum memory supported, which slots are populated, and details about the modules installed.

Partial memory listing. All memory information is accurate for this system. The motherboard supports up to 64GB or RAM, and the slots shown are indeed populated with the correct RAM. Even the RAM part number is listed (pixelated here for privacy). This is convenient because if you need to order more RAM of the same type, you can easily get the part number without needing to open the computer case.

sudo dmidecode -t connector

If you need to see what connectors are on your motherboard, use the connector type. All connections, including audio and fan headers are listed. This does not tell whether or not a device, such as a fan, is actually connected. It only shows that these ports exist. For this example, the labels (CPU_FAN, CHA1_FAN, and so on) are the same as stated in the motherboard manual and on the motherboard itself.ย 

sudo dmidecode -t slot

What expansion slots are available? The slot type will list all physical expansion slots on the motherboard and which slots are available or in use. The labels are the same as printed on the motherboard. Here, we see PCIEX16_1 “In Use” because is contains the graphics card. PCIEX1_2 is empty on the board, so dmidecode marks it as “Available.” Other details are provided for those who need them. Type and Length seem to be wrong, however.

Experiment with the other type names to see what information is returned. For example, the processor type returns plenty of information regarding the CPU.

What Does “DMI type 9” Mean?

dmidecode returns a type number above each set of results.

Handle 0x0027, DMI type 9, 17 bytes

The keywords, memory, connector, slot, processor, and the others, simplify access to hardware information. We can use numbers instead. The man page lists 42 numerical types.

dmidecode numerical types. We can also use these with the -t option.

sudo dmidecode -t 17

sudo dmidecode -t memory

Both return the same memory slot information.

Same memory information returned using type 17 instead of the memory keyword.

The numbers make it easy to grab specific information without viewing the entire hardware listing. For example, if you only need memory array information and not all slot information, just use type 16.

sudo dmidecode -t 16

This is useful if you only what to find out the maximum RAM supported on the motherboard without sifting through a list of slot information that would normally be returned by the memory keyword. Number of Devices means that there are four physical RAM slots on the motherboard.

You can combine numerical types by separating them with commas.

sudo dmidecode -t 16,10

This returns the information for type 16 (memory array) and type 10 (On-board devices) together. Note that the order displayed is not always the same as the order of command line options.

Any types that return empty information will not be shown.

Depending upon your system, some types will return empty results. This is mostly trial and error, so have fun experimenting!

dmidecode also recognizes a limited set of string keywords that return specific results, such as process-frequency, bios-vendor, and system-uuid. Use the -s option.

Preset strings.

sudo dmidecode -s processor-version
sudo dmidecode -s bios-vendor
sudo dmidecode -s bios-release-date
sudo dmidecode -s system-uuid

No need to specify a type.

Use grep (or egrep) if you need to grab a specific string not included in this limited set of keywords.

sudo dmidecode -t 16 | grep 'Maximum Capacity'

Returning only the maximum RAM capacity supported by the motherboard.

sudo dmidecode -t 16 | grep 'Maximum Capacity' | awk '{print $3}'

awk is one way to fine-tune the results so only the 64 is returned.


Linux is all about choices. Many other programs exist that return hardware and system information, and dmidecode is a good addition to any toolkit. You might find yourself stuck at a terminal without any GUI help, and dmidecode just might be the program that returns exactly what you need. So, it is always beneficial add another utility to your knowledge.

Have fun!


, ,

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: