Extract Hardware or System Information using dmidecode command in Linux

dmidecode command helps to extract hardware and other useful pieces of information like Make and Model of System, memory, BIOS, CPU, Chassis, Serial no.of the System etc. dmidecode tool is to dump DMI table contents in a human readable format. SMBIOS and DMI both standards  are related and developed by the DMTF (Desktop Management Task Force). dmidecode will try to locate the DMI table, it will try to read the DMI table from sysfs and next try reading directly from memory if sysfs access failed. in this post,  we are going to see some of the useful command with examples.
1. Following are the DMI types available with dmidecode command
       The SMBIOS specification defines the following DMI types:
       Type   Information
       ────────────────────────────────────────────       
          0   BIOS
          1   System
          2   Baseboard
          3   Chassis
          4   Processor
          5   Memory Controller
          6   Memory Module
          7   Cache
          8   Port Connector
          9   System Slots
         10   On Board Devices
         11   OEM Strings
         12   System Configuration Options
         13   BIOS Language
         14   Group Associations
         15   System Event Log
         16   Physical Memory Array
         17   Memory Device
         18   32-bit Memory Error
         19   Memory Array Mapped Address
        20   Memory Device Mapped Address
         21   Built-in Pointing Device
         22   Portable Battery
         23   System Reset
         24   Hardware Security
         25   System Power Controls
         26   Voltage Probe
         27   Cooling Device
         28   Temperature Probe
         29   Electrical Current Probe
         30   Out-of-band Remote Access
         31   Boot Integrity Services
         32   System Boot
         33   64-bit Memory Error
         34   Management Device
         35   Management Device Component
         36   Management Device Threshold Data
         37   Memory Channel
         38   IPMI Device
         39   Power Supply
         40   Additional Information
         41   Onboard Devices Extended Information
         42   Management Controller Host Interface

In place of type id as listed above, we can enter keyword with -t options along with dmidecode command. Following are the keywords. We can use either keyword or type id’s. Please note that keywords are not case sensitive.
       Keyword     Types
       ──────────────────────────────
     bios            0, 13
     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

Example: To get a system information, we are going to use Keyword instead of Types.

# dmidecode -t system

2. To display chassis details
With dmidecode command you can use keyword or type id to get system information. Following command we are using keyword instead of type id.
# dmidecode -t chassis

3. Get BIOS related information.
Following command will display handful of BIOS related details.
# dmidecode -t bios

4. To display system details
With dmidecode command you can use both keyword or type id to get system information. Following command we are using type id instead of keyword. In below command type id “1” is system which is shown in above DMI types point no. 1
# dmidecode -t 1

5. To Find system serial no.
Following command will shows system serial no.
# dmidecode -s system-serial-number

6. To display system manufacturer
Following command will shows you manufacturer of the system .
dmidecode -s system-manufacturer

Also Read.
1. Archive, Compress and Extract Directories and Files Using TAR Command in Linux.
2. 11 Essential Linux Commands For Network Configuration and Troubleshooting.
3. sysstat – Linux System performance monitoring and usage tool.
7. To display product or model type of the system .
Below command will shows you the product or model type of the system. Option “-s” is  string.
dmidecode -s system-product-name

8. To Find CPU or  processor details

Execute below command to extract CPU or  processor details.
9. Extract physical Installed RAM details with below command

Run below command extract physically installed RAM details like part number, type, speed, serial no. etc.
# dmidecode -t 17

10. To get the cache information of the system.
# dmidecode -t cache

Conclusion: In this tutorial, we have seen how we an extract hardware info using dmidecode command in Linux. To know more about it do man dmidecode from command prompt. Big thanks for reading all the way to the end. Please share it with Your Friends & Help Someone… and also Like Our Facebook Page. Let me hear your thoughts in the comments below!

0 thoughts on “Extract Hardware or System Information using dmidecode command in Linux”

Leave a Comment