Config Server Firewall

Dmidecode - Command to Get Hardware Info in Linux

In Linux, we use the dmidecode command to get information on the system's hardware components.

If you run the command without any argument, it will display a table containing information about the system's hardware components.

dmidecode

You can use the --type argument to get information on a specific hardware component.

Type Can Be a Number or Keyword

For example, 0 represents BIOS, 2 is the motherboard, and 4 is the CPU.

For example, to get CPU info, use either 4 or processor as the --type value:

dmidecode --type 4
dmidecode --type processor

You can refer to the man page to find all valid types and keywords.

man dmidecode
dmidecode types and keywords
dmidecode types and keywords

Short Output

We can use the -s option to display a short output. For example, the following command shows the CPU model without other information.

dmidecode -s processor-version
Check CPU Version with the dmidecode command

The -s option accepts the following keywords.

Dmidecode String Keywords
bios-vendor
bios-version
bios-release-date
system-manufacturer
system-product-name
system-version
system-serial-number
system-uuid
system-family
baseboard-manufacturer
baseboard-product-name
baseboard-version
baseboard-serial-number
baseboard-asset-tag
chassis-manufacturer
chassis-type
chassis-version
chassis-serial-number
chassis-asset-tag
processor-family
processor-manufacturer
processor-version
processor-frequency

You can run dmidecode -s to display the above table while working on the Linux command-line interface.

Examples

Get motherboard information:

dmidecode --type baseboard

Get BIOS information:

dmidecode --type bios

Get CPU information:

dmidecode --type processor

Check CPU Version:

dmidecode -s processor-version

Check the frequency of the CPU:

dmidecode -s processor-frequency

Get memory information:

dmidecode --type memory
Dmidecode - Command to Get Hardware Info in Linux