Linux / Bash Commands Cheat Sheet
Every terminal command — files, permissions, processes & networking.
A free, searchable Linux & Bash command guide on one long page. Covers navigation, file operations, viewing files, permissions & ownership, environment variables ($PATH, export, .bashrc), process management, search & text processing (grep, pipes, sed), system info & packages, networking (ping, curl, ssh) and archives. Every command has a copy-ready line and a real worked example with terminal output. Includes a quick-reference table for chmod permission codes (what 755 and 644 actually mean). Search “kill process”, “grep” or “chmod” to jump straight to it. Runs fully in your browser, no sign-up, no API.
About Linux / Bash Commands Cheat Sheet
- Every command explained in plain English — no jargon, with a copy-ready line.
- Real worked examples with terminal output so you know what success looks like.
- Covers navigation, files, permissions, environment variables, processes, search/pipes, system info, networking and archives.
- A quick-reference table for chmod permission codes — 755, 644 and what each number actually means.
- Instant search — type "kill process", "download file" or "path variable" to jump straight to it.
- Explains pipes (|) and redirects (>, >>) — the ideas that make the terminal actually powerful.
- Copy-paste ready, works the same across every major Linux distribution and macOS terminal.
Linux / Bash Commands Cheat Sheet features
- Every command explained in plain English with a copy-ready line
- Real worked examples with terminal output
- Covers navigation, files, permissions, environment variables, processes, search/pipes, networking and archives
- A quick-reference table for chmod permission codes (755, 644 and what each number means)
- Explains pipes (|) and redirects (>, >>)
- Instant search across every command and section
- 100% free, no sign-up, no API
Best practices
Terminal habits that save real time
A handful of small habits that add up once they're muscle memory.
TIPPress the Tab key while typing a file or folder name to auto-complete it — Linux fills in the rest, or shows every option if there's more than one match.TIPPress Ctrl+R and start typing to search your command history interactively, instead of pressing ↑ over and over.FACTcd - always takes you back to the PREVIOUS folder you were in — handy for bouncing between two directories.
Run a command, and if you realise you needed sudo, don't retype it — run sudo !! and Bash re-runs your exact last command with sudo added in front.
Frequently asked questions
How do I see which folder I'm currently in?
Run pwd (print working directory) — it prints the full path of your current location in the terminal.
How do I list files, including hidden ones?
Run ls -la — the -l flag shows a detailed list (permissions, size, date) and -a includes hidden files, which are any file or folder starting with a dot.
What's the difference between rm and rmdir?
rmdir only deletes a folder if it's completely empty. rm -r deletes a folder AND everything inside it, recursively — that's the one you need for a folder with files in it. There is no Recycle Bin, so both are permanent.
How do I make a script file executable?
Run chmod +x filename.sh, then run it with ./filename.sh. The +x flag adds execute permission, which Linux requires before it will run a file as a program.
What does the pipe symbol (|) do in Linux?
It sends the OUTPUT of the command on the left as INPUT into the command on the right — for example ps aux | grep node lists every process, then filters that list for lines containing "node". Chaining commands with pipes is the core idea behind the Linux terminal's power.
How do I search for text inside files?
Use grep — for example grep -rn "TODO" . searches every file from the current folder downward (-r), ignoring case is -i, and shows line numbers with -n.
How do I stop a process that's frozen or stuck?
First find its process ID with ps aux | grep <name>, then run kill <PID> to ask it to stop. If it doesn't respond, force it with kill -9 <PID>.
What is sudo and when do I need it?
sudo (superuser do) runs a single command with administrator privileges. You need it for system-level changes — installing packages, editing protected files, or changing file ownership you don't have permission for.
How do I check how much disk space is free?
Run df -h for overall disk space per drive, or du -sh <folder> to check how much space one specific folder is using. The -h flag shows sizes in human-readable GB/MB instead of raw blocks.
What's the difference between curl and wget?
Both download files from the internet. wget is simpler and better suited to straight file downloads. curl is more flexible — it can send custom headers and POST data, which makes it the standard tool for testing APIs.
How do I extract a .tar.gz file?
Run tar -xzvf archive.tar.gz — x means extract, z means it's gzip-compressed, v shows progress, and f says the filename follows.
How do I connect to a remote Linux server?
Use SSH — ssh username@host-or-ip-address opens an encrypted terminal session on the remote machine, as if you were sitting in front of it.
What does chmod 755 actually mean?
Each digit covers owner, group and others, and is the SUM of read (4), write (2) and execute (1). 7 = 4+2+1 = read+write+execute; 5 = 4+1 = read+execute. So chmod 755 gives the owner full control, and everyone else read + execute only — the standard permission for a script or program others need to run but not edit.
How do I set an environment variable in Linux?
Use export NAME=value — for example export API_KEY=abc123. This lasts for the current terminal session only. To make it permanent, add the same export line to ~/.bashrc (or ~/.zshrc for zsh) and run source ~/.bashrc to load it immediately.
What is the $PATH variable?
$PATH is a colon-separated list of folders the shell searches, in order, whenever you type a command name — it's why running git or ls works without typing their full file location. Add a new folder to it with export PATH=$PATH:/your/folder.
Is this Linux/Bash commands cheat sheet free to use?
Yes — it's 100% free with no sign-up, no login and no limits. Every command, example and the search box work fully in your browser.
Related tools — Guides & Tutorials
- Git & GitHub Guide — Clone, commit, push, branch & merge — every Git command with examples.
- Keyboard Shortcuts Guide (Windows & Mac) — Every shortcut for copy/paste, browsers, Word & Excel — Windows & Mac side by side.
- Regex Cheat Sheet — Syntax Reference — Every regex symbol, quantifier, group & flag explained with copy-ready patterns.
- SQL Cheat Sheet — Syntax & Query Reference — SELECT to window functions, transactions & indexes — with copy-ready queries.
- Python Basics Cheat Sheet — Syntax Reference — Variables, strings, lists, loops & functions — every Python basic with copy-ready code.
- Excel Cheat Sheet — Every essential Excel shortcut & top formula on one page.
- Excel Guide — How Excel works — the fundamentals, explained simply.
- Beginner Excel — Everyday Excel skills — with step-by-step examples.
- Advanced Excel — Lookups, dropdowns, duplicates & PivotTables — with examples.
- Master Excel — Dynamic arrays, Power Query, macros & dashboards.
- Google Sheets Cheat Sheet — Every formula — text, math, lookups, dates & QUERY — with examples.
- VS Code Shortcuts Cheat Sheet — Every keyboard shortcut — editing, multi-cursor, search & debugging.
- Vim Cheat Sheet — Movement, editing, search & how to actually save and quit.
- Docker Commands Cheat Sheet — Images, containers, Compose, volumes & cleanup — with examples.