Skip to main content
Back to module
Linux Administration · The Linux System

Distros and installing Linux

Reading1h 18mLesson 1 of 3 in this module

What you'll learn

  • Run Linux in a VM or WSL
  • Explain the difference between the Linux kernel and a distribution
  • Choose a safe practice system and take snapshots before risky changes
  • Check the distro, kernel, memory and disk with basic commands

Choose a Linux distribution and set up a safe practice system in a virtual machine, WSL or a free-tier cloud VM.

Why it matters

Most of the internet runs on Linux. Web servers, databases, cloud virtual machines, containers, network appliances and the GPU machines that train machine learning models are almost all Linux systems. Cloud engineers, database administrators, security engineers and ML engineers spend a large part of their day logged in to Linux machines that have no desktop at all, only a terminal.

You already know the basics of the shell from Git & the Command Line. This course moves from "using a terminal" to "running a system": users and permissions, services, packages, logs, remote access and automation. To practise that safely you need a Linux system of your own that you are allowed to break.

What a distribution is

Linux itself is only the kernel: the core program that talks to the hardware, schedules processes and manages memory. A distribution (distro) bundles the kernel with everything else you need: a shell, core tools, a package manager, a service manager and default settings.

Distros come in families that share a package format and most commands:

FamilyExamplesPackage toolWhere you meet it
DebianDebian, Ubuntu, Linux Mintapt (.deb)Cloud VMs, laptops, most tutorials
Red HatRHEL, Fedora, Rocky Linux, AlmaLinuxdnf (.rpm)Enterprise servers, banks, government
OthersArch, Alpine, SUSEpacman, apk, zypperHobbyists, tiny containers, some enterprises

This course uses Ubuntu Server LTS for its examples. "LTS" means long-term support: about five years of security updates, which is why it is so common on servers. Almost everything you learn transfers to the other families; where a command differs (for example apt versus dnf), the lesson says so.

Three safe ways to get a practice system

Do all of the work in this course on a practice system, never on a work laptop, a school machine or any production server. Administration commands can delete data, lock you out or stop services that other people rely on. On your own throwaway system, a mistake only costs you a reinstall.

  1. A local virtual machine (recommended). A hypervisor such as VirtualBox (Windows, Linux, Intel Macs) or UTM (Apple silicon Macs) runs a whole computer inside a window. Download the Ubuntu Server ISO from ubuntu.com, create a VM with 2 CPUs, 2–4 GB RAM and a 20–25 GB disk, and install. The big advantage is snapshots: save the VM's state before a risky step and roll back if it goes wrong.
  2. WSL on Windows. The Windows Subsystem for Linux runs a real Ubuntu userland beside Windows. In an administrator PowerShell run wsl --install, restart, and create a Linux username and password. WSL is quick to set up. Recent versions support systemd, but a few service lessons behave differently from a full VM, so a VM is still the better choice if your computer can run one.
  3. A free-tier cloud VM. AWS, Google Cloud, Azure and Oracle Cloud offer small free-tier instances. This is the closest to real work, but it is a machine on the public internet and it can cost money if you pick the wrong size or forget to delete it. If you go this way, set a budget alert first, choose a size labelled "free tier eligible", and delete the instance (and its disk and public IP) when you finish.

Your first look around

After installing, log in and confirm what you are running:

cat /etc/os-release     # distro name and version
uname -r                # kernel version
hostnamectl             # hostname, OS, kernel, architecture
whoami                  # your username
free -h                 # memory in human-readable units
df -h                   # disk usage per filesystem

On Ubuntu, /etc/os-release shows something like PRETTY_NAME="Ubuntu 24.04.1 LTS". The kernel version from uname -r is separate from the distro version, because the kernel is a separate project.

What sudo is

Your user is a normal account. Administrative commands need root privileges, which you get one command at a time with sudo:

sudo apt update

sudo asks for your password, logs the command and runs it as root. Use it only when a command needs it, and only on your practice system. A good habit: read the full command before pressing Enter whenever it starts with sudo.

Common mistakes

  • Practising on a real machine. Even "harmless" changes to permissions or services can break a shared or work system. Use the VM.
  • Skipping snapshots. Take one right after a clean install, and before any lesson that changes SSH or services. Rolling back takes seconds.
  • Too little disk. A 10 GB disk fills quickly once you install packages. Give the VM at least 20 GB.
  • Forgetting the cloud VM. A stopped instance can still bill for its disk and public IP. Delete what you created.
  • Running everything as root. Logging in as root, or typing sudo -i and staying there, removes your safety net. Stay a normal user and use sudo per command.

Recap

  • Linux is the kernel; a distribution adds tools, a package manager and defaults.
  • Debian/Ubuntu (apt) and Red Hat family (dnf) cover most servers you will meet.
  • Practise on a local VM (best), WSL, or a free-tier cloud VM with a budget alert and a cleanup plan.
  • cat /etc/os-release, uname -r, free -h and df -h tell you what you are working on.
  • sudo runs one command as root; use it deliberately and only on your practice system.

Try it

Open the Do tab and set up the practice system you will use for the rest of the course.

Key terms (6)

kernel
The core program of Linux that talks to the hardware, schedules processes and manages memory.
distribution
A bundle of the Linux kernel with a shell, core tools, a package manager, a service manager and default settings, such as Ubuntu.
LTS
Long-term support: a release that gets security updates for several years, about five for Ubuntu LTS.
snapshots
Saved states of a virtual machine that let you roll back after a risky change.
WSL
The Windows Subsystem for Linux, which runs a real Linux userland such as Ubuntu beside Windows.
sudo
A command that runs a single command as root after asking for your own password, and logs it.

Recap

  • Linux is the kernel; a distribution adds tools, a package manager and defaults.
  • Debian/Ubuntu (apt) and the Red Hat family (dnf) cover most servers you will meet.
  • Practise on a local VM with snapshots, WSL, or a free-tier cloud VM with a budget alert and a cleanup plan.
  • cat /etc/os-release, uname -r, free -h and df -h show what you are working on.
  • Use sudo one command at a time, only on your practice system.
Also in this lesson: