The Command Line — What It Is and How to Use It
A beginner's guide to the terminal, bash, and WSL. Learn what those black screens with white text actually do — and why they're not as scary as they look.
Why This Guide Exists
Nearly every guide on this site — Docker, Git, Ollama, Pi-hole, self-hosting, Hermes Agent — asks you to type commands into a terminal at some point. If you've never used one before, those instructions can feel like being dropped into a foreign country without a phrasebook.
This guide is your phrasebook. Read it once, and every other guide on this site becomes easier. You'll learn what a terminal actually is, the handful of commands you'll use 90% of the time, and what to do on Windows vs Mac vs Linux.
Step 1. What Even Is a Terminal?
A terminal (also called a command line, shell, or console) is a text-based way to control your computer. Instead of clicking icons with a mouse, you type instructions and press Enter. The computer does what you asked and prints the result.
Think of it like texting your computer instead of using a remote control. It's faster for certain tasks — especially the kinds of things our guides cover: installing software, running servers, editing configuration files.
The terminal isn't a separate operating system. It's just a different way of talking to the same computer you already use. Everything you can do with a mouse, you can do in a terminal — and some things (like running Docker or starting a web server) are actually easier from the command line.
Step 2. Opening a Terminal on Your System
- •Windows — press the Windows key, type
PowerShellorCommand Prompt, and press Enter. Or, better yet, install WSL (covered in Step 3) to get a real Linux terminal on Windows. - •Mac — open Spotlight (Cmd+Space), type
Terminal, and press Enter. It's in Applications → Utilities if you prefer clicking. - •Linux — look for "Terminal" in your applications menu, or press Ctrl+Alt+T on most distributions.
When you first open it, you'll see something like you@computer:~$ followed by
a blinking cursor. That's called the prompt. It means the computer is
waiting for you to type something.
Step 3. Windows Users: What is WSL and Do You Need It?
WSL stands for Windows Subsystem for Linux. It lets you run a real Linux terminal inside Windows — no virtual machine, no dual-boot, no separate computer.
Most of our self-hosting and developer guides assume a Linux-style terminal (bash). While PowerShell can do similar things, the commands are different. WSL gives you the same environment the guides expect, which means you can copy and paste commands without translation.
Installing WSL takes about 5 minutes:
wsl --install
Run that one command in PowerShell (as Administrator). Windows installs Ubuntu Linux automatically. After a reboot, you'll have an Ubuntu terminal available from your Start menu. That terminal uses bash — the same shell our Linux and Mac instructions assume.
Do you need WSL? If you're following our Docker, Git, Ollama, Pi-hole, or any self-hosting guide on Windows — yes, it'll make your life much easier. If you're just browsing guides without running commands, no.
Step 4. The 10 Commands You'll Actually Use
You don't need to memorise hundreds of commands. These ten cover the vast majority of what you'll encounter in our guides:
| Command | What It Does | Example |
|---|---|---|
pwd |
Show which folder you're in ("print working directory") | pwd → /home/you |
ls |
List files and folders ("list") | ls → Documents Downloads Photos |
cd |
Move into a folder ("change directory") | cd Documents |
cd .. |
Go up one folder level | cd .. |
mkdir |
Create a new folder ("make directory") | mkdir my-project |
nano |
Edit a text file (beginner-friendly editor) | nano config.txt |
cat |
Display a file's contents ("concatenate") | cat readme.md |
cp |
Copy a file or folder | cp file.txt backup.txt |
mv |
Move or rename a file | mv oldname.txt newname.txt |
sudo |
Run a command as administrator ("super user do") | sudo apt update |
Step 5. What is Bash?
Bash (Bourne Again Shell) is the most common shell — the program that interprets what you type and runs the commands. It's the default on Linux and Mac, and what you get inside WSL on Windows.
When a guide says "run this in bash" or "open a bash terminal," it just means "use the normal terminal." Bash-specific features you might encounter:
- •Tab completion — start typing a filename and press Tab. Bash fills in the rest. Saves enormous time and prevents typos.
- •Up arrow — cycles through your previous commands. Don't retype something you ran two minutes ago.
- •Ctrl+C — stops whatever's currently running. If a command is taking too long or you ran the wrong thing, Ctrl+C kills it.
- •Ctrl+L — clears the screen (same as typing
clear). Doesn't delete anything — just scrolls the terminal so you have a fresh view.
Step 6. Understanding Command Syntax
Commands in our guides follow a consistent pattern. Once you recognise it, you can read any command even if you've never seen it before:
command --flag argument
- •command — the program you're running (docker, git, python, curl).
- •--flag — options that change behaviour.
--helpshows instructions,-ymeans "yes to all prompts,"-dmeans "run in background." Single-letter flags use one dash (-d), full-word flags use two (--detach). They mean the same thing. - •argument — the thing you're operating on: a filename, a URL, a folder path.
Real example from our Docker guide:
docker run -d -p 8080:80 --name webserver nginx
Broken down: docker (the program) run (what to do)
-d (run in background) -p 8080:80 (map ports)
--name webserver (give it a name) nginx (which image to use).
Tips
- •You can't break anything by typing commands. The worst that happens is an error message. Unlike clicking random buttons, the terminal usually tells you exactly what went wrong.
- •Copy and paste commands from guides. Don't retype long commands — that's how typos happen. Copy from the guide, paste into the terminal (Ctrl+Shift+V on most terminals, Cmd+V on Mac).
- •Tab is your best friend. Start typing a filename or folder name and press Tab. It autocompletes, saving time and preventing mistakes.
- •If a command asks for your password, it won't show what you type. No asterisks, no dots — the cursor just sits there. This is normal. Type your password and press Enter.
- •Case matters.
Documentsanddocumentsare different folders. Commands are always lowercase.
Continue Reading
Need More Help?
StarCaller Academy offers 1-to-1 sessions to help you with any of these topics and more.