Pcornel
Linux

Linux Troubleshooting

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

Back to the Topic

Answer

Linux troubleshooting is a method: define the symptom and when it started, check the basics (resources, failed units, logs, recent changes), find the first failing layer, fix it and verify.

Remember

Ask what changed (updates, config, reboot) — dnf history, /var/log/apt/history.log, last reboot. Check the cheap things first: disk full, failed units, time, DNS. Change one thing at a time and keep notes.

First checks

  • last reboot | head — recent reboots
  • journalctl -b -p err — errors this boot
  • systemctl --failed — failed units
  • df -h; df -i — space and inodes
  • ss -tulpn — listening sockets
  • dmesg -T | tail — recent kernel messages

Commands

journalctl -b -p warning --since ...
df -h
df -i
ss -s
systemctl --failed
journalctl -b -p err -n 50
df -h; df -i
ss -tulnp
journalctl --since
systemctl status <unit>
journalctl -u <unit> -b
ip a
ip r
ss -tulpn

Verify in this order

symptom → time → basics → logs → recent changes → first failing layer → fix → verify

Where it usually breaks

First mismatch in persistent intent → provider/parser/generator → kernel/userspace runtime → dependency/security context → logs/counters → consumer-visible read-back; 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=2910

Confirmation

Confirm action

Continue?