Lesson 1 of 16 · about 12 min
The shell
The shell lets you talk to your computer by typing commands instead of clicking. You'll learn where you are (pwd), what's here (ls), and how to move around (cd).
🧭 What you need first: From your code to the chip
Ordering food at a restaurant, you can point at pictures on the menu (clicking around a screen), or you can tell the waiter exactly what you want: “a large margherita, extra basil, no olives.” Pointing is easy to start with. Talking is faster, more precise, and lets you ask for things that aren’t on the pictures.
The shell is talking to your computer. Instead of double-clicking folders, you type short commands. It looks old-fashioned, but almost every professional programmer uses it every day, because it’s fast, precise, and you can automate anything you can type.
Don’t worry: everything in this lesson happens in a pretend computer inside the page. You can’t break anything, so explore freely.
Another way: GPS vs. driving yourself
Clicking through folders is like following GPS turn by turn. The shell is like knowing the city: you just say the address and go there directly.
Another way: texting your computer
The shell is a chat with your computer. You send a short message (“ls”), it texts back the answer. Every chat starts with a prompt that shows who and where you are.
Look around
Type pwd and press Enter. Then ls. Then cd notes, ls again, and cd .. to come back. Watch the file map on the right show where you are. (help lists every command this shell knows.)
Welcome! This is a pretend computer, so nothing you type can hurt your real one. Try: pwd
Files
🏠 ~ (home) ← you are here
- 📁 notes/
- 📄 ideas.txt
- 📄 todo.txt
- 📁 photos/
- 📄 beach.jpg
- 📁 projects/
- 📁 website/
- 📄 index.html
The real words
- A shell (terminal) is a program that reads commands you type and runs them. The window it runs in is called the terminal. Common shells: bash (Linux, older Macs), zsh (modern Macs), PowerShell (Windows).
- The prompt (like
you@crayon:~$) shows who you are and which folder you’re in, and waits for a command. - Command anatomy:
ls -l notes: the command (ls), options or flags that change how it behaves (-lfor “long”), and arguments (notes, what to act on). - pwd, ls, cd:
pwd(print working directory): the folder you’re in right now.ls(list): what’s in this folder.ls -lshows details;ls -aalso shows hidden files (names starting with.).cd path(change directory): move to another folder.
- A path is an address for a file or folder:
- Absolute paths start at the very top,
/:/home/you/notes/todo.txt. - Relative paths start from where you are:
notes/todo.txt. - Shortcuts:
~= your home folder,.= this folder,..= the folder above.
- Absolute paths start at the very top,
- Help:
man ls(the manual) orls --helpon a real computer. In our pretend shell, typehelp. - Time savers: press Tab to auto-complete names, and the ↑ arrow to bring back earlier commands.
Find your way around
Go into the projects/website folder, check where you are with pwd, and list what's inside.
Type a command below and press Enter. Try: ls
Files
🏠 ~ (home) ← you are here
- 📁 notes/
- 📄 todo.txt
- 📁 photos/
- 📄 beach.jpg
- 📁 projects/
- 📁 website/
- 📄 index.html
- 📄 style.css
- ⬜ You are in ~/projects/website
- ⬜ You used pwd to check where you are
- ⬜ style.css
Find the hidden note
Files whose names start with a dot are hidden: plain ls doesn’t show them.
Somewhere in the vault folder there's a hidden file with a secret word inside. Find it and print it.
Type a command below and press Enter. Try: ls
Files
🏠 ~ (home) ← you are here
- 📁 vault/
- 📄 .secret.txt
- 📁 old/
- 📄 notes.txt
- 📄 readme.txt
- ⬜ CRAYON
You're in /home/you/projects/website. Where does cd .. take you?
Got it?
Finish the lesson to color it in on your map and collect its concept cards.
Did this lesson click?