Skip to main content
Linux Troubleshooting: The Complete Guide

Linux Troubleshooting: The Complete Guide

KU
· Founder & Chief Editor
• 7 min read•Updated •

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.

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

Bash
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 uptime man 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. top sorted by CPU and ps -eo pid,comm,%cpu --sort=-%cpu | head are 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 wa value in top with 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"

"The disk is full"

  • No space left on device: the classic trap is df showing full while du disagrees, usually a deleted-but-still-open file or exhausted inodes. Check inodes with df -i and open deleted files with lsof +L1. Both cases are handled in disk full when df says otherwise.
  • The journal itself is the culprit: on long-lived hosts, journalctl --disk-usage can report gigabytes. Capping it with SystemMaxUse= is covered in journald log management.

"It won't open, bind, or 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

Explore topics:LinuxDevOps
React
Share this post
Cite this article
Plain text

Kiril Urbonas (2026). Linux Troubleshooting: The Complete Guide. DevOpsNess. Updated 2026-10-31. https://www.devopsness.com/blog/linux-troubleshooting-guide

Markdown

[Linux Troubleshooting: The Complete Guide](https://www.devopsness.com/blog/linux-troubleshooting-guide) (Kiril Urbonas, DevOpsNess, updated 2026-10-31)

KU

Kiril Urbonas

Founder & Chief Editor

613 articles
View all articles by Kiril Urbonas

You might have missed

Evergreen posts worth revisiting.