Skip to content
build-3000
fundamentals

Terminal Basics

The text window where you and your agent actually drive the computer.

Before this: What Is Software?

Objective

Run basic terminal commands, understand what a working directory is, and read command output instead of fearing it.

Vocabulary

The words to use when directing your agent.

terminal
A window where you type text commands instead of clicking buttons.
shell
The program inside the terminal that reads and executes your commands.
command
A word plus optional arguments that tells the computer to do something specific.
path
The address of a file or folder, like documents/projects/my-app.
working directory
The folder your terminal is currently 'inside' - commands happen here.

Understand it

Reading output top to bottom

Terminal output is a conversation. Errors usually appear last and often name the exact problem ('file not found', 'command not recognized'). Train yourself to read the last lines first - both for your own commands and for your agent's output.

Why agents live here too

AI coding agents run inside your terminal because that is where programs are started, tested and inspected. When your agent says it 'ran the tests', it typed commands into this same interface.

Core concepts

Commands are just programs

Every command you type launches a small program. dir or ls lists folder contents; cd changes your working directory. There is no second hidden computer - the terminal is a direct line to the same files you see in Explorer or Finder.

Location changes meaning

The same command behaves differently depending on your working directory. Running a project's dev server from the wrong folder is the number-one beginner error.

Examples

Looking around

pwd (or cd with no arguments on Windows) shows where you are; ls (dir on Windows) lists what is here; cd my-project moves you into a folder.

The classic mistake

Typing npm install in your home folder instead of the project folder creates junk files thousands of miles from where they belong. Always check your location first.

Common mistakes

Common mistake

Running commands in the wrong folder.

Fix

Print your location (pwd or cd) before doing anything that changes files.

Common mistake

Closing the terminal the moment red text appears.

Fix

Red text is information, not explosion. Copy the last lines and paste them to your agent - it diagnoses from exactly this evidence.

Working with your AI agent

Paste errors verbatim to your agent - never paraphrase them. The exact wording of an error is the diagnostic clue. Ask: 'Explain this error in one sentence, then give me the exact command to fix it.'

Build it

The module’s real project. Your agent builds; you direct and inspect.

Project: Command Journal

Spend twenty minutes deliberately driving the terminal: move between folders, look inside them, create a file - then save a journal of what you ran and what happened.

Requirements

  • Navigate to at least three different folders using cd
  • Create a folder and a text file from the terminal
  • Save a journal.txt containing at least ten commands you ran with a one-line note about what each did

Context for your agent

Do not build software for this project. Instead act as a terminal coach: suggest ten progressively interesting beginner-safe commands one at a time (navigation, listing, file creation, reading a file), wait for my paste-back of the result, and confirm or correct my understanding before the next one.

Verify it - twice

Check every item yourself first. Then hand your agent the prompt and compare verdicts.

Self-verified0/3
Functional
Testing

Verification prompt - paste into your AI agent

Act as a reviewer for my Command Journal exercise. I saved journal.txt with ten or more terminal commands and notes. Read the journal and check: (1) are all ten commands syntactically valid for my operating system, (2) do the notes match what each command actually does, (3) are any of them risky if re-run (deletion, overwriting)? Answer PASS or FAIL per point with evidence from the file, then name the one command whose purpose I most likely misunderstood.

Run this against “Terminal Basics” after your own checklist pass. Where the agent and you disagree, investigate before moving on.

Review questions

Answer out loud. If you cannot, revisit before moving on.

  1. What is your working directory right now, and how do you find out?

  2. Your agent says 'tests failed' and prints red text. What do you do first?

  3. Why does the same command behave differently in two folders?

You can now

  • Navigate folders and run basic commands confidently
  • Read the last lines of terminal output first
  • Paste exact errors to an agent for diagnosis

Up next

Projects, Files and Structure