September 11, 2026
THE TERMINAL COMMANDS YOU ACTUALLY NEED

You do not need to memorize hundreds of commands to work well with an AI CLI. You need enough vocabulary to know where you are, what files exist, what command is running, and when to stop and ask a question.
Think of terminal commands as directions and inspection tools. The AI can write them; you should understand their purpose.
The core navigation commands
| Command | Mac/Linux | Windows PowerShell | What it means |
|---|---|---|---|
| Show current location | pwd | pwd | Where am I? |
| List files | ls | ls | What is here? |
| Enter a folder | cd folder-name | cd folder-name | Move into a folder |
| Move up | cd .. | cd .. | Go to the parent folder |
| Create folder | mkdir name | mkdir name | Make a new folder |
| Clear screen | clear | cls | Clean the display, not the files |
The prompt at the left of a terminal often tells you where you are. Do not assume it. Use pwd before you run a command that changes files.
project/
README.md
src/
public/
You are here: project/
cd src → enter source folder
cd .. → return to project/
Commands are not magic spells
A command has a program, sometimes an action, and sometimes a target. For example, cd src says: use the change-directory command and move into src.
When an AI proposes a command, ask three questions:
1. What program will run? 2. What files, folders, or services can it affect? 3. What output should I expect if it succeeds?
That is enough to turn a scary line of text into an understandable instruction.
Read before you run
Some commands only inspect. Others change things.
| Type | Examples | Habit |
|---|---|---|
| Inspect | pwd, ls, git status | Safe starting point |
| Run | npm run dev, pnpm test | Read the output and know how to stop it |
| Change | creating files, installing packages | Confirm scope first |
| Dangerous | deleting, overwriting, publishing | Slow down and name the exact target |
The terminal is powerful because it is precise. That precision is why you should not copy random commands from the internet without knowing what they affect.
Let the AI teach in context
Useful request:
You will learn the commands while solving real problems, which is much more durable than studying a cheat sheet alone.
The command transcript is part of the handoff
When a command does something important, keep a short record of it in HANDOFF.md or the project notes. You do not need to preserve every ls. Preserve the commands that started a service, installed a dependency, created a generated artifact, ran a migration, or verified a release. This lets the next person reproduce the useful parts of your work.
For example: “Ran the local test suite; 42 tests passed,” is more useful than “everything is good.” A good command record says what was run, from which folder, what happened, and what remains unverified. The terminal becomes a source of evidence, not a private sequence of forgotten keystrokes.
Practical exercise
In a harmless practice folder, use pwd, ls, mkdir practice, cd practice, and cd ... Then ask your AI agent to explain exactly what changed. Nothing important needs to be built.
Check your understanding
1. What does pwd tell you? 2. Why use ls before changing a file? 3. What is the difference between an inspection command and a changing command? 4. What should you ask an AI before running an unfamiliar command?
ARTICLE DISCUSSION
JOIN THE
CONVERSATION.
Got a question, a take, or a better way to do this? Log in and leave a comment.
