Reference

Cheat Sheet

The commands you keep forgetting, with a one-line description and a real example you can copy - 384 across 26 tools. Pick a tool in the sidebar, or search across all of them.

Bash / Linux

The shell commands you reach for every day on any Unix box.
CommandWhat it doesExample
lsList directory contents, with detail and hidden files.ls -lah
cdChange the current directory.cd /var/log
pwdPrint the directory you are in.pwd
cpCopy files or folders.cp -r src/ backup/
mvMove or rename a file.mv draft.md final.md
rmDelete files or folders (careful with -rf).rm -rf build/
mkdirCreate directories, including parents.mkdir -p src/components
catPrint a file to the screen.cat README.md
lessPage through a long file (q to quit).less app.log
tail -fFollow the end of a file as it grows.tail -f /var/log/nginx/access.log
grepSearch file contents, recursively and case-insensitively.grep -rin "timeout" .
findFind files by name or type.find . -name "*.test.js"
sedFind and replace text in a file in place.sed -i 's/localhost/127.0.0.1/g' config.yml
awkPull out columns from text/logs.awk '{print $1, $7}' access.log
chmodChange file permissions.chmod +x deploy.sh
tarCreate a compressed archive of a folder.tar -czf site.tar.gz public/
psList processes; pair with grep to find one.ps aux | grep node
killSend a signal to a process by PID.kill -9 48213
df / duCheck disk space and folder sizes.df -h && du -sh *
xargsTurn a list of items into command arguments.find . -name "*.tmp" | xargs rm
ln -sCreate a symbolic link.ln -s /opt/app/bin/app /usr/local/bin/app
curlMake an HTTP request from the terminal.curl -s https://api.github.com/zen