Foundations Module 4 · Command Line Basics

What Is a Terminal?

Last reviewed

Beginner

What you'll learn

~12 min
  • Understand what a terminal is and why developers use it
  • Distinguish between a terminal, a shell, and a command
  • Recognize the parts of a terminal prompt
  • Run your first commands and see how the terminal responds

By the end of this lesson, you will understand what a terminal is, why it matters for working with AI tools, and how the commands you type into one work. No prior experience needed: we start from zero.

ℹComing from Lesson 1.2?

Used the terminal in Lesson 1.2? You already ran the four survival commands; this module explains how they work. Chose a desktop agent app? You never have to live in a terminal, though knowing these four commands lets you read what your agent runs.

🔍New to computers? What files and folders actually areclick to expand

A file is a single piece of information stored on your computer — a document, a photo, a song, or a piece of code. Many files have extensions (like .txt for text, .html for a web page, .py for Python code), which often help software identify the file type — but not all files use extensions, especially on Linux and macOS.

A folder (also called a directory) is a container that holds files and other folders. Think of your computer like a filing cabinet: folders are the drawers and dividers, files are the individual papers inside.

When you use the terminal, you navigate this same filing cabinet — but by typing names instead of clicking icons. It’s the same files and folders you see in your regular file explorer, but a different interaction style — more precise, scriptable, and powerful once you learn the commands.

The two ways to talk to your computer

Right now, you’re using your computer through a graphical user interface (GUI). You click on icons, drag windows around, and use menus. It’s visual, intuitive, and how most people have always used computers.

But there’s a second way — one that’s been around even longer:

The terminal.

A terminal is a text-based interface where you type commands and your computer responds with text. No icons. No menus. Just you and your computer, having a conversation through typed messages.

The mental model: texting your computer

Here’s the simplest way to understand it:

Using a GUI is like talking to someone face-to-face — lots of gestures, pointing, visual cues.

Using a terminal is like texting them — you type exactly what you want, and they text back.

When you text a friend “send me that photo from last night,” they know exactly what to do. When you type ls in a terminal, your computer knows exactly what to do — it lists all the files in your current folder.

That’s it. That’s the whole concept. The terminal is a text conversation with your computer, and once you learn a handful of “phrases” (commands), you can ask it to do almost anything.

Why do you need this?

Every LLM CLI tool (Claude Code, Antigravity, Codex CLI, Copilot CLI) runs inside a terminal. That is not the only way to use AI building tools anymore (Claude Code and Codex can both run tasks from your browser, and GitHub Codespaces gives you a terminal in your browser), but the terminal is still where these tools are most powerful and flexible. We cover those cloud sandbox options in Module 3, Lessons 4 and 5.

For now, learning the terminal gives you the most flexibility. To become an orchestrator, you need to be comfortable with two things:

  1. Opening a terminal
  2. Typing commands in it

You don’t need to become a command line wizard. Four survival commands get you started: pwd (where am I?), ls (what’s here?), mkdir (make a folder) and cd (move into it). Once an AI agent is running, it handles the rest, and you ask it for what you want in plain English.

Windows, macOS and Linux all come with a terminal, and those four commands work in each of them. When you want the quickest setup for development, Lesson 4.5 explains why Linux, WSL2 and macOS tend to get you there; you can start today on whatever you have.

💡It's less scary than it looks

The terminal feels intimidating because of how it looks in movies — green text on black screens, hackers typing furiously. In reality, it’s just a text box where you type simple English-ish commands. If you can text, you can use a terminal.

🧬In Your Field: Biotechclick to expand

If you’ve ever used R in the console, you’ve already used something very close to a terminal. The R console is a text interface where you type commands and get results back. The terminal has a similar interaction model (type a command, get output), but the shell controls your operating system and files, while the R console executes R code. AI CLI tools like Claude Code can help you write R scripts, manage data pipelines, and automate repetitive analysis tasks — all from the terminal.

📊In Your Field: MIS / Businessclick to expand

In the business world, you’ll often hear about “automation” and “scripting.” Those workflows live in the terminal. When an analyst says they automated a reporting pipeline, they likely wrote a series of terminal commands. AI CLI tools bring that same power to anyone willing to type a few commands — no programming degree needed.

🏛️In Your Field: Government Devclick to expand

Government IT environments often restrict what software you can install, but in many setups terminal access is available through approved tools (for example SSH gateways, bastion hosts, or managed cloud shells). SSH, remote servers, and secure cloud environments all use the terminal as their primary interface. Learning these basics will help you work within those constraints rather than around them.

What does it look like?

When you open a terminal, you’ll see a line of text ending in a symbol, with a blinking cursor after it. It looks a little different on each system, and all three are equally good places to start:

SystemWhat the line looks likeThe “I’m ready” symbol
Windows (PowerShell)PS C:\Users\Name>>
macOS (Terminal)name@MacBook ~ %%
Linux or WSLuser@computer:~$$

That line is called the prompt. It’s your computer saying “I’m ready, what do you want me to do?”

Each prompt packs in the same information:

  • Where you are. C:\Users\Name on Windows, or ~ on macOS and Linux, both mean your home folder.
  • Who and which machine. macOS and Linux show your username and computer name (user@computer); PowerShell starts with PS to tell you it is PowerShell.
  • The ready symbol. >, % or $. You type your command after it.

You type a command after the symbol, press Enter, and the computer responds. Here is the same command on Windows and on Linux:

Terminal window
PS C:\Users\Name> pwd
Path
----
C:\Users\Name
Terminal window
user@computer:~$ pwd
/home/user

pwd means “print working directory”: it tells you where you are in the filesystem. PowerShell prints it as a small table headed Path; macOS and Linux print a single line. Same answer, different formatting. We’ll cover this in detail in Lesson 4.3.

