The terminal is just another window into the same folders you see in File Explorer. You type one line, and it returns another. With six commands, you can see where you are, what’s there, create your projects folder, and move between folders without a mouse.
2See where you are with cd and what’s there with dir
3Create projetos\meu-primeiro-agente and open it
4See the same folder in File Explorer with explorer .
Objective: open cmd, see which folder you’re in, and move between folders with six commands, without a mouse.
01 · The back-and-forth of the terminal
You type, it responds, and > comes back, waiting for you.
Lesson 101 · The back-and-forth of the terminalYou type, it responds, and > comes back, waiting for you.
Command, response, and > back again: that’s the back-and-forth
1/5
You type
When you open it, cmd shows a short line that ends in >, with the cursor blinking. The computer is waiting for you. Nothing happens until you type and press Enter.
Scroll down: each step below lights up its part of the diagram.
1/5
You type
When you open it, cmd shows a short line that ends in >, with the cursor blinking. The computer is waiting for you. Nothing happens until you type and press Enter.
2/5
The prompt
Read the path like an address. Each backslash separates a folder, and the last one is where you are now. Your personal folder is C:\Users\ followed by your username.
3/5
The response
The line without > is the computer’s response. Many commands that work don’t respond at all: the next command, such as cd or dir, confirms it worked.
4/5
File Explorer
The terminal and File Explorer show the same drive. Create a folder in one, and it appears in the other. The explorer . command opens the file window right in the folder you’re in.
5/5
First your location, then the files
Before any command that changes something, check the path before >. Many errors that look like AI failures are just caused by being in the wrong folder: if you don’t know where you are, the agent doesn’t either.
On Mac and Linux, the terminal is called Terminal and ends in $; the commands have different names (see the table at the end of the lesson).
02 · The six commands, one at a time
Click each step. None of these deletes anything.
1. Open cmd
Press the Windows key, type cmd, and press Enter. Command Prompt, the black window, opens. You don’t need to run it as an administrator.
If the line starts with PS, you opened PowerShell, another terminal. Close it and search for cmd again. On Mac: press Cmd+Space and type Terminal.
What you seeC:\Users\voce> with the cursor blinking.
2. Where am I
The cd command, typed with nothing else, is the map’s “you are here.” It shows the full path to the current folder.
On Mac and Linux, pwd does the same thing.
OutputC:\Users\voce
3. What’s here
Once you know where you are, look at what’s inside. dir lists folders and files; dir /b shows only the names, one per line.
On Mac and Linux: ls.
OutputDesktop, Documents, Downloads…
4. Create and enter
mkdir projetos creates the folder. cd projetos enters it, and the path before > changes.
Use short names without spaces or accents, like meu-primeiro-agente. Spaces and accents can be tricky in the terminal.
The prompt afterwardC:\Users\voce\projetos>
5. Go back and look
cd .. goes up one folder. explorer . opens File Explorer in the current folder: the dot means “here.”
cls clears the screen without deleting anything. The Tab key completes folder names as you type.
Golden ruleLost? Type cd and read the output.
03 · Commands in this lesson
Copy one block at a time into cmd. Replace whatever is between < > with your own text.
cmd · where I am and what’s here
cd
dir
dir /b
cmd · the projects folder and the first project folder
cd %USERPROFILE%
mkdir projetos
cd projetos
mkdir meu-primeiro-agente
cd meu-primeiro-agente
cd
cmd · view the same folder and navigate
explorer .
cd ..
dir
cd meu-primeiro-agente
dir
Mac and Linux · the same steps
pwd
ls
mkdir -p ~/projetos/meu-primeiro-agente
cd ~/projetos/meu-primeiro-agente
pwd
Simulation: illustrative example
C:\Users\ana> cd %USERPROFILE%
C:\Users\ana> mkdir projetos
C:\Users\ana> cd projetos
C:\Users\ana\projetos> mkdir meu-primeiro-agente
C:\Users\ana\projetos> cd meu-primeiro-agente
C:\Users\ana\projetos\meu-primeiro-agente> cd
C:\Users\ana\projetos\meu-primeiro-agente
mkdir and cd don’t show anything when they work. The path before > and running cd by itself confirm it.
“The system cannot find the path specified”: the name is wrong or the folder doesn’t exist here. Run dir and copy the exact name.
“A subdirectory or file projetos already exists”: it’s already been created. Just enter it with cd projetos.
The line starts with PS: you’re in PowerShell. Close it and open cmd.
cd by itself → pwd: where I am
dir → ls: lists the folder
mkdir name → mkdir -p name: creates a folder
cls → clear: clears the screen
type file → cat file: shows the file
%USERPROFILE% → ~: home folder
On Linux, uppercase and lowercase matter: Projetos and projetos are different folders.
04 · Rehearse first, risk-free
A pretend cmd: type the command for each mission and press Enter. Nothing runs on your computer.
Missions
1Find out which folder you’re in.
2Take a look at the names of what's here.
3Create the projetos folder.
4Go into the projetos folder.
5Create the meu-primeiro-agente folder.
6Go into it.
7Open the same folder in File Explorer.
8Go up one folder.
Command Prompt · simulation
Simulation: Ana's home folder is just an example. On your computer, you'll see your username.
05 · Practice
Do this on your computer. Move on only when the "done when" condition is true.
E1 · First folder from the terminal
10 min
Create projetos\meu-primeiro-agente, go into it, and list the contents (it will be empty). Run explorer . and compare it with File Explorer.
Done when: you can get to the folder using only the terminal, without the mouse, and say which folder you're in.
E2 · Create it in one, see it in the other
5 min
In File Explorer, create any text file inside meu-primeiro-agente. Go back to cmd and run dir /b.
Done when: the file you created with the mouse appears in the terminal list. If it doesn't, you're in another folder: run cd.
06 · Step 1 on video
Six commands, one AGENTS.md, and the first task, in less than two minutes.
You created a file in File Explorer, but it doesn’t appear in dir. What’s the most likely cause?
Correct
The terminal and File Explorer show the same drive. If the file doesn’t appear, the terminal is in a different folder: run cd and compare the paths.
Not this one
The terminal and File Explorer show the same drive. If the file doesn’t appear, the terminal is in a different folder: run cd and compare the paths.Review: Commands in this lesson
Question 4 of 4
On the VPS, running Linux, which command does the same job as dir?
Correct
ls lists the folder. pwd is the equivalent of running cd by itself, and cat is the equivalent of type.
Not this one
ls lists the folder. pwd is the equivalent of running cd by itself, and cat is the equivalent of type.Review: Commands in this lesson
Test complete
You got {a} out of {n} right. Get them all right to mark the lesson complete.
Choose an option. The explanation appears after your attempt.