How To Retrieve System Information using dmidecode on Linux

You it is nice to be able to find out details about your system and Windows users have the nice GUI programs supplied by many of the manufacturers that allow them point and click access. Well, with Linux the manufacturers tend to not to supply those applications, except in the server realm. Not to worry as that is where dmidecode comes to the rescue.

dmidecode is a tool for dumping a computer’s DMI (some say SMBIOS) table contents in a human-readable format. This table contains a description of the system’s hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision. Thanks to this table, you can retrieve this information without having to probe for the actual hardware. While this is a good point in terms of report speed and safeness, this also makes the presented information possibly unreliable.


-d, –dev-mem FILE

Read memory from device FILE (default: /dev/mem)

-q, –quiet

Be less verbose. Unknown, inactive and OEM-specific entries are not displayed. Meta-data and handle references are hidden.

-s, –string KEYWORD

Only display the value of the DMI string identified by KEYWORD. KEYWORD must be a keyword from the following list: bios-vendor, bios-version, bios-release-date, system-manufacturer, system-product-name, system-version, system-serial-number, system-uuid, 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. Each keyword corresponds to a given DMI type and a given offset within this entry type. Not all strings may be meaningful or even defined on all systems. Some keywords may return more than one result on some systems (e.g. processor-version on a multi-processor system). If KEYWORD is not provided or not valid, a list of all valid keywords is printed and dmidecode exits with an error. This option cannot be used more than once.

-t, –type TYPE

Only display the entries of type TYPE. TYPE can be either a DMI type number, or a comma-separated list of type numbers, or a keyword from the following list: bios, system, baseboard, chassis, processor, memory, cache, connector, slot. Refer to the DMI TYPES section below for details. If this option is used more than once, the set of displayed entries will be the union of all the given types. If TYPE is not provided or not valid, a list of all valid keywords is printed and dmidecode exits with an error.

So say you want to find out the serial number of the system using a keyword, type:

$ sudo dmidecode -s system-serial-number

The best way is to use the type flag to retrieve information if you want more.

dmidecode: option '--type' requires an argument

Type number or keyword expected

Valid type keywords are:



$ sudo dmidecode –type system

# dmidecode 2.12
SMBIOS 2.4 present.

Handle 0x0100, DMI type 1, 27 bytes
System Information
Manufacturer: Dell Inc.
Product Name: XPS M1530
Version: Not Specified
Serial Number: JG4FLF1
UUID: 44454C4C-4700-1034-8046-CAC04F4C463
Wake-up Type: Power Switch
SKU Number: Not Specified
Handle 0x2000, DMI type 32, 11 bytes
System Boot Information
Status: No errors detected

Want to find out what the BIOS supports and what revision it is at?

$ sudo dmidecode –type bios

# dmidecode 2.12
SMBIOS 2.4 present.
Handle 0x0000, DMI type 0, 24 byte
BIOS Information
Vendor: Dell Inc.
Version: A09
Release Date: 07/14/2008
Address: 0xF0000
Runtime Size: 64 kB
ROM Size: 2048 kB
ISA is supported
PCI is supported
PC Card (PCMCIA) is supported
PNP is supported
BIOS is upgradeable
BIOS shadowing is allowed
Boot from CD is supported
Selectable boot is supported
3.5"/720 kB 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)
CGA/mono video services are supported (int 10h)
ACPI is supported
USB legacy is supported
AGP is supported
Smart battery is supported
BIOS boot specification is supported
Function key-initiated network boot is supported
Targeted content distribution is supported
BIOS Revision: 0.9
Firmware Revision: 0.9

Handle 0x0D00, DMI type 13, 22 bytes
BIOS Language Information
Language Description Format: Long
Installable Languages: 1
Currently Installed Language: en|US|iso8859-1

Pretty useful command, if the output is a bit much try using grep to pull out the information you need. You can also create a scriprt that runs weekly from cron to output the information for inventory purposes, the possiblities are only limited to what you can think of doing.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.