Lesson 5: Meet the terminal
Level 1, Meet Your Computer. Type your first commands: dir, cd and cd .. The new word: terminal. It follows lesson 4, Paths: every file has an address. Next comes lesson 6, Practice: tidy and find.
What the lesson explains
Meet the terminal. A second way to talk to your computer. Your project folder is still here. This time, you will type.
This window is the terminal. You type a command. The computer answers. You type a command; The computer answers.
The prompt shows where you are. The path before the blinking line. On the card: PS C:\Users\you\Documents\my-project>
dir shows what is here. The same things glow in the explorer. On the card: dir
What you do first
Go into images. In the practice terminal, type cd images at the prompt PS C:\Users\you\Documents\my-project>; the prompt then reads PS C:\Users\you\Documents\my-project\images>.
The files on the practice computer
This lesson works in 2 folders. At the start, Documents\my-project holds images\, hello.py, notes.txt; Documents\my-project\images holds cat.png.
You change nothing here, so lesson 6 finds the same files.
What you practise
Try it, "Go into images": In the practice terminal, type cd images at the prompt PS C:\Users\you\Documents\my-project>; the prompt then reads PS C:\Users\you\Documents\my-project\images>.
Mini practice, "Look, then go back up": In the practice terminal, type dir at the prompt PS C:\Users\you\Documents\my-project\images> and the computer answers: Directory: C:\Users\you\Documents\my-project\images / Mode Name / ---- ---- / -a--- cat.png. Then: In the practice terminal, type cd .. at the prompt PS C:\Users\you\Documents\my-project\images>; the prompt then reads PS C:\Users\you\Documents\my-project>.
Red text, "Red text is a clue": Why the red text? The answer: "dir was spelt wrong".
What PlayBuddy and PlayType say
PlayType: "So far you clicked. Coders have a second way: typing."
PlayBuddy: "This window is the terminal. You type a command, and the computer answers."
PlayBuddy: "This is a practice computer. Nothing here can break your real one."
PlayBuddy: "Two windows, the same files. Typing and clicking do the same job."
Help in every lesson
Everything happens on a pretend computer in your browser, so nothing touches your real files. PlayBuddy and PlayType stand beside the board, cheer you on and say when it is your turn.
A green ring shows where to click the first time. After that you do it on your own, and if you slip twice the ring comes back.
Stars
The lesson has 4 things to do. Up to one slip in ten gives three stars, up to one in four gives two, and finishing always gives at least one. Stars and progress are saved in this browser only; there is no account.
About DayOneCode
DayOneCode is an independent learning site, not affiliated with or endorsed by Anthropic. Claude and Claude Code are trademarks of Anthropic.