Hi Friends! Today we will learn about dmidecode command in Linux with examples, this command collects the data from the system and represents it in the human-readable format and also known as Desktop Management Interface table decoder.
Also, we can get the information about our system hardware components as well as the other useful information like a Serial Number, BIOS Version, Manufacturer, etc.
So, let’s start with the first “dmidecode command in Linux“.
# dmidecode Output: # dmidecode 3.1 Getting SMBIOS data from sysfs. SMBIOS 3.0.0 present. Table at 0x7E761000. Handle 0x0000, DMI type 0, 24 bytes BIOS Information Vendor: LENOVO Version: 6UCN56WW(V4.11) Release Date: 06/26/2019 Address: 0xE0000 Runtime Size: 128 kB ROM Size: 6144 kB Characteristics: PCI is supported BIOS is upgradeable BIOS shadowing is allowed Boot from CD is supported Selectable boot is supported EDD is supported
I have highlighted the four part in above output in RED colour.
- Handle 0x0000: This is a unique identifier
- DMI type 0: It tells about the different elements of a system, in the above example the type is 0 means it will show the information about BIOS
- 24 bytes: This is the size of a record and the 4 bytes are reserved, 2 bytes for a handle, 1 byte for a type, and 1 byte for the size and rest size are by the record data.
- BIOS Information: This is known as Decoded values, this contains valuable information about the element in our system.
Let’s have a look at the types of DMI.
So when we use the dmidecode command it shows all the output which we have seen in the tables.
-t option to show the types of elements that are present in the system.
This option has some keywords like bios, system, processor, memory, and many more like this.
Command:# dmidecode -t memory
As you can see that we have type as a memory and it is showing the detail information about the memory.
You can also see the red highlighted part in the image output, so now instead of memory we will put DMI TYPE as 16
For the type also you can refer to the Dropdown list “Let’s have a look at the types of DMI.“
We can use these above types to know the information for a particular component
Command: For Processor# dmidecode -t 4
Command: To see more than one types# dmidecode -t 5,6,16
-s option will show the output by the identified String.
Serial Number of the System: # dmidecode -s system-serial-number
For CPU Detail: # dmidecode -s processor-version
To Find CPU Family: # dmidecode -s processor-family
Baseboard Serial Number: # dmidecode -s baseboard-serial-number
To Find System you are Using # dmidecode -s system-version
How to know the manufacturer of your System # dmidecode -s system-manufacturer
So, there is a file “/sys/devices/virtual/dmi/id” in which the DMI data get collected and suppose we will use this command’s then it will show the output from this file.
Question Answer Session for dmidecode in Linux
# dmidecode -s system-uuid
# dmidecode -s system-serial-number
# dmidecode -t 0
# dmidecode -t system
# dmidecode -t processor
# dmidecode -t 16,17
dmidecode command cheat sheet
The dmidecode commands stands for ?
Which option to be used for DMI types?
Please select 2 correct answers
How to check the Serial Number?
# dmidecode -t 16,17 is this a correct Syntax?
Can we check BIOS information with dmidecode command?
Share your Results:
dmidecode command, dmidecode serial number, dmidecode system-uuid, dmidecode Linux, dmidecode ram info, dmidecode network card,
Link for the Source Code for dmidecode command in Linux.
Thank you for reading this post keep supporting us