All Cheat Sheets

Linux / Shell Cheat Sheet

Essential Linux and Bash/Zsh commands — file operations, permissions, processes, networking, and text processing.

File Operations

List filesls -la
Change dircd /path/to/dir
Copycp -r src/ dest/
Move / renamemv old new
Removerm -rf dir/
Create dirmkdir -p path/to/dir
Find filesfind . -name '*.ts' -type f
File sizedu -sh dir/
Disk usagedf -h

Text Processing

Search textgrep -rn 'pattern' .
Replace textsed -i 's/old/new/g' file
Column extractawk '{print $1}' file
Sort linessort file.txt
Unique linessort file.txt | uniq
Count lineswc -l file
Headhead -n 20 file
Tail (follow)tail -f logfile

Permissions

Change permschmod 755 file
Change ownerchown user:group file
Make executablechmod +x script.sh

Process Management

List processesps aux | grep node
Kill processkill -9 <pid>
Backgroundcommand &
Top / htophtop
Port usagelsof -i :3000

Networking

Downloadcurl -O https://example.com/file
HTTP requestcurl -X POST -d '{"a":1}' url
DNS lookupdig example.com
Pingping -c 4 example.com
Open portsss -tuln
SSHssh user@host
SCP copyscp file user@host:/path

Archives

Create tar.gztar -czf archive.tar.gz dir/
Extract tar.gztar -xzf archive.tar.gz
Zipzip -r archive.zip dir/
Unzipunzip archive.zip

Keep the references coming

One email a week: new and trending developer tools, fresh comparisons, and what shipped. Unsubscribe in one click.