ℹ️
Applies to: RHEL, CentOS, Ubuntu, Debian, and most systemd-based Linux distributions. Commands may vary slightly by distro.
01
Disk Space Full — No space left on device
Check which filesystem is full, then find the largest consumers.
df -h # show all filesystems
du -sh /var/log/* | sort -rh # find largest log dirs
find / -size +500M 2>/dev/null # find files over 500MB
journalctl --vacuum-size=500M # trim systemd journal
02
High CPU / Memory Usage
Identify and handle runaway processes. Check for memory leaks causing OOM kills.
top # interactive process viewer
ps aux --sort=-%cpu | head # top CPU consumers
ps aux --sort=-%mem | head # top memory consumers
kill -9 <PID> # force-kill a process
# Check for OOM kills:
dmesg | grep -i 'oom\|killed'
03
Network Connectivity Issues
Diagnose from layer 3 upward — IP config, routing, DNS, then application-level connectivity.
ip addr show # check IP configuration
ping -c 4 8.8.8.8 # test internet reachability
dig google.com # test DNS resolution
ss -tulnp # check listening ports
systemctl restart NetworkManager # restart network service
04
Service Startup Failures
Use systemctl and journalctl together to find the root cause of a service that won't start.
systemctl status <service-name>
journalctl -xeu <service-name> # full logs with context
# Common fixes:
systemctl daemon-reload # reload unit files after editing
systemctl enable <service> # ensure service starts on boot
05
File Permission Problems
Check ownership, permissions, and SELinux/AppArmor context. All three can independently cause 'Permission denied'.
ls -la /path/to/file # show permissions and owner
chmod 755 /path/to/file # set rwxr-xr-x
chown user:group /path/to/file # change owner
# SELinux check:
getenforce # Enforcing / Permissive
ls -Z /path/to/file # show SELinux context
💡
Quick diagnostic sequence:
df -h → top → systemctl status → journalctl -xe. Run these four commands in order on any misbehaving Linux server to cover the most common failure modes in under 2 minutes.