pwd: Where Am I?
Your current folder.
In the terminal, you're always standing inside one folder. It's called your current folder, or working directory. Every command you run starts from there. So the first question to ask is, where am I?

- You're always inside a folder
- Called the working directory
- Where am I?
Print working directory
PWD stands for print working directory. It prints the full path of the folder you're in. When you open a terminal, you start in your home folder, slash home slash sam.
pwd /home/sam
Reading a path
A path is like an address in the tree. Read it from left to right. Start at the root. Go into home. Then into sam. Each slash separates one folder from the next. So slash home slash sam means the sam folder, inside home, inside the root.
Home, and the tilde
Your home folder is special. It's where you have permission to create anything you like. Because you use it so often, it has a shortcut. The tilde sign. That's why the prompt shows a tilde when you're at home. Tilde, and slash home slash sam, mean exactly the same place.
| key | value |
|---|---|
| Home folder | /home/sam |
| Shortcut | ~ |
| ~ in the prompt | you're at home |
| Yours | you can create anything here |
Summary
PWD prints where you are, as a full path. Your home folder is slash home slash sam, or tilde for short. Next, how to see what's inside a folder.
Key takeaways- pwd: where am I
- /home/sam
- ~ means home