Distributions
A distribution (distro) bundles the Linux kernel with software to make a complete, usable operating system.
Because Linux is just a kernel, different teams package it with their own choice of tools, package managers and defaults. Each package is called a distribution, or distro.
Common distributions
| Distro | Family | Package manager |
|---|---|---|
| Ubuntu / Debian | Debian | apt |
| Fedora / RHEL | Red Hat | dnf / yum |
| CentOS / Rocky | Red Hat | dnf |
| Arch Linux | Arch | pacman |
| Alpine | Independent | apk |
On servers and in Docker containers you will mostly meet Ubuntu, Debian and Alpine. The commands in this tutorial work on all of them.
Example
# The 'PRETTY_NAME' line tells you exactly which distro you have
grep PRETTY_NAME /etc/os-release
# Output: PRETTY_NAME="Ubuntu 24.04.1 LTS"When to use it
- A sysadmin selects RHEL for an enterprise database server because Red Hat provides 10-year security patches.
- A developer uses Alpine Linux as a Docker base image to keep container images under 10 MB.
- A security researcher boots Kali Linux to access pre-installed penetration-testing tools during an audit.
More examples
Identify current distribution
Extracts the human-readable distro name from the standard os-release file.
grep PRETTY_NAME /etc/os-release
# PRETTY_NAME="Ubuntu 24.04.1 LTS"Check distro family and version
Shows the full distro metadata including its upstream family used to pick the right package manager.
cat /etc/os-release
# NAME="Fedora Linux"
# VERSION_ID="40"
# ID=fedora
# ID_LIKE=rhelCompare distros in Docker
Illustrates how different distros appear as Docker base images, letting you choose size vs compatibility.
# Debian-based (large, many packages)
FROM ubuntu:24.04
# Alpine-based (tiny, musl libc)
FROM alpine:3.20
# Red-Hat-based
FROM fedora:40
Discussion