Welcome to the lab! ๐งช Here is where you get your very own Linux to explore. You only need to do this once.
Pick your Linux lab
There are several ways to get Linux. Pick the one that fits you. Ask a grown-up to help with the setup.
| Lab | Best for | Notes |
|---|---|---|
| ๐ Raspberry Pi with Raspberry Pi OS | The best real-hardware lab | A tiny computer that runs Linux. You can really see inside it. |
| ๐งช Virtual machine (Linux inside a window) | The safest sandbox | Free programs like VirtualBox (PC) or UTM (Mac) run Ubuntu in a window. Break it? Just reset it! |
| ๐ป Ubuntu on a computer | A full Linux desktop | Use a spare laptop, or "Try Ubuntu" from a USB stick without installing. |
| ๐ช WSL on Windows | A quick Linux terminal on Windows | A grown-up runs wsl --install in PowerShell. |
| ๐ A Linux terminal in your browser | Trying it in 30 seconds | Search for "online Linux terminal". It's fun to try, but some commands won't work. |
๐ On a Mac? The Mac Terminal is very similar to Linux, and many commands work the same. But some labs show things only Linux has (like
/procandfree). A virtual machine or a Raspberry Pi will match the lessons exactly.
All the labs in this course are written for Ubuntu and Raspberry Pi OS. If your Linux is different, most commands still work.
The lab rules ๐ฅฝ
Real scientists keep their lab safe. These rules keep you and your computer safe:
- ๐งช Work in your practice folder. Make and delete things only inside
~/MagiLab, the folder you'll create below. - ๐ค Only type commands you understand. If you aren't sure, ask a grown-up.
- ๐ช Ask a grown-up before
sudo. It gives super powers. We will meet it later. - ๐ซ Never copy a command from a stranger or a random website.
- ๐ If something looks scary, stop and ask. Nothing here is urgent.
Open the terminal
The terminal is a window where you type commands to the OS. Open it:
- Ubuntu desktop: press
Ctrl + Alt + T, or search for Terminal. - Raspberry Pi OS: click the black Terminal icon in the top bar.
- WSL or a virtual machine: open the Ubuntu or Terminal app.
You'll see a line that ends with $. That's the prompt, and it means "I'm ready for your command!"
๐งช Lab 1: your first commands
Type each command, then press Enter.
whoami
It tells you your user name. That's who the OS thinks you are.
hostname
This is the name of the computer.
pwd
Print working directory: where am I? You'll see something like /home/magi. That's your home folder.
date
echo "Hello, Linux!"
date shows the date and time. echo makes the computer say whatever you type.
cat /etc/os-release
This reads a file that every Linux has, with its name and version. Look for the line PRETTY_NAME=. That's your operating system's full name.
uname -a
uname shows facts about the kernel, the heart of Linux. Look for the version number, like 6.8.0.
๐งช Lab 2: make your practice folder
mkdir ~/MagiLab
cd ~/MagiLab
pwd
mkdirmakes a new folder. The~is a short way to write your home folder.cdmeans change directory: you walked into the new folder.pwdshould now show/home/yourname/MagiLab.
Three tricks that save you time โก
| Trick | What it does |
|---|---|
| โ (up arrow) | Brings back the last command you typed |
| Tab key | Finishes a name for you. Type cat /etc/os-r then press Tab |
| Ctrl + C | Stops a command that is running. This is your emergency brake! |
Also: clear tidies the screen, and man ls opens the manual for ls (press q to leave).
Your first cheat sheet
| Command | Meaning |
|---|---|
whoami |
Who am I? |
hostname |
What's this computer called? |
pwd |
Where am I? |
ls |
What's in this folder? |
cd folder |
Go into a folder |
mkdir name |
Make a folder |
echo "hi" |
Say something |
clear |
Tidy the screen |
man command |
Open the manual |

