Not a full manual — just the commands that come up constantly once you're regularly working in a terminal.
Navigation and files
pwd # print working directory
ls -la # list all files, including hidden, with details
cd /path/to/dir # change directory
find . -name "*.log" # find files by name pattern, recursivelySearching inside files
grep -r "TODO" src/ # search recursively for a string
grep -rn "TODO" src/ # same, with line numbers
grep -riE "error|fail" app.log # case-insensitive, extended regexgrep is one of the highest-leverage commands to actually know well — being fast at searching logs and codebases from the terminal saves real time over reaching for a GUI search tool every time.
Process management
ps aux # list all running processes
ps aux | grep node # find a specific process
kill -9 <PID> # force-kill a process by ID
top # live view of resource usage
htop # nicer interactive version of top (often needs installing)Disk and memory
df -h # disk space, human-readable
du -sh * # size of each item in the current directory
free -h # memory usage, human-readablePermissions
chmod +x script.sh # make a file executable
chmod 644 file.txt # rw for owner, r for group/others
chown user:group file # change ownershipPiping and redirection — where the real power is
cat access.log | grep "500" | wc -l # count lines containing "500"
ls -la | sort -k5 -n # sort files by size
command > output.txt # redirect output to a file (overwrite)
command >> output.txt # append instead of overwrite
command 2>&1 # redirect stderr into stdoutThe pipe (|) is what makes the command line genuinely powerful — chaining small, single-purpose tools together to do something none of them do alone.
Networking
curl -I https://example.com # fetch just the response headers
curl -s https://api.example.com/data | jq . # fetch JSON and pretty-print it
ping -c 4 example.com # test connectivity, 4 packets
netstat -tulpn # list listening ports and the processes using themSSH and file transfer
ssh user@host # connect to a remote machine
scp file.txt user@host:/remote/path/ # copy a file to a remote machine
rsync -avz local/ user@host:/remote/ # sync a directory, only transferring changesrsync is worth knowing over scp for anything beyond a single file — it only transfers what's changed, which matters a lot for repeated syncs of large directories.
A habit worth building
man <command> and <command> --help answer most "wait, what were the flags for this again" questions faster than searching the web, and work offline. Building the habit of checking there first, before reaching for a search engine, pays off the more time you spend in a terminal.