Module 8: Developer Workstation Basics
Moving around with commands
🏠The everyday picture
Walking through a building using only signs: "you are here", "go into room 3", "go back to the corridor".
📘What it really is
The commands you'll use most:
| Task | Mac / Linux / PowerShell | Older Windows Command Prompt |
|---|---|---|
| Where am I? | pwd |
cd |
| What's here? | ls |
dir |
| Go into a folder | cd Projects |
cd Projects |
| Go up one level | cd .. |
cd .. |
| Go home | cd ~ |
cd %USERPROFILE% |
| Make a folder | mkdir notes |
mkdir notes |
| Clear the screen | clear |
cls |
- Tab completion: type the first few letters of a folder name and press Tab; the terminal finishes it.
- History: press the up arrow to bring back previous commands.
- Names with spaces need quotes:
cd "My Projects". Developers avoid spaces in names for this reason and use hyphens instead:my-projects.
🖱️Try it
Navigate to the folder you made in Module 2:
cd ~
cd Documents
cd Projects
cd my-first-site
pwd
Then go back up twice with cd .. and check where you are with pwd.
✅Quick check
You type ls and see my-first-site. How do you go into it?
Show the answer
cd my-first-site (type cd my and press Tab to save time).
Why do developers name folders my-project instead of My Project?
Show the answer
Spaces need quotes in the terminal and cause errors in many tools. Hyphens avoid that.
