Linux Troubleshooting: The Complete Guide
When a Linux box misbehaves, the same dozen problems come up again and again. This is the map: what each symptom means and the fast path to the fix.
Key takeaways
- Start Linux troubleshooting with four commands: uptime for load, free -h for memory, df -h for disk, and journalctl -p err -b for errors since boot.
- They show whether the problem is CPU, memory, storage, or a failing service.
- Then follow the symptom to its fix, such as an OOM kill, a deleted-but-open file, or a file descriptor limit.
On this page
To troubleshoot a misbehaving Linux box, run uptime, free -h, df -h and journalctl -p err -b before touching anything. Together they show whether the problem is CPU or I/O wait, memory, a full filesystem, or a service logging errors. Name that bucket first, then follow the matching section below to the specific fix.
Verified against
systemd 262 (journalctl), GNU coreutils 9.11 (df), procps-ng (free, uptime), against the man7.org man pages and the kernel.org PSI documentation. Checked October 2026.
Most Linux firefighting comes down to the same handful of symptoms: the box is slow, the disk is full, memory is gone, a service won't start, or something is "permission denied." Each has a cause you can pin down in minutes once you know which command to reach for. This guide is the map: for each common problem it says what the symptom actually means, the command that reveals the cause, and where the full fix lives.
Four commands before anything else
uptime # load average over 1, 5, 15 minutes
free -h # memory and swap, human-readable
df -h # disk usage per filesystem
journalctl -p err -b # errors since the last boot
Read them in that order. A load average well above your core count says something is queued; free tells you whether memory is the reason; df rules a full disk in or out; the journal tells you which service is complaining. If all four look clean, the problem is probably network or application-level, and you have saved yourself from guessing.
Two readings trip people up. In free, look at the available column, not free: the man page defines available as an estimate of memory that can be used for new applications without swapping, which includes reclaimable page cache. And in uptime, load is not CPU usage, which is the next section.
"The box is slow"
- High load average: the
uptimeman page defines load as the average number of processes that are either runnable or in uninterruptible sleep, and notes it is not normalized for the number of CPUs. Processes stuck waiting on disk or NFS count, so high load is not always CPU. Sorting it out is in diagnosing high load average. - High CPU: when load really is CPU, the question is which process and whether it's user, system, or iowait time.
topsorted by CPU andps -eo pid,comm,%cpu --sort=-%cpu | headare where that starts, tracked down in debugging high CPU on Linux. - Disk I/O bottleneck: sometimes "slow" is a saturated disk, not CPU. A high
wavalue intopwith modest CPU use is the tell. The deeper tuning angle is in Linux performance tuning for containers and Kubernetes nodes.
"It's out of memory"
- Find what's eating RAM: telling real usage (RSS) from cache and shared memory is where most people misread
free. Explained in find what's using your memory. - The OOM killer fired: a process got killed and you want to know why and how to prevent it. Confirm with
journalctl -k | grep -i 'out of memory', then read the Linux OOM killer. The early-warning signal is in memory pressure (PSI) before OOM:/proc/pressure/memoryreports the share of time tasks were stalled on memory, before anything gets killed. The container versions are Docker exit 137 and Kubernetes OOMKilled.
"The disk is full"
- No space left on device: the classic trap is
dfshowing full whiledudisagrees, usually a deleted-but-still-open file or exhausted inodes. Check inodes withdf -iand open deleted files withlsof +L1. Both cases are handled in disk full when df says otherwise. - The journal itself is the culprit: on long-lived hosts,
journalctl --disk-usagecan report gigabytes. Capping it withSystemMaxUse=is covered in journald log management.
"It won't open, bind, or start"
- Too many open files: hitting the file-descriptor limit under load, fixed with the right
ulimitand systemdLimitNOFILE=settings. Walked through in fixing too many open files. - Address already in use: another process holds the port, or a stale socket lingers in TIME_WAIT.
ss -ltnpshows who is listening. Fixed in address already in use. - Permission denied: ownership, mode bits, ACLs, or SELinux, in that order of likelihood. Diagnosed fast in Linux permission denied, with the fundamentals in Linux file permissions explained.
- A systemd service won't start: the unit fails and you need the real error, not "failed." Run
systemctl status <unit>andjournalctl -u <unit> -b, then read debugging a systemd service that won't start.
"The network is acting up"
Start by splitting name resolution from connectivity: if getent hosts example.com fails but curl to an IP works, it is DNS, and DNS troubleshooting on Linux walks through resolv.conf, systemd-resolved and the usual traps. Socket-level and packet-level problems get their own deep dive in Linux network debugging with tcpdump, ss, and eBPF.
Where this map breaks
The four-command triage assumes a single host you can log into. On a container, free and top often show the host's memory rather than the cgroup's limit, so read /sys/fs/cgroup/memory.max and memory.current instead. On a Kubernetes node, the kubelet may kill or evict pods before the kernel OOM killer fires, so check pod events as well as the kernel log. And if the box is too wedged to run a shell, the evidence is in the previous boot's journal (journalctl -b -1), provided persistent journaling is on.
Questions people ask
What is the first thing to check when a Linux server is slow?
Run uptime and compare the load average to the number of cores from nproc. Load well above the core count means work is queuing. Then check top: high user or system CPU points to a busy process, while high wa (iowait) with low CPU means processes are blocked on disk. Memory pressure shows up in free -h as low available memory and rising swap use.
How do I find out why a Linux process was killed?
Check the kernel log with journalctl -k -b | grep -iE 'killed process|out of memory'. An OOM kill logs the victim's PID, name and memory use. If the process ran under systemd, systemctl status <unit> shows the exit signal, and journalctl -u <unit> shows its last output. Inside containers, exit code 137 means SIGKILL, usually from a memory limit.
Why does df say the disk is full when du shows free space?
Usually a process still holds a deleted file open, so the space stays allocated until that process closes it or restarts. Find these with lsof +L1. The other common cause is inode exhaustion: df -i shows 100% inode use when millions of small files fill the table while bytes remain free. Restart the holder or delete the small files.
The mental model
Almost every Linux problem sorts into one of four buckets: CPU/scheduling (load, high CPU), memory (usage, swap, OOM), storage (disk full, inodes, I/O), or a resource limit (file descriptors, ports, permissions). Naming the bucket from uptime, free, and df turns a vague "it's broken" into a short checklist. The tools rarely change from one distro to the next, which is why building these into reflexes pays off for years.
The call we'd make
Run the four orientation commands before you touch anything, because guessing wastes more time than measuring. Learn to read load versus CPU, available versus free, and df versus du, since those three distinctions explain most false alarms. Each linked guide is the fast path for one specific symptom. Linux is not mysterious once you know where it keeps the evidence: the journal, /proc, and a dozen commands tell you what happened.
Sources
Cite this article
Kiril Urbonas (2026). Linux Troubleshooting: The Complete Guide. DevOpsNess. Updated 2026-10-31. https://www.devopsness.com/blog/linux-troubleshooting-guide
[Linux Troubleshooting: The Complete Guide](https://www.devopsness.com/blog/linux-troubleshooting-guide) (Kiril Urbonas, DevOpsNess, updated 2026-10-31)
More from Linux
Explore more articles in this category
SSH Tutorial: Keys, Config, and Working Remotely
Generate an SSH key, set up passwordless login, and configure aliases for the servers you use daily, all without copy-pasting yet another long command.
Linux Patch Management for Production Fleets: A Real-World Maintenance Workflow
A production-tested Linux patch management workflow for teams that need security fixes without turning every maintenance window into a gamble.
Tracking Down High CPU on Linux
A field-tested workflow for finding which process burns your CPU and whether the time is user, system, or iowait.
You might have missed
Evergreen posts worth revisiting.