lsblk, lshw, lsmod, lspci: Hardware, up close and personal

I’m out of order again, but I can write this while offline and copy it into the browser for minimal network stress. Here’s lsblk, lshw, lsmod and lspci, from left to right.

2013-12-18-lv-r1fz6-lsblk 2013-12-18-lv-r1fz6-lsmod 2013-12-18-lv-r1fz6-lspci 2013-12-18-lv-r1fz6-lshw

All of these fell within the L section and all have relatively the same function — show what hardware is present, and how the system communicates with it. Strictly speaking, these are troubleshooting tools and as far as I know they don’t harbor any easter eggs.

lsblk — list block devices — tells you drives and similar hardware that are plugged in, their partitions, and where they fall in your system. lsblk is bundled with util-linux.

lshw — list hardware — can give you a rundown of the hardware detected in your system, which is always helpful. In some distros, like Arch, it is not installed by default.

lsmod, list modules, shows modules inserted in response to the hardware profile, or your demands. My example up there is sorted, just for readability.

Finally lspci, which lists PCI devices, and if you ask nicely, the modules that are/were needed to run them. By default lspci is a little more terse; the screenshot shows it with a triple v flag for maximum detail.

Any one of these can give you the information you might need, and each one has their own slant on hardware detail. If you’re a fellow hardware junkie or if you need to pin down a particular problem without the need of graphics, this is what I would suggest. 😉

Bonus! lsusb, which shows USB devices present in the system!


Wow! The fun never ends! :mrgreen:

Double bonus! lshw has a graphical interface!


The fun really never does end! 😯 😐

2 thoughts on “lsblk, lshw, lsmod, lspci: Hardware, up close and personal

Comments are closed.