Linux Survival Basics
The commands to inspect a machine before guessing.
linux fixes you can inspect first
Short, copyable commands for Linux, hosting, server, and terminal problems. Every published fix includes safety notes, when not to use it, and example output so you can inspect the command before you run it.
Search Linux fixes
Try disk full, nginx 502, ssh failed login, chmod, or find large files.
Current library
start with common problems
topics
The commands to inspect a machine before guessing.
Small checks that separate DNS, TLS, Nginx, and app failures.
Commands worth understanding before copying from the internet.
Defensive commands for checking exposure, logs, permissions, and suspicious activity.
Web hosting, SSL, DNS, Nginx, deployment, backups, and VPS management.
macOS and Apple-adjacent terminal workflows for developers and power users.
verified fixes
A focused entry set from the 347-command library. Use problem hubs when you are starting from a symptom.
The browser said the site was gone. The server was answering fine.
curl --resolve example.com:443:203.0.113.10 https://example.com/
The disk was full, but guessing at folders was the slow part.
find /var -type f -printf '%s %p\n' | sort -nr | head -20
One rsync flag can save you. Another can erase the wrong side.
rsync -avhn --delete ./source/ ./backup/
The app was failing now. Opening a giant log file was the wrong move.
tail -n 80 -f /var/log/nginx/error.log
The error was in the log. The problem was finding it without reading noise.
grep -iE 'error|failed|denied|timeout' /var/log/nginx/error.log | tail -40
The app was running. The port was not listening.
ss -tulpn | grep ':80\|:443'
The permission fix was easy. Knowing what not to chmod was the hard part.
namei -l /var/www/example/index.html
The error was there. The useful part was knowing exactly where it was.
grep -inE 'error|failed|denied|timeout' /var/log/nginx/error.log
The disk was full. The fastest clue was the folder, not the file.
du -sh /var/* 2>/dev/null | sort -h
The log had old failures too. I only cared about the newest ones.
grep -iE 'error|failed|denied|timeout' /var/log/nginx/error.log | tail -10
`rsync --delete` is useful. It is also how people erase the wrong side.
rsync -avhn --delete ./source/ ./backup/ | grep '^deleting'
The file existed. The owner and mode explained why it still failed.
stat -c '%A %U:%G %n' /var/www/example/index.html
The server felt slow. Memory pressure was the first thing to rule out.
ps -eo pid,comm,%mem,%cpu --sort=-%mem | head
Byte counts are precise. Human units are faster under pressure.
find /var -type f -printf '%s %p\n' | sort -nr | head -10 | awk '{printf "%.1f MB %s\n", $1/1024/1024, $2}'
Your dev server says port 3000 is busy. Ask macOS who is holding it.
lsof -nP -iTCP:3000 -sTCP:LISTEN
Free a stuck dev port without hunting through Activity Monitor.
lsof -ti tcp:3000 | xargs kill
Wrong Node, Python, or FFmpeg? Start by reading your PATH clearly.
echo "$PATH" | tr ':' '\n' | nl -ba
Before blaming npm, Python, or Git, check the binary your shell actually found.
command -v node && node -v
Before committing, check whether a huge video, build artifact, or export slipped into your repo.
find . -type f -size +100M -print
When your Mac is full, start with the biggest folders in the current directory.
du -sh ./* 2>/dev/null | sort -h
Changed DNS but your Mac still visits the old place? Flush the resolver cache.
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Need to see whether a file is still changing? Let tail follow it live.
tail -f ./app.log
A wall of logs is useless until you pull the error and the lines around it.
grep -n -C 2 'ERROR' ./app.log
Before opening a broken page in five browsers, ask the server for headers.
curl -I https://example.com
how to read a fix
cert practice
Linux One Liners is useful for unofficial LPIC-1, LFCS, and Linux+ style study because it focuses on the commands people actually need to inspect files, logs, services, packages, permissions, users, storage, and network behavior.
Independent study support only. This site is not affiliated with, endorsed by, or approved by LPI, The Linux Foundation, CompTIA, or any certification provider. No exam dumps and no real exam questions.
GNU/Unix commands, filesystems, permissions, packages, shells, admin tasks, networking, and security basics.
Performance-style drills for essential commands, operations, storage, networking, users, groups, and service triage.
Use the maps as a study checklist, not as official training or exam content.
Step-by-step paths for disk, Nginx, DNS, logs, permissions, rsync, ports, systemd, and beginner cert practice.
Scenario-driven drills for disk, logs, nginx, DNS, ports, permissions, backups, systemd, packages, memory, and SSH review.
example output
Many cards use sample files, local test services, and temporary shell labs so you can see what the command does before trying it on a real machine.
Where a card includes example output, use it as a sanity check before copying the command into a real shell.
quality bar
Every fix needs a clear use case, system-impact notes, recovery guidance, and a reproducible example.
Problem, command, system impact, when not to use it, undo or recovery, expected output, and demo commands.
The site is about troubleshooting, administration, backups, logs, permissions, services, networking, and safe security hygiene.
Certification pages are objective-aligned study support, not official training, real exam questions, or provider-endorsed content.