Pcornel
Linux

Kernel & Hardware

Cheat sheet · https://pcornel.dk/topic.php?topic=2839

Back to the Topic

Answer

Kernel and hardware topics cover how Linux detects devices, loads drivers (modules), exposes them in /proc and /sys, and reports hardware errors.

Remember

Check detection first (lspci, lsusb, lsblk), then the driver (lspci -k), then kernel messages. Firmware files (linux-firmware) are often needed for NICs and Wi-Fi.

First checks

  • uname -r — running kernel
  • lsmod — loaded modules
  • lspci -k — PCI devices and the driver in use
  • lsusb — USB devices
  • journalctl -k -b -p warning — kernel warnings this boot

Commands

uname
Display kernel name, release, architecture and related system identity fields.
lsmod
List currently loaded kernel modules and their use counts.
modprobe
Load or remove kernel modules while resolving module dependencies and configuration.
modinfo
Display metadata, parameters, aliases and file information for a kernel module.
sysctl
Read or write exposed kernel runtime parameters under the sysctl interface.
lspci
Enumerate PCI devices and expose vendor, device, class and driver-related information.
lsusb
Enumerate USB devices and display bus, device and descriptor information.
dmidecode
Decode firmware-provided SMBIOS/DMI tables for hardware and platform inventory.
smartctl -H -A /dev/sda
journalctl -k -g "WARNING:"

Verify in this order

device detected on its bus → driver module loaded → firmware loaded → device node/interface → usable

Where it usually breaks

First mismatch in hardware/kernel capability → scheduler/mm/device → cgroup/namespace → process/thread → service/runtime → workload behavior/counters; preserve identity/native diagnostic/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2839

Confirmation

Confirm action

Continue?