Open the terminal. Type pwd. You're somewhere. Understand the path.
pwd
# /Users/yourname (macOS/Linux)
# C:\Users\yourname (Windows)
See what's in your current directory with different levels of detail:
ls # basic listing
ls -l # long format (permissions, size, date)
ls -la # include hidden files (dotfiles)
ls -lah # human-readable sizes (KB, MB, GB)
Move around the file system. After each cd, run pwd to confirm where you are.
cd Desktop # go into Desktop
cd .. # go up one level (parent)
cd ~ # go home
cd / # go to root of file system
cd - # go back to previous directory
Build your project workspace from scratch — no file explorer allowed:
mkdir -p ~/pixelcraft-workspace/notes
mkdir -p ~/pixelcraft-workspace/practice
cd ~/pixelcraft-workspace
Write content to files and read it back:
echo "Day 2 at PixelCraft Inc." > notes/day2.txt
cat notes/day2.txt
echo "I learned the terminal today" >> notes/day2.txt
cat notes/day2.txt
| Operator | Behavior | Example |
|---|---|---|
| > | Write (overwrite) | echo "new" > file.txt |
| >> | Append | echo "more" >> file.txt |
cp notes/day2.txt notes/day2-backup.txt # copy
mv notes/day2-backup.txt notes/day2-copy.txt # rename
rm notes/day2-copy.txt # delete forever
Create this structure using ONLY terminal commands:
project/
├── src/
│ ├── scripts/
│ ├── styles/
│ └── assets/
├── docs/
└── README.md
Solution:
mkdir -p project/src/scripts project/src/styles project/src/assets project/docs
touch project/README.md
The REPL — Read-Eval-Print Loop.
The terminal is a REPL. It reads your command, evaluates (executes) it, prints the result, and loops back waiting for the next.
Understanding REPLs means understanding the fundamental interaction model between humans and computers. Every tool you'll use in this course follows this pattern.