Cheatsheets
Bash cheatsheet
Navigation, pipes, permissions, and process helpers for a Linux shell.
Files and navigation
| Command / topic | What it does |
pwd | Print working directory |
ls -lah | List files with sizes and permissions |
cd - | Jump to the previous directory |
mkdir -p a/b | Create nested directories |
cp -r src dest | Copy recursively |
rm -ri path | Interactive recursive delete |
Pipes and text
| Command / topic | What it does |
cmd | less | Page long output |
grep -RIn needle . | Search recursively with line numbers |
sed -n '1,20p' file | Print lines 1–20 |
awk '{print $1}' file | Print first column |
find . -name '*.js' | Find files by name |
Permissions and processes
| Command / topic | What it does |
chmod u+x script.sh | Make a script executable for you |
ps aux | grep node | Find a process |
kill -15 <pid> | Ask a process to exit gracefully |
df -h | Disk free space |
du -sh * | Directory sizes |
← All cheatsheets · Courses