Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
Operating System  ›  Lesson

Linux Distributions — Ubuntu and Debian

Ubuntu / Debian 12 minA Linux distribution wraps the kernel with a package manager and defaults, and the Debian family, including Ubuntu, installs .deb packages with apt.

Linux Distributions — Ubuntu and Debian

You are given SSH access to web1 and asked to install a web server on it. Before typing a single install command you need to know one thing: which kind of Linux is this? The answer decides every package command you type for the rest of the day.

The rule

Same kernel, different families; the package manager tells you which.

Linux is strictly just the kernel: the core that talks to hardware, runs processes and manages memory. A distribution (distro) wraps that kernel with everything else: a package manager, an init system, default configuration, a release schedule and a support promise.

Distros group into families that share a package format and tools. The Debian family is the one you will meet most on cloud servers:

  • Debian: community-run, conservative, famously stable.
  • Ubuntu: built on Debian by Canonical, with a predictable schedule. Its LTS (long-term support) releases come every two years and get years of security updates, which is why servers run them.

Both use .deb packages and the apt tool:

sudo apt update            # refresh the list of available packages
sudo apt install nginx     # install a package and its dependencies
sudo apt upgrade           # install newer versions of what you already have
apt list --installed | grep nginx

apt update downloads nothing but the catalogue. Forgetting it is why an install sometimes fails with "unable to locate package" on a fresh server.

The shortcut

Read /etc/os-release first. Every modern distro has it, and two lines settle the family:

$ cat /etc/os-release
NAME="Ubuntu"
VERSION="24.04 LTS (Noble Numbat)"
ID=ubuntu
ID_LIKE=debian

ID is the distro, ID_LIKE is its family. ID_LIKE=debian means apt commands will work.

Installing nginx on an unknown serverStep 1 of 4
  1. Identify

    cat /etc/os-release on web1 shows ID=ubuntu and ID_LIKE=debian.

The trap is copying install commands from a tutorial written for another family. The syntax looks plausible and simply fails, or worse, you install a differently named package.

Drills

Answer fast — trust the rule.

quick drill

What does sudo apt update do?

quick drill

Which file quickly tells you the distribution and its family?

quick drill

Ubuntu is built on which distribution?

quick drill

Why do servers usually run an Ubuntu LTS release?

Remember

  • Same kernel, different families; the package manager tells you which.
  • Shortcut: read ID and ID_LIKE in /etc/os-release before installing anything.
  • Trap: running a tutorial's commands for the wrong family, or skipping apt update.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainWhich Linux is this?

You log in to a server you have never seen and must install nginx. Explain how you find out which distribution it runs and what commands you would use if it turns out to be Ubuntu.