Sometimes in Linux, your shiny new hardware does... absolutely nothing.
No blinking lights.
No sounds.
No signs of life.
You’re left wondering, is it dead? Is it me? Is it Linux?
Today, I dove into Linux hardware inspection figuring out what’s broken and where to start when your devices go silent. Here's what I learned, plus a few tips that might save you hours of hair-pulling.
Step 1: Is It Even There?
Before screaming at your OS, check if the hardware is actually being detected.
lspci — Listing PCI Devices
lspci
This command shows all the devices connected to your PCI bus (like graphics cards, network cards, etc.).
Want more info about a specific device? Use:
lspci -s [device address] -v
lsusb — Listing USB Devices
lsusb
This shows USB devices (keyboards, flash drives, webcams). If it doesn’t show up here try another port. USB ports die more than you'd think.
Tip: If the device is missing from both lsusb and lspci, you might be dealing with a hardware port failure, not a Linux issue.
Step 2: OK, It’s There… Why Isn’t It Working?
If the device shows up in lspci or lsusb but isn’t working right, it’s probably missing the software component needed to control it: a kernel module (a driver).
lsmod — List Loaded Kernel Modules
lsmod
This gives you a snapshot of all active kernel modules:
Module — the name of the driver
Size — memory used
Used by — which other modules depend on it
Some modules are like introverts at a party, they don’t do much unless someone else calls on them.
Another useful tool is modprobe (Load/Unload Kernel Modules)
Let’s say you want to reload a module to see if it fixes the issue:
sudo modprobe -r [modulename] # unload
sudo modprobe [modulename] # load again
Use this to test if a module is flaky or to trigger reinitialization.
Step 3: Peek Into Linux's Brain
Linux stores tons of real-time hardware info in virtual filesystems: /proc, /sys, and /dev. These aren’t files on your disk — they live in RAM and reflect what the kernel knows right now.
/proc — The Kernel’s Thought Process
/proc/cpuinfo — Info about your CPU(s)
/proc/interrupts — What devices are requesting CPU attention
/proc/ioports — I/O ports currently in use
/proc/dma — Devices using Direct Memory Access (DMA)
It’s like opening the Matrix, but only if Neo was a system admin(I will let myself out).
/sys — Structured Hardware Data
While /proc mixes device and process info, /sys is more organized:
/sys/class/net/ — Networking
/sys/class/block/ — Storage
/sys/bus/usb/devices/ — USB devices
Think of /sys as /proc's more focused sibling specifically built for representing hardware and kernel interfaces.
/dev — Where Devices Become Files
In Linux, everything is a file even hardware.
Back in the prehistoric kernel 2.4 days, hard drives were named like this:
/dev/hda1, /dev/hda2 — Master IDE devices
Now, Linux uses:
/dev/sda, /dev/sdb, etc for SATA and SCSI(fun fun fact I really don't know what these are) devices
Fun Fact: These aren’t real files. They’re "special files" that represent devices. You can even pipe stuff into them (carefully!).
Quick Troubleshooting Flow
Device not working?
→ Run lspci or lsusb. If it’s not there, check your port/hardware.
Device is detected but unresponsive?
→ Run lsmod, look for the right module. Reload with modprobe.
Still stuck?
→ Dive into /proc and /sys for deeper inspection.
Need to identify storage devices?
→ Check /dev where drives and partitions show up.
Tools Worth Bookmarking
dmesg — Shows kernel boot and runtime logs (great for driver errors)
udevadm monitor — See live device event logs
hwinfo — Deep hardware summary (installable)
lshw — Hardware lister with class/type filtering
TL;DR Linux Device Inspection for Debugging Hardware Issues
Step 1: Use lspci (PCI devices) and lsusb (USB devices) to check if the OS detects the hardware.
Step 2: Use lsmod to view kernel modules (drivers); modprobe to reload or manually load them.
Step 3: Dive into /proc, /sys, and /dev for real time, low level hardware and device info.
Bonus tools: dmesg, udevadm monitor, hwinfo, lshw help with deeper diagnostics.
If the hardware isn’t detected: hardware issue or port failure.
If detected but not working: driver/module issue.
If still broken: poke around /proc, /sys, and logs like a true Linux sleuth.
Linux gives you all the tools you just have to know where to dig.
Top comments (1)
Lol the cause of me rolling back to windows was my faulty wifi card causing my system to freeze 🥶.