All Cheat Sheets
Linux / Shell Cheat Sheet
Essential Linux and Bash/Zsh commands — file operations, permissions, processes, networking, and text processing.
File Operations
List files
ls -laChange dir
cd /path/to/dirCopy
cp -r src/ dest/Move / rename
mv old newRemove
rm -rf dir/Create dir
mkdir -p path/to/dirFind files
find . -name '*.ts' -type fFile size
du -sh dir/Disk usage
df -hText Processing
Search text
grep -rn 'pattern' .Replace text
sed -i 's/old/new/g' fileColumn extract
awk '{print $1}' fileSort lines
sort file.txtUnique lines
sort file.txt | uniqCount lines
wc -l fileHead
head -n 20 fileTail (follow)
tail -f logfilePermissions
Change perms
chmod 755 fileChange owner
chown user:group fileMake executable
chmod +x script.shProcess Management
List processes
ps aux | grep nodeKill process
kill -9 <pid>Background
command &Top / htop
htopPort usage
lsof -i :3000Networking
Download
curl -O https://example.com/fileHTTP request
curl -X POST -d '{"a":1}' urlDNS lookup
dig example.comPing
ping -c 4 example.comOpen ports
ss -tulnSSH
ssh user@hostSCP copy
scp file user@host:/pathArchives
Create tar.gz
tar -czf archive.tar.gz dir/Extract tar.gz
tar -xzf archive.tar.gzZip
zip -r archive.zip dir/Unzip
unzip archive.zip