These notes teach the five tools we use in class: the terminal, file paths, VS Code, Git & GitHub, and SSH. Read a step, do it on your own computer, then tick the checkbox. The skills only stick if you repeat them 2–3 times — that is what the ⚡ Practice Terminal button (bottom-right) is for: a safe fake terminal inside this page where nothing can break.
1The Terminal — talking to your computer with words
The terminal is a window where you type commands instead of clicking icons. Programmers use it because it is faster, exact, and it is how you use Git, SSH and remote computers.
1.1 Open a terminal
You will see a prompt — a line ending in $ (or >) that waits for you to type:
student@mpa:~$ ← the prompt. "~" means you are in your home folder
1.2 The four commands you will use every single day
pwd # "print working directory" — WHERE am I? ls # "list" — WHAT is in this folder? cd data # "change directory" — GO into the folder called data cd .. # go UP one level (back to the parent folder)
pwd) → what's here? (ls) → go there (cd). When you feel lost, type pwd then ls.Two more you'll need this week:
mkdir my-project # make a new folder called my-project cat notes.txt # show the contents of a file on screen
1.3 The superpower: Tab completion
pwd, ls, cd projects, pwd. Watch the mission boxes tick themselves.Quiz — you are lost in the terminal. What is the FIRST command to type?
pwd tells you where you are. Then ls shows what's around you. Lost → pwd → ls.
2File Paths — your computer's street addresses
A path is the address of a file. In class, when Python said it could not find your data, the path was wrong. Here is the picture to keep in your head — folders inside folders:
└─ Users
└─ student (your home folder = ~)
└─ data
└─ titanic.csv → full path: /Users/student/data/titanic.csv
| Kind | Example | Meaning |
|---|---|---|
| Absolute | /Users/student/data/titanic.csv | Full address from the root. Starts with /. Always works. |
| Relative | data/titanic.csv | Address starting from where you are now. Short, but breaks if you move. |
| Shortcuts | ~ . .. | home folder · this folder · parent folder |
2.1 How to FIND a file's path (3 easy ways)
2.2 Using the path to read data in Python
import pandas as pd df = pd.read_csv("/Users/student/data/titanic.csv") # paste the path INSIDE quotes df.head()
FileNotFoundError means exactly one thing: the path in the quotes does not match where the file really is. Fix: find the real path with a trick above and paste it again. It is never magic, it is always the path.~/data, then use pwd, ls and cat titanic.csv.Quiz — which path works no matter which folder you are standing in?
Absolute paths (starting with /) are full addresses — they work from anywhere. The other two are relative: they only work if you happen to be standing in the right folder.
3VS Code — your coding workbench
Visual Studio Code (VS Code) is the free editor we use. It shows your files on the left, your code in the middle, and it has a terminal built right in.
4Git & GitHub — a save-game system for code
Git = a program on your computer that takes snapshots ("commits") of a project folder, like save points in a video game. GitHub = a website that stores a copy of those snapshots online so you can back up, share, and work with others.
4.1 One-time setup (tell Git your name)
git config --global user.name "Your Name" git config --global user.email "you@example.com"
4.2 Start a new repo — and make your first commit
A repository (repo) is just a folder that Git is watching. The everyday rhythm is status → add → commit:
mkdir my-project # 1. make the folder cd my-project # 2. go inside git init # 3. tell Git: start watching this folder touch README.md # 4. create a first file (touch = make empty file) git status # 5. ask Git what changed — it sees README.md is new git add README.md # 6. put the file in the "photo frame" (staging) git commit -m "first commit" # 7. take the snapshot, with a message git log # 8. see your history of snapshots
git add chooses which changes go in the photo; git commit takes the photo. This lets you snapshot only the files you mean to. Tip: git add . stages everything in the folder.4.3 Connect it to GitHub and push
git remote add origin git@github.com:YOURNAME/my-project.git # link folder ↔ website (once) git push -u origin main # upload your commits ("push" = send up)
Refresh the GitHub page — your files are online. After the first time, uploading is just git push.
4.4 Why pull?
git pull # download the newest commits from GitHub into your folder
git pull brings your folder up to date. Habit: pull before you start working, push when you stop.4.5 Why (and how) merge?
A branch is a side copy of your project where you can experiment without touching the main version. Merging folds your experiment back into main when it works:
git checkout -b feature # make a branch called "feature" and jump onto it touch idea.txt # ...experiment freely here... git add . git commit -m "try an idea" git checkout main # jump back to the main version — idea.txt is NOT here! git merge feature # fold the experiment into main — now it is
main is untouched; if it works, merge keeps it. This is also how teams work: each person builds on a branch, then merges.Quiz — you sit down to work on a shared project. What do you run FIRST?
git pull first — grab the newest version before you start, so you're not working on old code. Push comes at the end, to share what you did.
Quiz — what does git commit -m "fix bug" actually do?
Commit = local save-point. Nothing goes online until you git push.
5SSH — a secure tunnel to another computer
SSH (Secure Shell) lets your terminal control another computer over the internet — everything you type runs there. It is also how Git talks to GitHub without asking for your password every time.
ssh username@computer-address # e.g. ssh student@lab.school.edu # ...now your prompt belongs to the OTHER computer. Type "exit" to come home.
5.1 Make an SSH key (one time) — a lock-and-key pair
ssh-keygen -t ed25519 -C "you@example.com" # press Enter at every question cat ~/.ssh/id_ed25519.pub # show your PUBLIC key — copy this line
.pub) is the lock — you give it to GitHub. The private key stays on your computer and never leaves — it is the only key that opens the lock. That's why there is no password to steal.5.2 Mission 6 — your first real handshake with a real server
Everything in 5.1 was setup. This is the payoff: you are going to open an SSH connection to an actual server on the other side of the internet — GitHub's — and have it recognise you by your key, with no password. Nothing here is simulated.
ssh -T git@github.com # first time it asks about a "fingerprint" — type: yes # no password needed. Your KEY is the password — that's the whole point!
ssh -T git@github.com, the same command you just ran for real.6Cheat sheet — print me
| I want to… | Command |
|---|---|
| See where I am / what's here | pwd · ls |
| Move into / out of a folder | cd folder · cd .. |
| Make a folder / empty file | mkdir name · touch name |
| Start watching a folder with Git | git init |
| See what changed | git status |
| Save a snapshot | git add . then git commit -m "message" |
| See history | git log |
| Upload / download vs GitHub | git push · git pull |
| Experiment safely, then keep it | git checkout -b name … git checkout main · git merge name |
| Control another computer | ssh user@address (leave with exit) |
| Check my key works against GitHub | ssh -T git@github.com |
Your homework: close these notes, open the ⚡ Practice Terminal, and redo Missions 3 and 4 from memory. Then do Mission 6 (section 5.2) for real — ssh -T git@github.com, against a real server, with your own key. That's how it becomes yours.
