A Linux practice machine
Get a Linux machine you can break and rebuild on your own computer, so you can repeat the Linux labs, run the real commands they list and try your own challenges.
What you need
A Linux machine you are allowed to damage. The safest way is a virtual machine or a WSL 2 instance: it lives inside your computer, costs nothing, and can be deleted or rolled back in a minute. Use Ubuntu Server LTS (the long-term-support release) unless a course says otherwise, because most lessons and the commands in the labs are written for it.
Check that your computer can run a virtual machine: 8 GB of memory is comfortable (4 GB is the least), and hardware virtualisation (called VT-x, AMD-V or SVM) must be switched on in the firmware settings if the tool complains.
Set it up
Pick one route.
- Windows, easiest: open PowerShell as administrator and run
wsl --install -d Ubuntu, then restart and create a user. This gives you a real Ubuntu shell. It is ideal for commands, files, packages and scripts. It is less suited to labs that need a full boot sequence, disks or their own network (RAID, fstab, firewalls), where a virtual machine is better. - Any computer, most complete: install VirtualBox from virtualbox.org, download the Ubuntu Server LTS installer image from ubuntu.com, create a virtual machine with 2 CPUs, 2 to 4 GB of memory and a 25 GB disk, and install. Choose “Install OpenSSH server” when asked.
- Mac or Linux, quickest: install Multipass (multipass.run) and run
multipass launch --name lab --cpus 2 --memory 2G --disk 20G, thenmultipass shell lab.
Then update it and add the tools most labs use:
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl git vim nginx bind9-utils dnsutils tcpdump net-tools
Each course tells you which extra packages it needs (for example haproxy, chrony, unbound or auditd). Install them only when you reach that lesson.
Check that it works
Run these and confirm each gives a sensible answer:
whoami # your user name
lsb_release -a # Ubuntu and its version
ip -br addr # an address on at least one interface
ping -c 2 1.1.1.1 # the internet is reachable
sudo apt install -y tree && tree --version
If ping fails in VirtualBox, set the network adapter to NAT (internet access) or Bridged (appears on your home network).
Practise safely
- Take a snapshot (VirtualBox: Machine, Take Snapshot; Multipass:
multipass snapshot lab) before every risky change, such as editing/etc/fstab, firewall rules or network settings. If you lock yourself out, restore it. - Break things on purpose: edit a configuration file wrongly, restart the service, read the error, then fix it. That is the fastest way to learn what the error messages mean.
- Never practise firewall or network changes on your real computer or on a network you do not own. A virtual machine on a host-only or NAT network cannot harm anyone else.
- Keep notes of commands that worked in a text file, so you build your own cheat sheet.
Go further
- Repeat each lab’s “test it for real” commands on your machine after you pass the browser version.
- Rebuild the same server from scratch twice, without notes. Time it. The second time is much quicker.
- Make a second machine and connect the two (a client and a server), then practise services between them, such as DNS, DHCP, a web server and a time server.
- Free practice sites with real shells include OverTheWire (wargames for the command line) and picoCTF. Their terms and free offers change, so read them first.
Courses that use this lab
Other lab guides
- A virtual machine lab on your own computer
- A network lab with free simulators and virtual routers
- A packet-capture lab with Wireshark and tcpdump
- A network-services lab: DHCP, DNS, proxy, load balancer, time and failover
- A Windows Server and Active Directory lab
- A developer workstation: editor, Git, Python and Node
- A container and Kubernetes lab
- A monitoring lab with Prometheus and Grafana
- A security operations (SOC) practice lab
- An isolated security lab for authorised practice
- A cloud lab that cannot surprise you with a bill
- An embedded and microcontroller lab: simulators first, hardware second
- An electronics lab: simulate first, then build on a breadboard
- A Raspberry Pi lab, with or without a Pi
- A home automation lab with Home Assistant and MQTT
- An audio, video, streaming and show-control lab
- A data lab: Python, pandas and Jupyter on your own computer
- A machine learning lab: scikit-learn, notebooks and honest experiments
- An LLM lab: a free local model, embeddings and a test harness
- A TypeScript lab: Node.js, the compiler and a test runner
- A web deployment lab: Git, a free host and environment settings
Software changes quickly. Menu names and version numbers may differ a little from what you see; the ideas and the check at the end of each section stay the same. Always download from the project's own website, and read the licence terms for your situation.