#

Packages

Subscribe
Packages October 29, 2026·6 min read

How to Check the Ubuntu or Debian Version

Run cat /etc/os-release on either Ubuntu or Debian to see the installed distribution and release. On Debian, /etc/debian_version adds the point release or a development-branch label. If the reported values disagree, find out what each one describes before following release-specific instructions or changing repositories.

Check the Ubuntu or Debian version with /etc/os-release

linux version terminal

Open a terminal on the machine, or connect to the server over SSH, and run:

cat /etc/os-release

An Ubuntu 26.04 machine prints lines like these:

ID=ubuntu
VERSION_ID="26.04"

The output is a list of KEY=value lines. It works the same on a desktop and on a headless VPS, and you don't need sudo or extra packages.

Read ID and VERSION_ID first. PRETTY_NAME gives a readable description.

ubuntu release output

Per the os-release specification, the system reads /etc/os-release first and falls back to /usr/lib/os-release if it's missing. It never merges the two files.

What the version, codename, and distribution fields mean

linux release fields

These values come from Ubuntu 26.04 and Debian 13 systems.

FieldUbuntu exampleDebian exampleWhat it identifies
IDubuntudebianInstalled distribution
PRETTY_NAMEUbuntu 26.04 LTSDebian GNU/Linux 13 (trixie)Human-readable release
VERSION_ID26.0413Distribution release identifier
VERSION_CODENAMEresolutetrixieRelease codename
ID_LIKEdebianNot shownRelated distribution family, when reported
DEBIAN_VERSION_FULLNot shown13.7Debian-specific full version, when supplied

Ubuntu reports ID=ubuntu together with ID_LIKE=debian. You're running Ubuntu. The second line only names its relationship to Debian, so follow Ubuntu-specific package and server instructions.

ubuntu debian identifiers

Software documentation names a VERSION_ID, and some repository instructions use the VERSION_CODENAME. The os-release specification makes both fields optional, and DEBIAN_VERSION_FULL is a Debian-specific extension, so some systems won't show them.

When you ask for support, include ID, VERSION_ID and VERSION_CODENAME. Add PRETTY_NAME if you want a readable line.

Other ways to check your Ubuntu version

ubuntu version alternatives

If lsb_release is installed, it prints Ubuntu release details with labels:

lsb_release -a

On Ubuntu 26.04 the output reads:

Distributor ID: Ubuntu
Description: Ubuntu 26.04 LTS
Release: 26.04
Codename: resolute

Add a flag when you need a single field:

  • lsb_release -d: Description, such as the friendly Ubuntu release name.
  • Release number: Run lsb_release -r (-v is for LSB information).
  • lsb_release -c: Release codename with its label.
  • lsb_release -cs: Short codename without the label.
ubuntu desktop settings

On Ubuntu GNOME, open Settings → System → About and read the Operating System entry. Older Ubuntu versions and other desktop environments can put it elsewhere. hostnamectl shows the operating system along with the hostname, architecture and kernel.

Minimal images and containers can lack lsb_release or hostnamectl.

Check Debian's major version, point release, and codename

debian point release

Debian numbers a release twice: the major version (13) and the point release (13.7).

To read the Debian version string directly, run:

cat /etc/debian_version

On Debian 13.7 it prints:

13.7

Debian published 13.7 on September 12, 2026, with corrections to the existing major release. A Debian 13 machine can sit at an earlier point release even after a newer one is out.

debian version comparison

On Debian Testing or Unstable, the file can hold a development-branch label instead of a number. Compare it with VERSION_ID, the codename and any DEBIAN_VERSION_FULL. If the file shows a branch name, note it exactly as printed.

Which version-check command should you use?

linux command selection
NeedMethodEnvironmentUseful result
Installed distribution and releasecat /etc/os-releaseUbuntu or Debian terminalOS identity and release metadata
Friendly release summarylsb_release -aUtility installedDescription, number and codename
Debian point-release detailcat /etc/debian_versionDebianPoint-release or branch string
Graphical Ubuntu versionSettings → System → AboutUbuntu GNOME desktopDisplayed operating-system version
OS with other host detailshostnamectlSupported system environmentOS, hostname, kernel, architecture
Running kernel onlyuname -rLinux terminalKernel release
debian terminal methods

A commenter in r/debian asked about a missing helper utility: “Is there an EASIER way to tell what version of debian I am on?” There is. The names cause part of the confusion: lsb_release is the executable and lsb-release is the package. /etc/os-release gives you the answer without installing it.

What to do when a command is missing or different tools disagree

linux version troubleshooting

If you see bash: lsb_release: command not found, the shell can't find the utility. Run cat /etc/os-release instead.

When two programs show different versions, find out which program printed each value.

Fastfetch, for example, can show an unexpected release name after Debian suite changes.

linux display mismatch

An old release name after an upgrade doesn't tell you whether the upgrade worked. Note which program shows it and the exact label. If you're on a Debian development branch, check your APT sources next.

Why Debian Testing or Unstable can show Forky/Sid

debian testing identity

Debian development installs can show a release name that overlaps more than one suite. Stable is 13 (trixie), Testing is forky and Unstable is sid.

After moving a Debian 13 virtual machine to Testing, a poster in r/debian wrote, “All seems to have worked well, but I noticed that the system identifies itself as "Forky/Sid" (according to /etc/os-release).” The name comes from the installed release metadata. APT source entries show which suite is configured.

The base-files package supplies the release files. In development branches, its shared or transitioning metadata can produce an overlapping label.

debian apt suites

To check your suite, read /etc/apt/sources.list and any .list or .sources files under /etc/apt/sources.list.d/. In a traditional deb line, the suite comes right after the repository URI. In a deb822 .sources file, look at the Suites: field. The Debian APT sources.list(5) manual defines both layouts.

A source entry set to testing follows the moving Testing suite. One that names forky stays on that codename through Debian's future release transitions. The Debian Testing documentation explains the difference.

Linux kernel version versus Ubuntu or Debian release

linux kernel release

Run uname -r for the running kernel release. It's a separate value from the distribution version in /etc/os-release. An Ubuntu 26.04 system, for example, can show kernel 7.0.0-14-generic next to OS release 26.04. In a container, /etc/os-release describes the container's userspace, while the kernel belongs to the host.

Use the version you found to choose the right instructions

linux release compatibility

Installation guides name a supported system by distribution, release number or codename. A guide for Ubuntu 26.04 and resolute covers that release. Debian 13 and trixie is a different environment.

DistributionPublished eventRelease date
Ubuntu 26.10, Stonking StingrayInterim releaseOctober 15, 2026
Ubuntu 26.04.1 LTS, Resolute RaccoonLTS point updateAugust 27, 2026
Debian 13.7, TrixieStable point releaseSeptember 12, 2026

The dates come from the Ubuntu release list and Debian release information. An announcement records what was published. Your local files report what your machine has installed.

ubuntu debian releases

Ubuntu 26.04 LTS belongs to the LTS line, for which Ubuntu documents five years of standard maintenance. Interim releases such as Ubuntu 26.10 have nine months of maintenance.

Match your ID, release number and codename to the software's supported environments.

NoScript Team