dmidecode: Get System Hardware Information On Linux

Want to get detailed information regarding your Linux OS? Dmidecode is here to help you.

dmidecode - Get System Hardware Information On Linux

Dmidecode is a Linux command line tool which is commonly used to retrieve the useful information of your system’s hardware components in human readable format.

What is dmidecode command in Linux

Dmidecode reads the data from DMI (Desktop Management Interface) table which holds information for 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 maximum RAM supported by the BIOS and motherboard, a serial number or a key piece of hardware information during troubleshooting. So, rather than looking up hardware specs in a manual, you could use dmidecode command to grab this information instantly.

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

openSUSE

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 so that you can play well without any problems. The specification defines the following DMI types.

TypeInformationTypeInformation
0BIOS21Built-in Pointing Device
1System22Portable Battery
2Base Board23System Reset
3Chassis24Hardware Security
4Processor25System Power Controls
5Memory Controller26Voltage Probe
6Memory Module27Cooling Device
7Cache28Temperature Probe
8Port Connector29Electrical Current Probe
9System Slots30Out-of-band Remote Access
10On Board Devices31Boot Integrity Services
11OEM Strings32System Boot
12System Configuration Options3364-bit Memory Error
13BIOS Language34Management Device
14Group Associations35Management Device Component
15System Event Log36Management Device Threshold Data
16Physical Memory Array37Memory Channel
17Memory Device38IPMI Device
1832-bit Memory Error39Power Supply
19Memory Array Mapped Address40Additional Information
20Memory Device Mapped Address41Onboard 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 are the list of available keywords.

KeywordTypes
bios0
system1, 12, 15, 23, 32
baseboard2, 10, 41
chassis3
processor4
memory5, 6, 16, 17
cache7
connector8
slot9

How to use dmidecode command

In dmidecode command we can use either keyword or type id to get hardware information of system. Keep in mind to get these information we need root privilege.

Get memory information in Linux using the dmidecode command

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

sudo dmidecode -t memory
dmidecode 3.3
Getting SMBIOS data from sysfs.
SMBIOS 3.3.0 present.

Handle 0x0027, DMI type 16, 23 bytes
Physical Memory Array
     Location: System Board Or Motherboard
     Use: System Memory
     Error Correction Type: None
     Maximum Capacity: 128 GB
     Error Information Handle: 0x0026
     Number Of Devices: 2

Handle 0x002F, DMI type 17, 92 bytes
Memory Device
     Array Handle: 0x0027
     Error Information Handle: 0x002E
     Total Width: 64 bits
     Data Width: 64 bits
     Size: 16 GB
     Form Factor: DIMM
     Set: None
     Locator: DIMM_A1
     Bank Locator: BANK 0
     Type: DDR4
     Type Detail: Synchronous Unbuffered (Unregistered)
     Speed: 3200 MT/s
     Manufacturer: Corsair
     Serial Number: 00000000
     Asset Tag: Not Specified
     Part Number: CMW32GX4M2C3200C16
...............................

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

sudo dmidecode -t memory | egrep "Maximum Capacity|Number Of Devices|Size|Type:" | egrep -v "No Module|Unknown|None" 
Maximum Capacity: 128 GB
Number Of Devices: 2
Size: 16 GB
Type: DDR4
Volatile Size: 16 GB
Size: 16 GB
Type: DDR4
Volatile Size: 16 GB

Get processor information in Linux using the dmidecode command

To get processor information, use the following command.

sudo dmidecode -t processor
dmidecode 3.3
Getting SMBIOS data from sysfs.
SMBIOS 3.3.0 present.

Handle 0x002D, DMI type 4, 48 bytes
Processor Information
     Socket Designation: AM4
     Type: Central Processor
     Family: Zen
     Manufacturer: Advanced Micro Devices, Inc.
     ID: 10 0F 87 00 FF FB 8B 17
     Signature: Family 23, Model 113, Stepping 0
     Flags:
         FPU (Floating-point unit on-chip)
         VME (Virtual mode extension)
         DE (Debugging extension)
         PSE (Page size extension)
.............................

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

sudo dmidecode -t processor | egrep "Family|Manufacturer|Version|Max Speed|Core Count|Thread Count" 
Family: Zen
Manufacturer: Advanced Micro Devices, Inc.
Signature: Family 23, Model 113, Stepping 0
Version: AMD Ryzen 5 3600 6-Core Processor              
Max Speed: 4200 MHz
Core Count: 6
Thread Count: 12

Get hardware information on BIOS in Linux using the dmidecode command

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

sudo dmidecode -t bios
dmidecode 3.3
Getting SMBIOS data from sysfs.
SMBIOS 3.3.0 present.

Handle 0x0000, DMI type 0, 26 bytes
BIOS Information
     Vendor: American Megatrends Inc.
     Version: 1803
     Release Date: 01/25/2021
     Address: 0xF0000
     Runtime Size: 64 kB
     ROM Size: 16 MB
     Characteristics:
         PCI is supported
         APM is supported
         BIOS is upgradeable
         BIOS shadowing is allowed
         Boot from CD is supported
         Selectable boot is supported
         BIOS ROM is socketed
         EDD is supported
         5.25"/1.2 MB floppy services are supported (int 13h)
         3.5"/720 kB floppy services are supported (int 13h)
         3.5"/2.88 MB floppy services are supported (int 13h)
         Print screen service is supported (int 5h)
         8042 keyboard services are supported (int 9h)
         Serial services are supported (int 14h)
         Printer services are supported (int 17h)
         ACPI is supported
         USB legacy is supported
         BIOS boot specification is supported
         Targeted content distribution is supported
         UEFI is supported
     BIOS Revision: 5.17

Get the system information in Linux using the dmidecode command

To get system information, run the dmidecode command with -t option followed by system keyword.

sudo dmidecode -t system
dmidecode 3.3
Getting SMBIOS data from sysfs.
SMBIOS 3.3.0 present.

Getting SMBIOS data from sysfs.
SMBIOS 3.3.0 present.

Handle 0x0001, DMI type 1, 27 bytes
System Information
     Manufacturer: ASUS
     Product Name: System Product Name
     Version: System Version
     Serial Number: System Serial Number
     UUID: a4b8a44a-3a0e-ca09-add3-3c7c3fd4059b
     Wake-up Type: Power Switch
     SKU Number: SKU
     Family: To be filled by O.E.M.

Get the motherboard model in Linux using the dmidecode command

sudo dmidecode -t baseboard
dmidecode 3.3
Getting SMBIOS data from sysfs.
SMBIOS 3.3.0 present.

Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
     Manufacturer: ASUSTeK COMPUTER INC.
     Product Name: ROG STRIX B550-I GAMING
     Version: Rev X.0x
     Serial Number: 350971693102841
     Asset Tag: Default string
     Features:
         Board is a hosting board
         Board is replaceable
     Location In Chassis: Default string
     Chassis Handle: 0x0003
     Type: Motherboard
     Contained Object Handles: 0

Handle 0x001E, DMI type 10, 6 bytes
On Board Device Information
     Type: Video
     Status: Enabled
     Description:    To Be Filled By O.E.M.
Handle 0x0024, DMI type 41, 11 bytes
Onboard Device
     Reference Designation:  Onboard IGD
     Type: Video
     Status: Enabled
     Type Instance: 1
     Bus Address: 0000:00:02.0

Conclusion

That’s all from this article. Now you know  how to use dmidecode command and its options to get different hardware information. 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.

Leave a Reply

Your email address will not be published.

Latest from Linux Knowledge