Terminal Commands Quick Reference
every command you use as a developer — click to copy
pwdprint working directory
ls -lalist all with details
ls -lhhuman readable sizes
cd ~go to home
cd -go to previous dir
cd ..go up one level
treevisual dir structure
touch filecreate empty file
mkdir -p a/bcreate nested dirs
cp -r src dstcopy recursively
mv old newmove / rename
rm -rf dirdelete dir (careful!)
cat fileprint file contents
less filescroll through file
grep -rsearch recursively
grep -nshow line numbers
find . -namefind by name
find -mtime -7modified last 7 days
which cmdfind command path
history|grepsearch command history
ps auxlist all processes
kill -9 PIDforce kill process
pkill -f namekill by name
htopinteractive process viewer
cmd &run in background
nohup cmd &keep running after logout
wc -lcount lines
sed s/a/b/gfind and replace
awk $1print column
sort|uniq -ccount unique lines
cut -d, -f1extract CSV column
tail -flive log following
curl -s urlsilent HTTP request
df -hdisk usage
du -sh *size of each item
chmod +xmake executable
ssh user@hostconnect to server
scp file hostcopy to server
|pipe output to input
>redirect (overwrite)
>>redirect (append)
2>/dev/nulldiscard errors
&>/dev/nulldiscard all output
&&run if previous succeeds
git statuswhat changed
add . commitstage all & commit
log --onelineshort commit history
git diffunstaged changes
stash / popsave & restore changes
reset --hardundo last commit
npm run devstart dev server
pip install -rinstall python deps
venv + activatecreate python env
uvicorn --reloadrun FastAPI
docker compose upstart containers
kill-port 3000free occupied port