dmidecode also referred as Desktop Management Interface table decoder, record data from DMI table and produce it in human readable format. dmidecode command is used when the user want to retrieve system’s hardware related information such as Processor, RAM(DIMMs), BIOS detail, Memory, Serial numbers etc. of Linux system in a readable format. dmidecode command not only displays the system’s current hardware configuration but also the maximum supported CPU and memory.
However, in some Linux/Unix system, it may require root permission in order to run dmidecode command, like the present Linux system which is being used to run the following command require root privilege.
Example 1: Running a simple dmidecode command to get hardware information.
Example 2: To get information about Processor.
Example 3: To get BIOS information.
- -d, –dev-mem FILE: This option is used to read memory from device FILE, where FILE is the file name being used. By default it is /dev/mem.
- -h, –help: Display help and exit.
- -q, –quiet: This option is used to print less verbose output.
- -s, –string KEYWORD: Only display the value of the given DMI string. Suppose if we want to know the value of processor-frequency, we can use the following command along with the keyword(processor-frequency).
- -t, –type TYPE: This option is helpful when we only want to display the entries of a given type. With the help of DMI type id, we can get particular information about a hardware component. Type ids are equivalent to the keyword thus we can either use the type id’s # or we can use the entire keyword to get the information related to that keyword. Type keywords are not case sensitive.
Example 1: To get information about Baseboard we can execute any of the following commands.
sudo dmidecode -t baseboard
sudo dmidecode -t 2
sudo dmidecode --type baseboard
Example 2: To get information about Chassis.
- -u, –dump: Mostly used in debugging processes. This option is used when don’t want to decode the entries rather we want them to be dumped in hexadecimal form.
- –dump-bin FILE: This option comes handy when we don’t want dmidecode to decode the entries but to dump the DMI information to a binary file. The file is the name of the file that is to be used.
- –from-dump FILE: This option Read the DMI data from a given binary file.
- -V, –version: Display the version and exit.