lspci

This standard system utility will show you much of what you’ve got internally. Yes, the name of the command is a combination of ls, the standard command to list files, and PCI, the peripheral connection. Despite that, it doesn’t show only PCI devices and you can expect your results to include AGP and onboard components like your USB chipset.

It’s often helpful to pipe the results of lspci through grep, so that you can filter out just the parts you’re looking for. Use lspci -v or lspci -vv for additional output.
Pros: Built in to virtually any Linux OS, quick and easy, thorough output. Cons: Somewhat limited in the types of devices it can display.

hwinfo

While lspci does more than just PCI, it doesn’t tell you anything about your hard disks, CPU, USB devices, etc. If lspci can’t handle it, hwinfo probably can. This application performs a much more thorough scan to determine what bits you’ve got connected to your PC, and provides a LOT of info by default.

As seen in the screenshot, you can use –short to provide more concise output, and –devicetype to list a specific type of information.Some of the more useful device types include:

bluetooth camera cdrom cpu disk gfxcard ide memory monitor netcard partition printer scanner scsi sound usb wlan

Pros: Extensive output, very large device type support Cons: Requires root privileges on many systems. Also not included in many base Linux installs. It should, however, be in the standard repositories of most major distributions.

lshw

This tool comes in two forms, a command line version and a GTK graphical front-end. Testing for this article showed it to be somewhat less comprehensive than hwinfo, but makes up for it with a useful GUI (lshw-gtk) and the ability to output the results to HTML/XML.

Pros: Graphical frontend, particularly useful output options. Cons: Produces very little output without root access, and even with root it doesn’t match up to hwinfo in raw power.

/proc

We’ve covered the information treasure trove that is /proc previously, so we won’t go into much detail here. Suffice it to say that the “files” in /proc aren’t normal files, and most of them contain constantly-updating data about the state of the system. To get information about your CPU, for example, you can just view the contents of /proc/cpuinfo, as shown here.

Pros: Found on virtually all Linux systems, requires no external applications whatsoever Cons: No easy way to perform a all-in-one scan, and may not contain all the info you wish.

Bonus – dmesg

While not exactly a hardware probing tool, you can you dmesg to find out some info about hardware events. All it does is display the contents of the system log, which saves info about various system events. For example, if you’ve got a USB thumbdrive you just plugged in, your system saves some info about it to the log. dmesg displays that log and can show you, among other things, the name of the device.

Conclusion

Each method described here has its own advantages, but hwinfo seems to take the crown for most comprehensive. In particular, hwinfo’s ability to quickly and easy show connected drives and partitions stands out as useful to me. Whichever method or combination of methods you choose, you should be ready to find all the info your system can provide. Image credit: kodomut