Try it yourself

Open the real terminal on your own computer. If you still have the one from Lesson 1.2 open, use that. Otherwise:

  • Windows: press Win+X, then choose Terminal (or Windows PowerShell).
  • Mac: press Cmd+Space, type Terminal, press Enter.
  • Linux: press Ctrl+Alt+T.

Type pwd and press Enter. Then type ls and press Enter.

How to check it worked: pwd printed your own home folder, and ls listed the folders inside it. Yours will look something like this:

PS C:\Users\Name> pwd
Path
----
C:\Users\Name
name@computer:~$ pwd
/Users/name (macOS)
/home/name (Linux)

On Windows, ls shows a table with Documents, Downloads, and Desktop. On macOS and Linux it shows the same folder names in plain columns. Those are your real folders, so you can’t break anything by looking.

Key vocabulary

Before we go further, here are five terms you’ll hear constantly:

TermWhat it meansAnalogy
TerminalThe application/window you type commands inYour texting app
ShellThe program that interprets your commandsThe “brain” that reads your texts
CommandAn instruction you typeA text message
DirectoryA folderSame as a folder on your desktop
PathThe “address” of a file or folderLike a street address
ℹTerminal vs Shell — what's the difference?

The terminal is the window. The Shell Shell The program inside a terminal that interprets your commands. Learn more → is the program running inside it. It’s like how Chrome (the window) runs a web engine (the program inside). Most of the time, you don’t need to think about this distinction, but if you see people mention ” Bash Bash The most common shell on Linux and WSL systems. Learn more → ,” “zsh” or “PowerShell,” those are shell names. macOS uses zsh, Linux and WSL usually use bash, and Windows uses PowerShell. The survival commands in this module (pwd, ls, mkdir, cd) work in all three; where a command only exists in some shells, the lesson says so.

A worked example: your first “conversation”

Let’s walk through what an actual terminal session looks like, step by step. Think of it as reading a text conversation:

Terminal window
user@computer:~$ echo "Hello, terminal!"
Hello, terminal!
user@computer:~$ pwd
/home/user
user@computer:~$ ls
documents projects hello.txt

Here’s what happened:

  1. You said: echo "Hello, terminal!" — The echo command repeats text back to you. It’s like asking the computer to say something out loud.
  2. You asked: pwd — “Where am I right now?” The computer answered: /home/user (your home folder).
  3. You asked: ls — “What’s in this folder?” The computer listed three items: two folders and a file.

That’s it — three commands, three answers. Every terminal session follows this same pattern: you ask, the computer answers.

What you’ll be able to do

By the end of this module (5 short lessons), you’ll be able to:

  • Open a terminal on any operating system
  • Navigate around your files and folders, and make new folders
  • Recognise the file commands an AI agent runs (reading, copying, moving and deleting files)
  • Connect to remote environments like servers and Codespaces
  • Feel confident when an AI tool says “run this command”

That’s the foundation. Once you have this, everything else — installing tools, running projects, deploying websites — becomes a matter of typing one or two commands.

KNOWLEDGE CHECK

What is a terminal?

KNOWLEDGE CHECK

In the prompt `user@laptop:~/projects$`, what does the `~` represent?

🔧

When Things Go Wrong

Use the Symptom → Evidence → Request pattern: describe what you see, paste the error, then ask for a fix.

Symptom
I opened the terminal and it's just a blank screen with a cursor
Evidence
I see a blinking cursor but no instructions or buttons
What to ask the AI
"That's completely normal! The terminal is waiting for you to type a command. Try typing pwd and pressing Enter."
Symptom
I typed a command but nothing happened
Evidence
I typed 'ls' but the screen didn't change
What to ask the AI
"Make sure you pressed Enter after typing the command. The terminal won't do anything until you press Enter."
Symptom
I see 'command not found' after typing something
Evidence
bash: lss: command not found
What to ask the AI
"Check your spelling — the command is `ls` (two letters), not `lss`. Terminal commands are very literal and must be spelled exactly right."
Symptom
Output looks different from what I expected
Evidence
The command ran but my output doesn't match the examples
What to ask the AI
"Output can look different across operating systems and configurations — that's normal. As long as you don't see an error message, the command likely worked correctly."
Symptom
I see 'Permission denied' after running a command
Evidence
bash: permission denied
What to ask the AI
"Don't use `sudo` yet — continue to the next lesson. Permission errors often mean you're in a system directory. Run `cd ~` to go to your home directory and try again."

Key takeaways

  • A terminal is a text-based interface for talking to your computer — think of it as texting your machine.
  • The prompt (PS C:\Users\Name> on Windows, name@MacBook ~ % on macOS, user@computer:~$ on Linux) tells you where you are and that the terminal is ready.
  • Four survival commands get you started: pwd, ls, mkdir, cd. Your AI agent handles the rest.
  • All AI CLI tools (Claude Code, Antigravity, etc.) run inside a terminal, which is why this skill matters.
  • The terminal won’t bite — nothing happens until you press Enter, and Ctrl+C usually interrupts the current foreground command.
🔍Why text interfaces still exist in 2026click to expand

You might wonder: if GUIs are so intuitive, why does the terminal still exist? Three reasons:

  1. Speed. Once you know the commands, typing is faster than clicking through menus. Renaming 500 files takes one command vs. 500 clicks.
  2. Automation. You can save a sequence of commands as a script and run it again anytime. Try that with clicking.
  3. Remote access. When you connect to a server across the internet, you can’t see its screen — but you can type commands. The terminal works everywhere, on any connection speed.

This is why every developer, data scientist, and systems administrator still uses a terminal daily — and why AI CLI tools chose the terminal as their home.

Search lessons