Navigation and files
pwd— show working directoryls -lha— list with permissions and sizescd -— toggle between last two directoriesfind . -maxdepth 2 -type f -name '*.log'— locate logs quicklydu -sh ./* | sort -h— see directory sizes
Editing safely
sudo cp file{,.bak}— make a quick backupsudo tee /etc/app/config.yaml <<'EOF' ... EOF— safe overwritesudoedit /etc/app/config.yaml— respect sudoers editor
Processes and resources
ps -eo pid,ppid,%cpu,%mem,cmd --sort=-%cpu | head— hot processestop/htop— live viewfree -h— memory snapshotuptime— load averagesjournalctl -f -u app.service— follow service logs
Networking
ip a/ip r— addresses and routesss -tulpn | head— listening socketscurl -v http://127.0.0.1:8080/health— local health checktraceroute/mtr— path checkstcpdump -i eth0 port 443 -c 20— capture samples (requires sudo)
Compression and archives
tar -czf backup.tar.gz /srv/app— create archivetar -xzf backup.tar.gz -C /restore— extractzip -r files.zip dir/— zip directory
Quality-of-life aliases (examples)
alias ll='ls -lha --group-directories-first'alias cls='clear && printf "\\033c"'alias ktop='kubectl top pod'