Sign in
← Linux: basics
8 min · intro · Lesson 1 of 8

What is Linux

Why DevOps runs on Linux, and why 99% of servers run it too.

You SSH into a server in the cloud, run docker exec into a container, or kubectl exec into a Pod, and almost every time you end up inside Linux. In this lesson we'll work out what a kernel and a distribution are, and learn to tell what system you're on with two commands.

Why a DevOps engineer needs Linux

Almost all server software lives on Linux: databases, web servers, queues, CI agents, Kubernetes nodes. The containers you'll work with in this course are Linux containers too. They need a Linux kernel, which is why on macOS and Windows Docker Desktop runs them inside a small Linux virtual machine.

You can see this for yourself. On a Mac, uname -s prints Darwin, that's the macOS kernel. But Docker on that same Mac will tell you it's running on a Linux kernel:

docker info --format '{{.OperatingSystem}} {{.KernelVersion}}'
Docker Desktop 5.15.49-linuxkit

The number 5.15.49-linuxkit is the version of the Linux kernel inside the Docker Desktop virtual machine. Yours will be different.

Kernel and distribution

Ubuntu, Debian, Alpine, and Rocky Linux all use the same Linux kernel (in different versions). What makes them different is what they put around that kernel.

Distributions you'll run into most often as a DevOps engineer:

DistributionPackage managerWhere you'll see it
Ubuntu, Debianaptcloud virtual machines, base Docker images
Alpineapksmall Docker images
Rocky Linux, AlmaLinux, RHELdnf (yum on older versions)enterprise servers
Archpacmanrare on servers, more common on developers' own machines

How to find out where you are

You need two commands. The first, uname, asks the kernel:

uname -a
Linux web-01 6.8.0-31-generic #31-Ubuntu SMP ... x86_64 GNU/Linux

This is an example from a server running Ubuntu, with the middle of the line cut. Left to right: kernel name Linux, hostname web-01, kernel version 6.8.0-31-generic, kernel build, CPU architecture x86_64, OS name. You can get each field on its own:

CommandWhat it printsExample
uname -skernel nameLinux, Darwin on a Mac
uname -rkernel version6.8.0-31-generic
uname -marchitecturex86_64, aarch64 (ARM; a Mac on Apple Silicon itself prints arm64)
uname -nhostnameweb-01

uname doesn't know the distribution: the kernel doesn't care what programs sit around it. The distribution is reported by the /etc/os-release file:

cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04.5 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.5 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
...

The main fields: ID (a short distribution name, handy for scripts), VERSION_ID (the version), and PRETTY_NAME (a human-readable name). ID_LIKE points to its relatives: Ubuntu is built on Debian, so their packages and commands largely overlap.

Container and kernel

A container doesn't carry its own kernel. Inside a container there are only the distribution's files, and its processes run on the host's kernel. That's why on one machine, containers running Ubuntu and Alpine will show the same version from uname -r, while /etc/os-release will differ. You'll check this yourself in the second lab.

The basic commands are almost the same

In this course we rely on what works on any Linux: POSIX shell, basic utilities, shared system concepts. Differences between distributions show up most often in three places:

Common mistakes

What you'll need for the tasks

In the next lesson we'll look at the file system: what lives where, and why.

Done reading?

Mark the lesson as read to move your track progress forward.

Go through it with an AI agent

The agent explains anything unclear in plain words and walks you through 2 labs for this lesson. This track is free.

Connect an agent

Tell the agent: use MCP izi, give me lesson linux-basics-01-what-is-linux