Notes
Why a VM
Why a virtual machine, and not just your laptop's terminal? A VM is a complete Linux computer running inside your laptop: real systemd, real users, disks and networking, exactly what servers run. It is isolated, so when a lab fills the disk or breaks the network, your laptop is fine. You can snapshot it and go back. And it costs nothing. A laptop with eight gigabytes of memory is enough; sixteen is comfortable.
- real Linux: systemd, users, disks, networking
- isolated: break it, your laptop is fine
- snapshots: undo in seconds
- free: no cloud bill
- needs: 8 GB RAM laptop (16 GB comfortable)
Mac and Linux
On a Mac or Linux, the simplest tool is Multipass, made by the company behind Ubuntu. Install it from its website, then one command launches Ubuntu twenty four point zero four with a name, two CPUs, four gigabytes of memory and a twenty gigabyte disk. Multipass shell drops you inside it, at a prompt that says ubuntu at devlab. Stop and start it whenever you like. It also works on Windows.
# install from multipass.run
$ multipass launch 24.04 \
--name devlab --cpus 2 \
--memory 4G --disk 20G
$ multipass shell devlab
ubuntu@devlab:~$
$ multipass stop devlab
$ multipass start devlab Windows
On Windows you can also use WSL, the Windows Subsystem for Linux. Open PowerShell as administrator, run wsl install with the Ubuntu twenty four point zero four distribution, restart when asked, and choose a username and password. WSL two runs a real Linux kernel, which uname confirms. A few labs about booting and systemd behave differently in WSL, and the lab pages say when, so Multipass is the better choice if you have both.
# PowerShell, as administrator > wsl --install -d Ubuntu-24.04 # restart when asked # set a username and password $ uname -a Linux ... microsoft-standard-WSL2 also fine: Multipass on Windows
Check it
Inside the VM, your first commands answer one question: what machine am I on? The os release file names the system, Ubuntu twenty four point zero four point five on ours. N proc counts CPUs, free shows memory, and d f shows disk space. These four commands are the start of every investigation on an unfamiliar server, and you will see them again in part one.
$ cat /etc/os-release | head -1 PRETTY_NAME="Ubuntu 24.04.5 LTS" $ nproc 2 $ free -h | head -2 Mem: 7.8Gi total 7.3Gi avail $ df -h / # size, used, available
Install tools
Now install the basics with apt, Ubuntu's package manager: Git, curl, Python with its virtual environments, and j q for reading JSON. Docker installs with its official script. Add yourself to the docker group, log out and back in, and run the hello world container to check it works. Part one explains what apt and sudo really do, and part six explains what Docker is doing underneath.
$ sudo apt update
$ sudo apt install -y git curl \
python3 python3-venv jq
$ curl -fsSL https://get.docker
.com | sh
$ sudo usermod -aG docker $USER
# log out and in again
$ docker run hello-world Run ShopRung
Next, ShopRung, the small online shop every lab in this track deploys, monitors and breaks. Download it, unzip it, and start it with npm start. It needs Node twenty two or newer and no other packages. When it says it is running, ask its health check with curl. Status up, app ShopRung, version one point zero point zero. In later parts the same shop moves into containers, a cloud server and Kubernetes.
# Node.js 22 or newer
$ unzip shoprung.zip && cd shoprung
$ npm start
ShopRung is running at
http://localhost:8080
$ curl localhost:8080/api/health
{"status":"UP","app":"ShopRung",
"version":"1.0.0"} Snapshots
Before a risky lab, take a snapshot. With Multipass, stop the VM and snapshot it with a name like clean; restore goes back to that moment, whatever you broke. With WSL, export the distribution to a file and import it again later. Being able to undo makes you braver, and breaking things on purpose is how you learn what the symptoms look like before you meet them at work.
$ multipass stop devlab
$ multipass snapshot devlab \
--name clean
$ multipass restore \
devlab.clean
WSL: export and import
> wsl --export Ubuntu-24.04
devlab.tar What comes later
Each later part adds its tools to this same lab. Docker and Compose in part six. In part eight, an optional AWS free-tier account, always with a budget alarm and a teardown step at the end of every lab, so nothing keeps charging you. Terraform and LocalStack, which imitates AWS on your laptop, in part nine. Kind or k three d for Kubernetes in part ten, and Prometheus and Grafana in part eleven.
- part 6: Docker and Compose
- part 8: an AWS free-tier account, with a budget alarm and a teardown step per lab
- part 9: Terraform, LocalStack (AWS APIs on your laptop)
- part 10: kind or k3d for Kubernetes
- part 11: Prometheus, Grafana
Common mistakes
Mistakes. Practising on a work laptop or, worse, a work server. Skipping the snapshot before a risky lab. Giving the VM too little memory, so everything is slow and confusing. Running everything as root, which hides permission problems you need to learn. Cloud labs without a budget alarm or teardown. And pasting commands you have not read; every command in this track is explained so you never need to.
- practising on your work laptop or a work server
- no snapshot before a risky lab
- a VM with 1 GB of memory
- running everything as root
- cloud labs with no budget alarm or teardown
- copying commands you have not read
Say it like this
In the interview: I keep a home lab, an Ubuntu virtual machine with snapshots, Docker and a local Kubernetes cluster. I deploy a small app, break it on purpose, a full disk, bad DNS, a memory leak, and write down how I found and fixed each one. Cloud practice runs on a free tier with budget alarms and a teardown step.
- "I keep a home lab: an Ubuntu
- VM with snapshots, Docker and a local Kubernetes cluster. I
- deploy a small app, break it on purpose, and write down how I
- found and fixed each fault.
- Cloud work runs on a free tier
- with budget alarms."