hwinfo is a command line tool that is used to show information about all your hardware. Almost all hardware information can be seen here. Such as CPU, motherboard, ram, storage, keyboard, mouse, and so on. This tool is pretty neat actually. With just simple command you can get quick information about your hardware.
hwinfo was formerly developed for openSUSE, but later on, it became available for other distros, like Ubuntu, Linux mint, manjaro, and many more.
In this article, you will learn how to install hwinfo on your ubuntu 22.04. You will also learn how to use some of its command options. By the end of this article, you should be comfortable using hwinfo command.
How to install hwinfo
Okay, let’s jump into the installation process.
First, open your terminal.
You need to update your package repositories to make sure that all repositories are updated. To do that, enter the command below into your terminal and hit enter.
sudo apt update
After updating package repositories, now you can install hwinfo using the command below.
sudo apt install hwinfo
Wait until the installation process is completed. Once it’s done, the hwinfo should be already installed on your ubuntu machine.
hwinfo command examples
After successfully installing hwinfo, now you will learn how to use it. The command is pretty straightforward actually.
Execute hwinfo without options
hwinfo
It will give you all the details about every piece of hardware on your machine. Running hwinfo without argument will give you verbose output. It’s good if you want to see some specific detail of your hardware.
Execute hwinfo with --short
argument.
hwinfo --short
Basically the –short argument will give you similar output as the previous command, but with way less verbose. The main data you will get is the hardware name, and hardware details(mostly manufacture info).
Execute hwinfo with individual hardware
Here are some example
hwinfo --disk
hwinfo --monitor
hwinfo --pci
hwinfo --cpu
hwinfo --keyboard
There are still many other hardware options available, but for this example, I just show only 5 options.
With hardware argument, we can get the detail for specific hardware. You don’t need to load all hardware data.
To see the other possible hardware, you can look at the help page by using the command below
hwinfo --help
With the –help argument, you can also see the other possible argument too. You can see the output of the –help argument in the image below.
log the output into a file
hwinfo --cpu --log cpu-log.txt
–log argument is used to log the output from hwinfo into a text file. This argument is also quite useful because you can examine the log file later.
How to uninstall hwinfo
When you don’t need hwinfo anymore, you can simply uninstall it with the command below
sudo apt remove hwinfo
Conclusion
hwinfo is a neat tool to display your hardware details. Even though you won’t use this too every day, it is still useful in case you want to know about your hardware information. Hopefully, you learn much everything about hwinfo from this article.