The hwinfo is a tool that can allows to get details about various hardware components on a system via command line. This tool shows information about CPU, RAM, disks, network interfaces, USB controllers, etc. The hwinfo was developed for openSUSE but lately was adapted for other Linux distributions such as Ubuntu, Debian, etc.
This tutorial explains how to install hwinfo on Ubuntu 20.04.
Execute the following command to update the package lists:
sudo apt update
sudo apt install -y hwinfo
When installation is completed, we can check version of hwinfo:
In order to get detailed information about all hardware components, you can run the
hwinfo command without arguments:
--all option allows to get the same result as well:
We can use
--short option to get brief information about the hardware components:
The hwinfo also provides options to view information for specific hardware component:
hwinfo --cpu hwinfo --memory hwinfo --disk hwinfo --network hwinfo --usb
If you want to completely remove hwinfo and related dependencies, execute the following command:
sudo apt purge --autoremove -y hwinfo