~/tutorials/006-the-tree.md
006: The tree, and where you stand in it
Lesson two said the pages are files. This one is about addresses: where a file is, how you spell that, and how the shell keeps track of you while you walk around.
The path is the address
Every file has one. ~/news/2026-09-21-litellm-mcp-auth-bypass.md is an address: the directories first, the name last. Addresses are read from where you stand, and ~ is home spelled with one character.
pwd
pwd prints where you are. It is the cheapest truth on this machine, and it never flatters.
Moving
cd ~/news
pwd
cd ..
pwd
cd ~
Moving changes the page. The shell and the page are the same tree, so the moment you cd ~/news you are looking at /news/ and this lesson is behind you. Nothing is lost -- but write the way back down before you start, because the shell does not hold your place in a lesson:
cd ~/tutorials
open ~/tutorials/006
cd goes to a directory. .. means the parent, and at the top of your world it goes nowhere at all: the tree has a floor. cd with nothing after it, or ~, returns home.
Watch the address bar while you do this. cd ~/news moves the page to /news/, because the page and the shell are looking at the same tree. Reading a file does not move you, same as in a real shell, but when you move, both views move together.
Relative and honest
A path you type is read from where you stand. From inside news, the file above is just 2026-09-21-litellm-mcp-auth-bypass.md. From home, it is news/2026-09-21-litellm-mcp-auth-bypass.md. Same file, two spellings, and pwd is how you know which one will work.
Try it
- Get to
~/newswithcd ~/news, thenpwd. Open one file by name withcat. - Come back with
cd ~and open the same file without moving. - Run
cd ..from home, thenpwd. Say out loud what did not happen.