Navigation, files, text processing, processes, networking and shell tricks for everyday terminal work. All rows are plain text - search to filter, click Copy to grab the pattern.
Reference rack
STATUSREADY
ROWS52
NETWORKLOCAL
MODEREFERENCE
| Item / pattern | What it means / how to use it | |
|---|---|---|
| pwd | Print the working directory. | |
| ls -la | List everything, including hidden files, with details. | |
| cd ~ / cd - | Home directory / previous directory. | |
| cp -r src/ dst/ | Copy recursively (folders and contents). | |
| mv file dir/ | Move or rename. | |
| rm -rf dir | Delete a folder and everything in it - read the path twice before running. | |
| mkdir -p a/b/c | Create nested directories in one call. | |
| touch file | Create an empty file or refresh its mtime. | |
| cat file | Print a file to stdout. | |
| less file | Paged viewer with /search; press q to quit. | |
| head -n 20 / tail -n 20 / tail -f | First 20 lines / last 20 lines / follow a growing log. | |
| find . -name "*.js" | Recursively find files by name pattern. | |
| du -sh dir / df -h | Directory size / disk free space. | |
| grep pattern file | Print matching lines; add -ri for recursive and case-insensitive. | |
| grep -v / -l / -c | Invert matches / list file names / count matches. | |
| | (pipe) | Chain commands: stdout of one feeds stdin of the next. | |
| > file / >> file | Redirect stdout - overwrite / append. | |
| 2>&1 | Merge stderr into stdout. | |
| sort / sort -rn | Sort lines / sort numerically, descending. | |
| uniq / uniq -c | Drop adjacent duplicates / prefix each with its count. | |
| cut -d"," -f1 | Split on a delimiter and print field 1. | |
| sed "s/old/new/g" file | Streaming text replacement. | |
| awk "{print $1, $3}" | Per-line field extraction and scripting. | |
| wc -l file | Count lines, words, and bytes. | |
| tr "a-z" "A-Z" | Translate ranges of characters. | |
| ps aux | grep name | Find a process by name. | |
| kill PID / kill -9 PID | Graceful terminate / force kill. | |
| top / htop | Live process monitor. | |
| jobs / fg / bg | Manage background jobs. | |
| cmd & | Run a command in the background. | |
| nohup cmd & | Run detached, immune to hangup. | |
| crontab -e | Edit your scheduled jobs. | |
| chmod +x script.sh | Make a script executable; chmod 644/755 for the numeric forms. | |
| chown user:group file | Change file ownership. | |
| env / export VAR=val | Show / set environment variables. | |
| echo $VAR | Print a variable's value. | |
| curl -s https://api.example.com | Fetch a URL; -o saves to a file, -H adds headers. | |
| curl -I url | Headers only. | |
| wget url | Download; -r makes it recursive. | |
| ping host / traceroute host | ICMP reachability / the route a packet takes. | |
| ss -tlnp / netstat | Listening TCP ports and the process that owns them. | |
| nc host port | A raw TCP connection test. | |
| ssh user@host | Secure shell login. | |
| scp file user@host:/path | Secure file copy. | |
| !! / !$ | Repeat the last command / its last argument. | |
| Ctrl+R | Reverse-search shell history. | |
| set -e / set -u in scripts | Exit on any error / error on any unset variable. | |
| [[ -f file ]] && echo yes | Quick file tests with short-circuit operators. | |
| source file / . file | Run a script in the current shell so its exports persist. | |
| xargs -n1 cmd | Feed stdin items to a command as arguments. | |
| tar -czf out.tgz dir / tar -xzf out.tgz | Create / extract a gzipped archive. | |
| unzip file.zip | Extract a zip archive. |