Dmidecode, check the BIOS version and other data from the terminal

about dmidecode

In the next article we are going to take a look at dmidecode. This is a tool that read the DMI of a computer (Desktop Management Interface). It will show us the hardware information of the system in a human-readable format. This process is not a problem when you have the Gnu / Linux GUI available but CLI users may find themselves lacking in resources when it comes to obtaining this type of detail from their computers.

Many times we may need know BIOS information. But for one reason or another we do not want or can restart our operating system. Next we will see how we can solve this problem in a simple way using the terminal.

About this command to find out the BIOS version on Gnu / Linux operating systems we already spoke in his day, in an article that was published in this same blog. There we could already see how to use the dmidecode command to analyze the BIOS data. In order to use the dmidecode command, we will only have to login with root permissions.

Dmidecode will inform us about the hardware of our system as described in the BIOS, according to the SMBIOS / DMI standard. This information usually includes the manufacturer, the model name, the serial number, the BIOS version. We will also look at the asset tag, as well as many other details of varying levels of interest and reliability depending on the manufacturer. Often times this will include the usage status of the CPU sockets, expansion slots (eg AGP, PCI, ISA) and memory module slots, as well as the list of I / O ports.

DMI data can be used to enable or disable specific parts of the kernel code depending on the specific hardware. Keep in mind that DMI data is not entirely reliable to blindly trust. Dmidecode does not scan hardware, it only reports what the BIOS responds to.

Dmidecode was first written by Alan Cox. It was later developed and maintained again by Jean Delvare. After a period of 5 years, Anton Arapov took over. It is published under the General Public License (GPL). For more details, you can take a look at the AUTHORS and LICENSES files. We will find these files with the source code.

Dmidecode includes three additional tools which are:

  • biosdecode → Print the entire BIOS related information that you can find.
  • ownership → Retrieve the 'Property Tag'that can be configured in the Compaq equipment.
  • vpddecode -> print the information of 'vital product datao 'that can be found in almost every IBM teams.

Dmidecode, get BIOS version from terminal

If you are logged in with a root user, you can type the following command in the terminal (Ctrl + Alt + T):

dmidecode | less

If you don't have root access, you can also use it with sudo:

sudo dmidecode | less

dmidecode less

This screenshot only shows a piece of all the data returned by any of the above commands.

Check BIOS firmware version with dmidecode

Next we will see the BIOS version using the -s option:

dmidecode -s bios-version

sudo dmidecode -s bios-version

If we want different data and to be shown in a summarized way, we can try a loop in bash. With it, something similar to this capture will be shown in the terminal:

dmidecode bash script

for d in system-manufacturer system-product-name bios-release-date bios-version
do
echo "${d^} : " $(sudo dmidecode -s $d)
done

The simplest way to print summary BIOS information is using the dmidecode command as follows:

sudo dmidecode --type bios

The output that the previous command will give us will be something like the following:

dmidecode --type bios

The dmidecode command summarizes information about your system's hardware (laptop / desktop / server) as described in the BIOS. For more information about this tool, you can consult the official project page.


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

Be the first to comment

Leave a Comment

Your email address will not be published.

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.