Foundations Module 3 · Command Line Basics

Opening Your Terminal

Finding and launching the terminal on any operating system

Let’s find your terminal

Every computer has a terminal built in. Let’s open it. Pick your operating system below.

macOS

You have two easy options:

Option 1 — Spotlight Search (fastest)

  1. Press Cmd + Space to open Spotlight
  2. Type Terminal
  3. Press Enter

Option 2 — Finder

  1. Open Finder
  2. Go to ApplicationsUtilities
  3. Double-click Terminal

You’ll see a window with a prompt that looks like:

Terminal window
username@MacBook ~ %

The % at the end is your prompt symbol (macOS uses % instead of $ by default — they mean the same thing).

Pro tip: Right-click Terminal in the Dock and select “Keep in Dock” so you can open it with one click next time.

Windows — Use WSL (Windows Subsystem for Linux)

Here’s the deal: every LLM CLI tool, every tutorial, and every command in this course assumes a Linux/bash shell. Windows has PowerShell, but it uses different syntax for environment variables, file paths, and scripting — which means you’d spend half your time debugging Windows-specific issues instead of learning.

The fix is simple: WSL (Windows Subsystem for Linux) gives you a real Linux terminal right inside Windows. It’s built into Windows 10/11 and takes 5 minutes to set up.

Step 1: Install WSL

Open PowerShell as Administrator (right-click Start → Terminal (Admin) or search “PowerShell” and click “Run as administrator”):

Terminal window
wsl --install

This installs Ubuntu by default. Restart your computer when prompted.

Step 2: Set up your Linux user

After restart, WSL opens automatically and asks you to create a username and password. Pick something simple — this is just for your local Linux environment.

Step 3: Open your Linux terminal

From now on, you have three ways to open your Linux terminal:

  1. Search for “Ubuntu” in the Start menu
  2. Open Windows Terminal and click the dropdown arrow → select Ubuntu
  3. Type wsl in any PowerShell/CMD window

You’ll see a prompt like:

Terminal window
username@DESKTOP-ABC123:~$

That’s a real Linux shell. Every command in this course will work exactly as written.

💡Install Windows Terminal

If you don’t have Windows Terminal yet, get it from the Microsoft Store. It lets you run PowerShell, CMD, and WSL tabs side by side. Always use the Ubuntu/WSL tab for this course.

Stay inside the Linux filesystem

When working in WSL, keep your files in your Linux home directory (~ or /home/yourname). Don’t work from /mnt/c/Users/... — that’s your Windows drive mounted inside Linux, and it’s much slower with broken file permissions. Your Linux home is where you want to be.

Already have WSL? Just open your Ubuntu terminal and you’re good to go.

Can’t install WSL? (university lab machines, work computers without admin rights) — no worries. We cover alternatives in the Remote Environments lesson — including VS Code, SSH, and GitHub Codespaces.

Linux

You likely already know this one! But just in case:

Option 1 — Keyboard shortcut

  • Most Linux desktops: Ctrl + Alt + T

Option 2 — Application menu

  1. Open your application menu/launcher
  2. Search for Terminal, Console, or Konsole (KDE)
  3. Click to open

You’ll see a familiar prompt:

Terminal window
user@hostname:~$

Different desktop environments ship different terminal emulators (GNOME Terminal, Konsole, xfce4-terminal, etc.) — they all work the same way for our purposes.

Your first command

Let’s verify your terminal is working. Type this and press Enter:

Terminal window
echo "Hello, World!"

You should see:

Hello, World!

That’s it! You just ran your first terminal command. echo simply repeats back whatever you give it — it’s the terminal equivalent of “say this out loud.”

The “Where Am I?” check

Get in the habit of running these three commands whenever you open a terminal. They tell you exactly where you are:

Terminal window
whoami # What user am I?
hostname # What machine am I on?
pwd # What directory am I in?

This becomes critical later when you’re working across multiple environments (your laptop, a remote server, WSL). Always know where you are before running commands.

Don’t panic about the blank screen

When you first open a terminal, it might feel like staring at a blank text document with a blinking cursor. Nothing’s broken — it’s just waiting for you.

Key things to remember:

  • It won’t do anything until you press Enter. You can type, delete, retype — nothing happens until you hit Enter.
  • You can always press Ctrl+C to cancel. If something seems stuck or you made a mistake, Ctrl+C is your “stop everything” button.
  • Commands are case-sensitive. echo works, Echo might not (depending on your OS).
  • Spelling matters. ehco won’t work. Computers are literal.
💡Your terminal remembers

Press the Up arrow key to bring back your previous command. This is incredibly useful — you’ll use it constantly. Press Up multiple times to scroll through your command history.

A note on appearance

Your terminal might look different from screenshots in this course — different colors, fonts, or prompt styles. That’s completely normal. The commands work exactly the same regardless of how the terminal looks.

What’s next

Now that your terminal is open, let’s learn to move around. The next lesson covers navigation — how to see where you are and go where you want.