📖 L2 of 5 · M0⏱ 5 min

Navigating files

The terminal always thinks it's standing in some folder. These three commands tell you where, and let you walk around.

1Where am I?

Type pwd (print working directory). The terminal prints the full path of where you currently are:

pwd
→ /Users/you

That's your home directory. The squiggle ~ is shorthand for it.

2What's here?

Type ls (list). It prints what's in the current directory.

ls
→ Desktop  Documents  Downloads  Pictures  ...

For more detail (sizes, dates), use ls -la. The -la is a flag — extra options you tack on.

3Go somewhere else

Type cd (change directory) followed by where you want to go:

cd Documents      # go into Documents
cd ..             # go up one level
cd ~              # go home
cd /              # go to the very top of the disk
cd -              # go back to where you just were

Path trick: typing the first few letters of a folder name and hitting Tab auto-completes the rest. Use this constantly. It also catches typos before you commit them.

4Absolute vs. relative

/Users/you/Documents is an absolute path — it works no matter where you are. Documents alone is relative — it only works if there's a Documents folder in the directory you're standing in.

On Windows in WSL, your Windows drive is at /mnt/c/ — so your Windows desktop is /mnt/c/Users/YourName/Desktop.

Deep-path detail: there are also two special path shortcuts: . means "the current directory" (so ./run.sh means "the run.sh in this folder"), and .. means "the parent directory." You'll see these all the time in install scripts.

5Practice

Open a terminal and try this sequence:

pwd
ls
cd Downloads
ls
cd ..
pwd

Notice how pwd changes after each cd. That's all there is to navigating. You can stop here — this is enough for everything Tailscale will ask you to do.

🧠Knowledge check

Three quick questions

Pick an answer to see why.

Q1.You run pwd and see /home/you/Downloads. What does cd .. do?
Q2.You're at ~ and want to see hidden files. Which command?
Q3.What's the difference between ./run.sh and /run.sh?
3 / 3
Nice work.