The path
🐧 First StepsLesson 2 of 30 4 min 25 XP

🗂️Files are pages, folders are drawers

Everything on a computer is a file, and files live inside folders.

Think of a huge desk with one drawer for school, one for drawings and one for snacks. Inside each drawer are smaller folders. That is exactly how a computer keeps things tidy.

🐧 Tux tells a story

Two kinds of things

A file is one page with something written on it: a photo, a song, a story. A folder is a drawer that holds pages and other drawers. A folder inside a folder is called a subfolder.

Every file has an address

The address of a file is called its path. It starts at the very first folder of the computer, which is written as a single slash: /. So /home/penguin/notes/todo.txt means: start at /, open home, open penguin, open notes, take todo.txt.

💡 Think of it like this

A path is like directions to a house: country, city, street, door number. If one part changes, you end up somewhere else.

Names you will keep seeing

  • / is the root, the top of the whole tree
  • /home is where people's own folders live
  • ~ is short for your home folder
  • . is the folder you are standing in
  • .. is the folder one step above you

🔬 The grown-up version

Linux has one single tree, and everything hangs off /, including disks and devices. A USB stick does not become C: — it gets mounted inside the tree, for example at /media/you/stick.

Now you try

This terminal is pretend, so you cannot break anything. Tap a chip or type a command yourself.

tux — bashpractice

Try the commands from this lesson. Type one and press Enter, or tap a chip below.

penguin@tux:~$
try

Quick check

What is a folder?

What does ~ mean?

Finished this one?

Mark it done to collect 25 XP and keep your streak growing.