Before you can practise a single command you need a Linux shell in front of you. This lesson explains what a Linux distribution is, how the major families differ, and walks through the three practical ways to get a terminal: Windows Subsystem for Linux, a virtual machine, and a cloud server. By the end you will have a working Ubuntu shell and know how to confirm which system you are on.
Linux itself is only the kernel — the core program that talks to hardware, schedules processes and manages memory. A distribution (distro) bundles that kernel with a package manager, system utilities, a default shell and usually a desktop environment. All distributions run the same core commands, so what you learn on one transfers to the others; the differences are mostly in package management and release policy.
| Family | Popular distros | Package manager | Typical use |
|---|---|---|---|
| Debian | Debian, Ubuntu, Linux Mint | apt (.deb packages) | Servers, cloud images, desktops, WSL default |
| Red Hat | RHEL, Fedora, Rocky Linux, AlmaLinux | dnf (.rpm packages) | Enterprise servers, Fedora for developers |
| Arch | Arch Linux, Manjaro | pacman | Rolling release, enthusiasts |
| Independent | Alpine, openSUSE | apk, zypper | Alpine is the base of most tiny Docker images |
For this course we use Ubuntu LTS (long-term support) because it is the most common cloud image, the default in WSL, and has five years of security updates. Every command shown here also works on Debian and, with dnf substituted for apt, on Fedora and Rocky Linux.
Windows Subsystem for Linux runs a real Ubuntu userland on Windows 10 (build 19041+) and Windows 11. It starts in seconds and shares your Windows files under /mnt/c.
# In PowerShell as Administrator
wsl --install -d Ubuntu
# Reboot, open the Ubuntu app, create a username and password, then:
wsl --list --verbose # from PowerShell: shows the distro and WSL version (2 is what you want)Inside Ubuntu, your Windows drive is available at /mnt/c/Users/<name>. Keep project files inside the Linux filesystem (~/projects) rather than under /mnt/c — file operations are dramatically faster there, and tools like npm behave correctly with Linux permissions.
A VM gives you a full, isolated Linux system with its own disk and network, which is the safest place to experiment with users, permissions and services.
Take a snapshot after installation. When you break something while learning — and you will — you can roll back in seconds.
Every cloud provider offers small Linux machines, and several have a free tier. This is the most realistic option: you connect over SSH exactly as you would to a production server.
# Typical first connection to a freshly created Ubuntu VM
ssh -i ~/.ssh/my-key.pem ubuntu@203.0.113.10
# Default usernames vary by image
# Ubuntu -> ubuntu Debian -> admin Amazon Linux -> ec2-user Rocky -> rockyCloud servers cost money and are reachable from the internet, so as soon as you have one, apply updates (sudo apt update && sudo apt upgrade) and keep the firewall lesson later in this course in mind. Destroy the instance when you finish practising.
Whichever route you took, run these to identify the system. You will use them constantly when debugging "works on my machine" problems.
cat /etc/os-release # distro name and version
uname -r # kernel version
whoami # current user
echo $SHELL # your login shell, usually /bin/bash
hostname # machine nameExpected output on Ubuntu 24.04:
PRETTY_NAME="Ubuntu 24.04.2 LTS"
6.8.0-45-generic
ubuntu
/bin/bashmacOS ships a Unix shell (zsh by default) and most commands in this course work unchanged. The differences you will notice: no apt (use Homebrew instead), BSD versions of tools like sed and ls with slightly different flags, and no systemd. For a fully faithful Linux environment, run Ubuntu in UTM or use a cloud VM.
root. Create a normal user and reach for sudo only when needed — that is how production systems are administered.Which part of a Linux system is actually "Linux"?
apt, Red Hat/Fedora use dnf, Arch uses pacman./mnt/c, when using WSL.cat /etc/os-release, uname -r and whoami tell you exactly what system you are on.Next lesson: Terminal Basics: Command Anatomy, Help Pages, History and Shortcuts — learn how commands, options and arguments fit together and how to find help without leaving the terminal.