Skip to content
← Inforjota
Cursos Inforjota Português

Lesson 1 of 3 · 12 min · Checked on 6 October 2026

The terminal without fear

By the end of this lesson you will be able to:

  • Open the terminal on Windows, Mac or Linux
  • Use six commands to see where you are, list, change folder, create a folder, view a file and clear the screen
  • Paste a command calmly and recognise the commands you never type without understanding

Mrs Graça runs a bakery and wants to put the winter opening hours on her website. Her nephew, on the phone, tells her: "Open the terminal and type this." She looks at a dark window with a blinking cursor and is sure she is about to wreck the computer.

She is not. In this lesson you learn what that window is, how to open it and the six commands you need.

What the terminal is

The terminal is a conversation with the computer, in writing. Instead of clicking on a folder, you type its name. Instead of dragging a file, you type a short instruction. The computer answers with text.

This is where coding agents live, such as Claude Code and Codex (Level 1). They also talk to the computer in writing: they open files, run commands and show you the result. If you understand the basics of the terminal, you understand what the agent is doing.

Two things to put your mind at rest: the terminal only does what you tell it, and almost every command in this lesson only looks, it does not change anything.

How to open it

This is how it looks on 6 October 2026; your screen may differ.

  • Windows: press Win + X and choose Terminal or Windows PowerShell. You can also type "PowerShell" in the Start menu.
  • Mac: press Cmd + Space, type Terminal and press Enter.
  • Linux: on most systems, Ctrl + Alt + T. If that does not work, look for "Terminal" in the applications menu.

A window appears with a line of text and a blinking cursor. That line usually shows the folder you are in, for example PS C:\Users\Graca> on Windows.

Tip

On Windows there are two similar programs: PowerShell and the old Command Prompt (CMD). In this course we use PowerShell. You know you are in it because the line starts with PS.

The six commands

Type the command and press Enter.

What you want to do Windows (PowerShell) Mac and Linux
1. See where I am pwd pwd
2. List what is here dir ls
3. Go into a folder cd Documents cd Documents
3. Go back up one folder cd .. cd ..
4. Create a folder mkdir experiencias mkdir experiencias
5. See what is in a file type nota.txt cat nota.txt
6. Clear the screen cls clear

Going in and going back are the same command, cd, which means "change directory" (folder). The two dots .. mean "the folder above".

In the terminal, system folders appear under their English names (Documents, Downloads, Desktop), even if the file explorer translates them. Good news: PowerShell also accepts ls, cat and clear, so the Mac version almost always works on Windows. experiencias is Portuguese for "experiments"; every lesson uses that name.

Example

A session on a Mac, command by command:

pwd
ls
mkdir experiencias
cd experiencias
pwd

The first pwd shows something like /Users/graca. ls lists what is there. mkdir creates the folder, cd goes into it and the last pwd confirms: /Users/graca/experiencias.

Pasting into the terminal

To paste a command:

  • Windows: Ctrl + V or a right mouse click.
  • Mac: Cmd + V.
  • Linux: Ctrl + Shift + V (Ctrl + V on its own usually does not work).

A command you type only runs when you press Enter. But if you paste several lines at once, some may run straight away. So paste first into a text editor (such as Notepad), read it, and copy from there one line at a time. Before Enter, read the line: that one second of pause is your seat belt.

Tip

Ctrl + C, in the terminal, means "stop". If a command runs without end, or you made a mistake, press Ctrl + C and you are back at the command line. To copy text from the terminal, select it with the mouse and use the right-click menu.

What can go wrong

With these commands, almost nothing. The common errors are harmless:

  • "is not recognised" or "command not found": you mistyped the command, or it does not exist on that system. Check the letters.
  • "does not exist" or "No such file or directory": the folder or file name is wrong. Run ls (or dir) to see the right names.
  • Names with spaces: cd My documents fails. Add quotes: cd "My documents". Better still: give your folders names without spaces or accents.
  • Capital letters: on Linux, Documents and documents are different folders. Copy the name exactly as it appears.

Tip

The Tab key completes names. Type cd Doc and press Tab: the terminal finishes the word for you. The up arrow repeats the previous command.

What you never type without understanding

Some commands delete without asking and without going through the bin. The best known is recursive delete: rm -rf on Mac and Linux, Remove-Item -Recurse -Force on Windows. "Recursive" means: this folder, everything inside it, and everything inside what is inside it.

Another word that calls for attention is sudo, on Mac and Linux: it means "do this as administrator", without the usual safety catches.

Watch out

Never paste a command with rm -rf, Remove-Item -Recurse or sudo if you do not understand exactly what it does and in which folder. One extra space can change the target from one folder to the whole disk. If a website, a video or a message tells you to paste something like that "to fix a problem", stop and ask someone you trust. This is also a trick used in scams.

The commands in this lesson only look or create an empty folder. None of them deletes anything. When a coding agent asks your permission to run a command, ask the same question: does this command look, create or delete?

Exercise

You are going to create the folder where you do all the experiments in this course.

How I know it worked the second pwd ends in experiencias, the listing appears empty (the folder is new) and at the end the screen is clear.

If it didn't work

  • The folder already exists: great, you already had it. Skip to step 4.
  • cd experiencias gives an error: run ls (or dir) and check that the folder appears, spelt the same, without accents.
  • You typed and nothing happened: did you press Enter? What you type by hand only runs with Enter.
  • On Windows, pwd gives an error: you probably opened CMD. Close it and open PowerShell (the line starts with PS).
  • Everything froze: press Ctrl + C.

Videos

Como Navegar no Terminal do Windows #02 — PWD, LS, CD e Mais
Usando Python · 10 min · PT · subtitles · Watch on YouTube
Shows, in the Windows terminal (PowerShell), the pwd, ls or dir and cd commands, including cd .. to go up a folder, at a gentle pace and without deleting anything. It does not show mkdir; that one is in the lesson text. The presenter speaks Angolan Portuguese.
Learn the Terminal in 10 Minutes (Before You Touch Claude Code)
Chris · 9 min · EN · subtitles · Watch on YouTube
Demo on Windows PowerShell with the Mac and Linux equivalents called out: pwd, ls, cd, Tab completion, mkdir, creating a file and reading it with cat. The stretch stops before the video moves on to deleting files.

Test what you learned

1. You opened the terminal and you do not know which folder you are in. What is the best first thing to type?
2. A video tells you to paste "sudo rm -rf" followed by a path, "to free up disk space". What is the best reaction?
3. You want to create a folder called experiencias in the folder you are in, and go into it. What is the right sequence?

Corrections to this lesson (1)
  • : After an external review: pressing Enter is no longer presented as a guarantee that a command only runs when you decide; pasting several lines at once can run them immediately, so the lesson now tells you to paste into a text editor first and copy one line at a time. Quiz options were reordered.