problem hubs

Start from the Linux problem. Choose the safest first command.

Repair paths for common Linux failures: first safe command, expected output, what to read next, and what not to change yet.

32 problem hubs

Problem library

Read-only first 5 commands

Docker disk full on Linux

Measure Docker image, container, volume, and build-cache usage before pruning anything that may hold data.

docker system df -v
Read-only first 5 commands

Journal logs too large on Linux

Measure systemd journal usage and retention before vacuuming logs or deleting journal directories.

journalctl --disk-usage
Read-only, escalate on I/O errors 3 commands

Read-only filesystem on Linux

Check mount options and kernel storage errors before remounting read-write or editing fstab.

findmnt -no TARGET,OPTIONS /
Read-only first 6 commands

Too many open files on Linux

Check system file-handle pressure, process open files, and service limits before raising limits or restarting services.

cat /proc/sys/fs/file-nr
Read-only first 4 commands

Cron job not running on Linux

Check the active crontab, cron service, logs, user, environment, and script assumptions before rewriting the schedule.

crontab -l
Read-only, sensitive output 6 commands

SSH Permission denied publickey

Inspect auth logs, authorized_keys, file modes, and effective sshd policy before changing access.

grep -E 'Failed publickey|Accepted publickey|Authentication refused' /var/log/auth.log | tail -50
Read-only first 6 commands

Linux permission denied

Trace owner, mode, ACL, symlink, and parent-directory permissions before recursive chmod or chown.

namei -l /var/www/example/index.html
Read-only first 6 commands

Nginx 502 Bad Gateway

Separate Nginx config, upstream listener, proxy target, and application failure before reloading services.

sudo nginx -t
Read-only first 5 commands

systemd service failed

Read service state, result fields, current-boot logs, restart loops, and unit drop-ins before restarting or editing a service.

systemctl status app-worker --no-pager --lines=50
Read-only 5 commands

DNS not resolving on Linux

Compare resolver answers, authoritative answers, TTL, direct HTTP checks, and server reachability before changing DNS again.

dig +short example.com A
Read-only first 5 commands

Port already in use on Linux

Find the listener, process, bind address, and firewall context before killing or restarting anything.

ss -ltnp
Preview first 6 commands

APT or dpkg repair needed

Inspect package state, held packages, candidates, and simulated changes before running repair commands.

apt-get -s upgrade
Read-only, sensitive output 4 commands

High CPU process on Linux

Rank CPU consumers and capture process context before killing or restarting a service.

ps -eo pid,ppid,stat,pcpu,pmem,comm,args --sort=-pcpu | head
Read-only, sensitive output 6 commands

High memory process on Linux

Check memory, swap, top memory processes, containers, and OOM logs before restarting workloads.

free -h
Read-only first 4 commands

Package lock held on Linux

Find the package manager process, lock owner, and timer before deleting lock files or forcing package repair.

ps -ef | grep -E 'apt|dpkg|dnf|yum|pacman' | grep -v grep
Read-only first 4 commands

Bad interpreter or CRLF script error

Inspect the shebang and line endings before rewriting scripts or changing execute permissions.

head -1 script.sh | cat -v
Read-only first 4 commands

Firewall port blocked on Linux

Prove the service is listening, then read host firewall rules before opening ports.

ss -ltnp
Read-only first 3 commands

Mount failed from fstab

Verify fstab entries and boot-time mount failures before rebooting or editing storage paths.

findmnt --verify
Read-only first 3 commands

OOM killer logs on Linux

Confirm whether the kernel killed a process for memory pressure before restarting workloads or changing limits.

journalctl -k --since '24 hours ago' --no-pager | grep -iE 'out of memory|oom-killer|killed process'
Read-only first 5 commands

User is not in sudoers

Check identity, groups, and sudo policy before editing sudoers or adding broad admin access.

id username
Read-only first 5 commands

Nginx 403 forbidden

Diagnose path permissions, Nginx root/alias config, access rules, and error logs before changing modes or ownership.

sudo nginx -t
Read-only first 4 commands

Certbot renewal failed

Use dry-run renewal, certificate inventory, Certbot logs, and DNS checks before editing live TLS config.

sudo certbot renew --dry-run
Read-only first 4 commands

Default route missing on Linux

Inspect route table, interface addresses, NetworkManager state, and resolver state before restarting networking.

ip route
Read-only first 3 commands

Logrotate not running

Debug logrotate config and timer state before forcing rotation or truncating logs.

logrotate -d /etc/logrotate.conf
Read-only first 4 commands

Boot partition full on Linux

Check /boot usage, installed kernels, and the running kernel before cleanup.

df -h /boot
Read-only first 3 commands

SSH known_hosts changed warning

Verify stored and presented host keys out of band before editing known_hosts.

ssh-keygen -F hostname
Read-only first 5 commands

Nginx serving the wrong SSL certificate

Inspect the live certificate, Nginx server block, Certbot inventory, and DNS before reissuing or reloading TLS config.

openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | openssl x509 -noout -subject -issuer -dates
Read-only first 5 commands

Apache 403 forbidden

Check Apache syntax, enabled sites, document root, Directory rules, path permissions, and error logs before chmod or ownership changes.

sudo apachectl configtest
Read-only first 4 commands

Docker container restart loop

Inspect container status, logs, restart policy, exit code, and recent events before rebuilding or deleting containers.

docker ps -a --format 'table {{.Names}}\t{{.Image}}\t{{.Status}}\t{{.RestartCount}}'
Read-only first 4 commands

systemd timer not running

Inspect timer schedule, status, unit file, and recent journal entries before enabling, starting, or editing timers.

systemctl list-timers --all --no-pager
Sensitive output 5 commands

SSH too many authentication failures

Check auth logs, loaded agent keys, explicit identity selection, and verbose client output before changing sshd or deleting keys.

grep -i 'Too many authentication failures' /var/log/auth.log /var/log/secure 2>/dev/null | tail -20