The hwinfo command is a very handy command line tool that can be used to check details about hardware components. It reports information about most hardware units including cpu, hdd controllers, usb controllers, network card, graphics cards, multimedia, printers etc. Hwinfo depends on the libhd library to gather hardware information which depends on libhal.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related Linux Commands System queries.
In this context, we shall look into how to use the hwinfo command in Linux.
To get hwinfo installed on your Linux system, simply Run apt command shown below:
$ sudo apt install hwinfo
The syntax of hwinfo command is:
$ hwinfo [options]
The [options] gives:
1. –help explains how to use the command:
$ hwinfo –help
2. You can run the command without [options] to display information about all hardware units:
$ hwinfo
3. –short display summary information:
$ hwinfo --short
4. –cpu display CPU information:
$ hwinfo --short --cpu
5. delete –short to display detailed information
6. –network display network interface information:
$ hwinfo --network
7. –netcard display network card information:
$ hwinfo --netcard
8. –disk display disk information:
$ hwinfo --disk
9. –usb display USB device controllers information:
$ hwinfo --usb
10. –storage display hard drive controllers information:
$ hwinfo --storage
To display information on multiple devices at the same time, just add all the options.
For example, We want to display information of USB device, network, disk:
$ hwinfo --usb --network --disk
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
This article covers how to use the hwinfo command in Linux. hwinfo command reports information about CPU, RAM, keyboard, mouse, graphics card, sound, storage, network interface, disk, partition, bios, and bridge, etc,.
The hwinfo utility displays the following information: