Back to lessons

Linux Survival Basics

Compare Kernel and Distro Versions

You need to know whether a package issue is tied to the OS release, the running kernel, or the CPU architecture.

Command

printf 'kernel=%s arch=%s distro=%s\n' "$(uname -r)" "$(uname -m)" "$(lsb_release -ds)"

What changed

Nothing changes. The command combines kernel, architecture, and distro description in one line.

Danger

safe

When to use it

Use when opening support tickets, comparing fleet nodes, or checking whether the running kernel matches package expectations.

When not to use it

Do not treat the kernel version as the installed kernel package list.

Undo or recovery

No undo needed because the command is read-only.

Expected output

A single support-friendly inventory line with kernel, architecture, and distro.

demo script

Disposable terminal steps

  1. uname -a
  2. printf 'kernel=%s arch=%s distro=%s\n' "$(uname -r)" "$(uname -m)" "$(lsb_release -ds)"

simulated output

What it looks like

disposable vessel
::fixture-ready::
$ uname -a
Linux pkg-demo 6.8.0-60-generic #63-Ubuntu SMP PREEMPT_DYNAMIC x86_64 GNU/Linux
::exit-code::0
$ printf 'kernel=%s arch=%s distro=%s\n' "$(uname -r)" "$(uname -m)" "$(lsb_release -ds)"
kernel=6.8.0-60-generic arch=x86_64 distro=Ubuntu 24.04.2 LTS
::exit-code::0

YouTube Short

Kernel is not distro.

For package triage, capture the running kernel, CPU architecture, and distro release together.

LinkedIn hook

The distro version and kernel version answer different questions.

Question: When debugging Linux packages, do you capture kernel and distro separately?

experiments

A/B tests to run

Metric: completion_rate

A: Kernel is not distro.

B: Capture both before debugging.