Skip to content
DoingCamp CS

Make it comfy

Lesson style

Quick mode shows the key picture, a summary and the practice. Good for a refresher.

Theme
Font

Both fonts are designed to be easy to read. Some readers with dyslexia prefer Lexend.

Text size
Spacing
Animations

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

The story

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.

Play with it

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
you@crayon:~$

Files

🏠 ~ (home) ← you are here

  • 📁 notes/
  • 📄 ideas.txt
  • 📄 todo.txt
  • 📁 photos/
  • 📄 beach.jpg
  • 📁 projects/
  • 📁 website/
  • 📄 index.html
Name it

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 (-l for “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 -l shows details; ls -a also 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.
  • Help: man ls (the manual) or ls --help on a real computer. In our pretend shell, type help.
  • Time savers: press Tab to auto-complete names, and the ↑ arrow to bring back earlier commands.
Build it

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

you@crayon:~$

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
Challenge

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

you@crayon:~$

Files

🏠 ~ (home) ← you are here

  • 📁 vault/
  • 📄 .secret.txt
  • 📁 old/
  • 📄 notes.txt
  • 📄 readme.txt
  • ⬜ CRAYON
Remember it

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?