Get Information About Your Hardware With hwinfo Utility

There are many tools that are built to get information about hardware components and one of them is the hwinfo command-line linux utility. It is used to probe the system for the present hardware and can also generate a system overview log which can be later used for different purposes such as support.

I find the hwinfo command-line utility very useful when I want to get information about my usb controllers, printers,network cards and cpu.

You can probe the following items with the hwinfo tool:

  • bios
  • block
  • bluetooth
  • braille
  • bridge
  • camera
  • cdrom
  • chipcard
  • cpu
  • disk
  • dsl
  • dvb
  • fingerprint
  • floppy
  • framebuffer
  • gfxcard
  • hub
  • ide
  • isapnp
  • isdn
  • joystick
  • keyboard,
  • memory
  • modem
  • monitor
  • mouse
  • netcard
  • network
  • partition
  • pci
  • pcmcia
  • pcmcia-ctrl
  • pppoe
  • printer
  • scanner
  • scsi
  • smp
  • sound
  • storage-ctrl
  • sys
  • tape
  • tv
  • usb
  • usb-ctrl
  • vbe
  • wlan
  • zip

The hwinfo utility comes installed by default in Ubuntu and other Debian based systems, but if it not included in your installation you can easily install it by running the following command in your terminal.

sudo apt-get install hwinfo

Once the installation is finished you can run the following command in your terminal to find the version of the hwinfo tool you are using.

hwinfo --version

After running the above command I get the following output displayed in my terminal screen.


If you don’t like details or are looking for a short output, the –short option provides a short listing of your hardware without details.

hwinfo --short

Saving the output of the above command in a text file is always a very good idea. It is not very effective to read all the information displayed in the console.

Run the following command to save the output in a text file.

hwinfo --short > hwinfo.txt

Fortunately, the hwinfo tool has a very useful option that allows the user to write the information into a log file. The –log option will help you to log all the data to a file.

For example, the following command will log all the data to hardwareinfo.txt file.

hwinfo --short --log hardwareinfo.txt

But, how do you find information about a specific hardware component? It is very easy, just type hwinfo and after it type the name of the hardware component for which you are searching information.

hwinfo --short --network

The above command will display information on network interfaces that are available on the system you are running the command.

I get the following output after running the above command in my terminal.

wlan0 WLAN network interface
eth0 Ethernet network interface
lo Loopback network interface
vmnet8 Ethernet network interface
vmnet1 Ethernet network interface

Do you like to get some information on your cpu? Then replace the –network with –cpu in the above command and everything should be ok.

hwinfo --short --cpu

You can also display information about hard drive controllers by using –storage like shown in the following command.

hwinfo --short --storage

I think you guys know how to get information on any hardware component present in your system now. Just choose one of the supported items above, or use –all to find and display information about all of them.

hwinfo --all

The option –all is very useful but I recommend to log the output to a file by using the –log option when working with it because it may display a very long output.


Tags: , ,