Linux Survival Basics
The commands to inspect a machine before guessing.
linux fixes you can inspect first
Short, copyable commands for common Linux, hosting, server, and terminal problems. Every published fix includes safety notes, when not to use it, and simulated output from a disposable demo environment.
Current library
285 checked one-liners across Linux basics, web hosting, dangerous commands, and server triage.
285/285 commands have disposable demo output.
problem areas
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 285-lesson library. Use the problem areas for the full catalog.
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
demo vessel
Each demo uses fake files, fake services, and safe fixtures so you can see what the command does before trying it on a real machine.
quality bar
Every fix needs a clear use case, safety notes, recovery guidance, and a reproducible example.
Problem, command, danger rating, when not to use it, undo or recovery, expected output, and demo commands.
Short demos and transcripts are generated from the same checked lesson data.
Useful pages get expanded into deeper guides, videos, and related troubleshooting paths.
project feeds
These feeds support videos, transcripts, and future tooling. Most readers can ignore them.
Titles, captions, target duration, playlist, and voiceover seed text.
Hooks, command snippets, questions, and calls to action for engagement testing.
Privacy-light events to measure copy clicks, export clicks, lesson depth, and outbound video intent.
roadmap
The library is expanding by problem area: Linux basics, hosting, security triage, macOS, CI/CD, and data workflows.