Introduction
hwinfo (Hardware Information) is a very useful command to check details about hardware components. It shows information about most hardware units including CPU, RAM, graphic cards, USB controllers, …
hwinfo uses libhd library to gather hardware information on the system.
This article will show you how to use the hwinfo command in Linux as we go through below.
Installing hwinfo in Linux
Run apt command:
$ sudo apt install hwinfo
The syntax of hwinfo command
$ hwinfo [options]
[options]
–help explains how to use
$ hwinfo –help
output:
run without [options] display information about all hardware units
$ hwinfo
output:
–short display summary information
$ hwinfo --short
output:
–cpu display CPU information
$ hwinfo --short --cpu
output:
delete –short to display detailed information
–network display network interface information
$ hwinfo --network
output:
–netcard display network card information
$ hwinfo --netcard
output:
–disk display disk information
$ hwinfo --disk
output:
–usb display USB device controllers information
$ hwinfo --usb
output:
–storage display hard drive controllers information
$ hwinfo --storage
output:
Display multiple devices together
To display information on multiple devices at the same time, just add all the options.
For example, I want to display information of USB device, network, disk:
$ hwinfo --usb --network --disk
output:
Export information to a file
If you want to export detailed information:
$ hwinfo --log hwinfo.txt
If you want to export summary information, add –short option:
$ hwinfo --short --log hwinfo.txt
Conclusion
You’ve already gone through the details of how to use the hwinfo command in Linux.
Thanks for reading.