Skip to content
← Inforjota
Cursos Inforjota Português

Lesson 2 of 3 · 14 min · Checked on 6 October 2026

Folders, files and an editor (Windows, Mac and Linux)

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

  • Read a file path on Windows, Mac and Linux
  • Show file extensions and hidden files, such as .env and .gitignore
  • Install VS Code and open a whole folder in it
  • Decide whether you need WSL on Windows

You downloaded the letter from the Finanças (the tax office) yesterday. Where is it? Your file explorer says "Downloads" (or a translated name, such as "Transferências" on a Portuguese system). The terminal, and any coding agent, says something else:

  • Windows: C:\Users\Graca\Downloads\carta_financas.pdf
  • Mac: /Users/graca/Downloads/carta_financas.pdf
  • Linux: /home/graca/Transferências/carta_financas.pdf (on Linux, folder names may come translated)

It is the same file written as an address. In this lesson you learn to read these addresses, to see what the computer hides and to open a whole folder in an editor.

The path is the address

A path is read from left to right, like an address in reverse: disk, folder, subfolder, file. On Windows folders are separated with \; on Mac and Linux, with /.

There are two kinds of path:

  • Absolute: starts at the beginning of the disk (C:\ or /). It works from anywhere.
  • Relative: starts from the folder you are in. If you are inside experiencias, the path index.html is enough to refer to the file that is there.

The sign ~ means "my personal folder". ~/experiencias is the experiencias folder inside your personal folder. Agents use this a lot.

The extension tells the type

The letters after the last dot are the extension: .pdf (document), .docx (Word), .txt (plain text), .html (web page), .py (Python), .js (JavaScript), .md (text with simple formatting), .json (data).

Windows hides extensions by default. For someone who is going to work with code, that is bad: you cannot tell index.html from index.html.txt. And it is dangerous: factura.pdf.exe shows up as factura.pdf.

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

  • Windows 11: in File Explorer, View > Show and switch on file name extensions ("File name extensions").
  • Windows 10: the View tab, the "Show/hide" group, tick the box for file name extensions.

Watch out

With extensions hidden, a program disguised as a PDF looks like a PDF. Switch extensions on today and leave them on. The extension that counts is the last one: carta.pdf.exe is a program, not a letter.

Hidden files

On Mac and Linux, a file whose name starts with a dot is hidden. You will often meet two of them in this course:

  • .env: holds secrets, such as access keys. It is never shared.
  • .gitignore: lists what Git should not keep (lesson 1/05).

To see them:

  • Mac (Finder): Cmd + Shift + . (dot) switches them on and off.
  • Linux (file manager): usually Ctrl + H.
  • Windows: names with a dot appear normally; other hidden things, such as the .git folder, only with View > Show > Hidden items.
  • In the terminal: ls -a on Mac and Linux; dir -Force in PowerShell.

An editor: VS Code

Word is no good for code: it puts hidden formatting into the file. You need a plain text editor. Notepad would do, but VS Code (free, from Microsoft) shows the whole folder on the left, colours the code and has a terminal inside.

  1. Go to the Visual Studio Code website, download the version for your system and install it like any program.
  2. Open VS Code and use File > Open Folder…. Choose the experiencias folder.
  3. On the left appears the Explorer, with the files of the folder.
  4. For the terminal inside the editor: View > Terminal, or Ctrl + ` (the backtick key). It opens already inside the folder.

Official guide: What is a VS Code workspace?

Tip

If you are in the terminal inside the folder, code . opens it in VS Code (the dot means "this folder"). On a Mac you may need to enable this command first; if it does not work, use the menu, which does the same.

Tip

When you open a folder, VS Code may ask whether you trust the authors of the files. For a folder of your own, like experiencias, answer yes. For a folder downloaded from a stranger, answer no: it opens in restricted mode, which does not run anything by itself.

Windows: WSL in five lines

  1. Many programming tools were born on Linux and Mac, so many guides assume the commands of those systems.
  2. WSL (Windows Subsystem for Linux) puts a real Linux inside Windows, without deleting anything.
  3. It needs Windows 10 version 2004 or later, or Windows 11. Open PowerShell as administrator (right-click, "Run as administrator") and type wsl --install.
  4. Restart the computer. Ubuntu is installed by default.
  5. The first time you open it, you create a user name and a password just for Linux.

Source: Install WSL.

You can work without WSL. Claude Code and Codex have installers for Windows (lesson 1/02), and in this course every command has the Windows version beside it. WSL is handy when a guide only has Linux commands.

Tip

When you type the password on Linux, nothing appears on screen, not even asterisks. That is normal. Type it and press Enter.

Exercise

How I know it worked the file appears in the Explorer with the name horario.txt (with the extension visible) and the terminal shows the sentence you typed.

If it didn't work

  • The terminal says the file does not exist: check with pwd that you are in the experiencias folder, and with ls or dir that the name is the same.
  • The file is called horario.txt.txt: the editor added an extension. Rename it in the VS Code Explorer.
  • wsl --install shows a permissions error: PowerShell was not opened as administrator. Close it and open it with a right-click.
  • On Windows, the accents come out swapped (for example à instead of à): the file is fine; it is PowerShell reading the accents in a different way. Check in VS Code that the sentence is right.

Videos

VS Code para Iniciantes: Guia Completo do Zero
Professor Attique · 24 min · PT-BR · subtitles · Watch on YouTube
A beginner's guide to VS Code: opening project folders, creating files, the integrated terminal, extensions and Git.
Learn Visual Studio Code in 15 minutes: 2026 Official Beginner Tutorial
Visual Studio Code · 15 min · EN · subtitles · Watch on YouTube
An official VS Code tutorial in 15 minutes: the interface, creating a file, AI chat and version control.

Test what you learned

1. You received an email attachment that shows on your Windows as "factura_luz.pdf" (an electricity bill), but the icon looks odd. What is the best reaction?
2. A guide tells you to create a .env file containing a key. You created it, but you cannot see it in the Mac Finder. What is going on?
3. You are on Windows and an installation guide only shows commands for Mac and Linux. What is the best reaction?

Corrections to this lesson (1)
  • : After an external review: three bare web addresses became named links (VS Code site, workspaces guide, «Install WSL»). Quiz options were reordered.