Index Ai Academy
Phase 0 · ToolsDeveloper tools

The terminal

About 25 minLooking ahead: some prerequisites aren't done yet

Why this matters

Almost every AI tool starts in the terminal. Installing a library, running a script, starting a local model, copying a project from GitHub, even running coding assistants like Claude Code: the instructions are terminal commands. Once typing cd and ls feels normal, a page full of setup commands stops looking like a wall. It starts looking like a checklist.

  • Find out where you are and move between folders with pwd, ls and cd
  • Create, read, copy, move and delete files from the command line
  • Run a Python script from the terminal
  • Read the setup instructions in an AI project's README without guessing

A text conversation with your computer

The terminal is a window where you control your computer by typing commands instead of clicking. It's like texting your computer instead of pointing at things. On a Mac it's the Terminal app (Applications → Utilities → Terminal). On Windows, use PowerShell or Windows Terminal. The program inside it that reads and runs your commands is called the shell. On macOS it's zsh.

You type a command after the prompt and press Return. The shell runs it, prints any output, and shows a new prompt. A prompt often looks something like this:

sam@MacBook campaign-report %

That's your username, your computer's name, the folder you're in, and %, which means "ready". You never type the prompt itself.

Most commands follow the same shape:

  1. a program name,
  2. optional flags, which change how it behaves (they start with -),
  3. arguments, which say what to act on.
ls -l data

Here ls is the program (list files). -l is a flag (long format, with sizes and dates). And data is the argument (which folder to list).

Note: In documentation you'll often see commands written as $ ls -l. The $ stands for the prompt. Don't type it.

Where am I?

Your files are arranged as a tree of folders. The terminal also calls them directories. At any moment the shell has a current working directory: the folder your commands act on. It's like the room you're standing in. Three commands do most of the work of finding your way around:

CommandWhat it does
pwdprint working directory: shows the folder you're in
lslists what's in the current folder (ls data lists another folder)
cd namechange directory: moves into a folder