Sometimes you may need to view or display hardware details in Ubuntu. There are many built-in commands in Ubuntu to find hardware details about your system. In this article, we will look at some of the most commonly used commands to display hardware details in Ubuntu. It is always useful to understand what hardware you are using, in case it gets spoilt and you need specifications for replacement, warranty, etc. Also, when you install new hardware on your system, it is important to view its details to ensure that it is exactly what you expect it to be.
How to Find Hardware Details in Ubuntu
Here are the different commands to display hardware details in Ubuntu.
1. Using lspci
lspci is a command that shows you hardware details in a nice and easy way. It provides options -v and -vv to help you control the level of details to be displayed. It also provides different options to help you specifically find information about particular hardware.
If you run the command as-is without options, it will show full hardware information about your system
Here are some commands to get information about specific hardware
You can get information about graphics drivers and hardware by passing the output of lspci command to grep and searching for VGA in it.
$ lspci -nnk | grep VGA -A1
Similarly, you can obtain information about audio hardware by piping output of lspci command to grep and searching for “audio” in it.
$ lspci -v | grep -A7 -i "audio"
Also, you can grep “net” in the output of lspci command to get information about networking hardware.
$ lspci -nnk | grep net -A2
2. Using dmidecode
You can also use dmidecode command to list information about your system hardware. It provides comprehensive information about most hardware on your system.
$ sudo dmidecode
Here are specific commands to obtain detailed information about particular hardware on your system.
CPU hardware information
Here is the command to obtain information about CPU hardware such as processor, manufacturer, speed, cache, core, voltage and more.
$ sudo dmidecode -t4 | less
Similarly, you can find information about your RAM chips such as manufacturer, serial number, part number, slot number, capacity and more.
$ sudo dmidecode -t17 | less
Running the following command will show you the manufacturer, product name, serial number and other details of your system motherboard.
$ sudo dmidecode -t2
Similarly, if you have onboard devices such as video card and sound card, the following command can be used to get their details. It will list information about all onboard devices in one go.
$ sudo dmidecode -t10
For information about available options, use man command
$ man dmidecode
In this article, we have learnt a couple of simple ways to get detailed hardware information about system hardware. Please note, if you are using virtual machines instead of actual hardware then the above commands will display information about your virtual machine and not actual hardware. For example, instead of RAM information, these commands will give information about virtual RAM.