How to Check Your Debian Linux Version

By 

Updated on

4 min read

Check Debian Linux Version

Knowing which version of Debian is running on your system is important for installing the right packages, applying security updates, and following version-specific documentation.

Debian maintains three active release channels at all times:

  • Stable: The latest officially released version. The current stable release is Debian 13 (trixie). This is the recommended version for production environments.
  • Testing: The preview distribution that will become the next stable release. Packages that are not yet ready for stable are staged here until the release is frozen.
  • Unstable (sid): The rolling development branch where active Debian development takes place. It is always codenamed “sid” and never released as a final version.

This guide explains several ways to check your Debian version from the command line.

Quick Reference

MethodCommand
Recommendedcat /etc/os-release
Version number onlycat /etc/debian_version
Distribution summarylsb_release -d
Hostname and OS infohostnamectl
Kernel versionuname -r

Using lsb_release

The lsb_release command displays Linux Standard Base (LSB) information about the distribution. It is a clean way to print release details when the package is installed.

To display full release information:

Terminal
lsb_release -a
output
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 13 (trixie)
Release:	13
Codename:	trixie

The version is shown in the Description line. To display only the description:

Terminal
lsb_release -d
output
Description:	Debian GNU/Linux 13 (trixie)
Info
If lsb_release is not installed, you can install it with sudo apt install lsb-release.

Using /etc/debian_version

The /etc/debian_version file contains the Debian version number as a simple string:

Terminal
cat /etc/debian_version
output
13.5

This file is always present on Debian systems and does not require any additional packages. The output shows the installed Debian point release.

Using /etc/os-release

The /etc/os-release file contains operating system identification data in a key-value format:

Terminal
cat /etc/os-release
output
PRETTY_NAME="Debian GNU/Linux 13 (trixie)"
NAME="Debian GNU/Linux"
VERSION_ID="13"
VERSION="13 (trixie)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

To extract only the version string, use grep :

Terminal
grep PRETTY_NAME /etc/os-release
output
PRETTY_NAME="Debian GNU/Linux 13 (trixie)"

Using hostnamectl

The hostnamectl command displays the hostname and other system information, including the operating system version:

Terminal
hostnamectl
output
 Static hostname: debian13
       Icon name: computer-vm
         Chassis: vm
      Machine ID: a92099e30f704d559adb18ebc12ddac4
         Boot ID: 4224ba0d5fc7489e95d0bbc7ffdaf709
  Virtualization: qemu
Operating System: Debian GNU/Linux 13 (trixie)
          Kernel: Linux 6.12.0-1-amd64
    Architecture: x86-64

The Debian version is shown on the “Operating System” line.

Using uname

The uname command does not show the Debian version directly, but it displays the kernel version, which can help identify the release:

Terminal
uname -r
output
6.12.0-1-amd64

To see all system information:

Terminal
uname -a

Debian Version History

The following table lists Debian releases and their codenames:

VersionCodenameRelease DateStatus
Debian 13trixie2025Current stable
Debian 12bookworm2023Oldstable
Debian 11bullseye2021LTS
Debian 10buster2019End of life
Debian 9stretch2017End of life
Debian 8jessie2015End of life

Troubleshooting

lsb_release: command not found
The lsb-release package is not installed. Install it with sudo apt install lsb-release, or use /etc/os-release or /etc/debian_version instead.

The version shows “testing” or “sid” instead of a number
Your system is running Debian Testing or Unstable, which do not have fixed version numbers. Check /etc/debian_version; it will show a codename like forky/sid instead of a number.

Different commands show different versions
This can happen after a partial upgrade. Run sudo apt update && sudo apt full-upgrade to complete the upgrade, then check again.

FAQ

How do I check if my Debian is 32-bit or 64-bit?
Run dpkg --print-architecture. It returns amd64 for 64-bit or i386 for 32-bit.

What is the difference between Debian stable, testing, and unstable?
Stable is the production-ready release with security updates. Testing is the next stable release in preparation. Unstable (sid) is the rolling development branch that never becomes a final release on its own.

How do I check which Debian kernel I am running?
Run uname -r to display the kernel version. The kernel version does not always match the Debian release number.

How do I upgrade to a newer Debian version?
Follow the Debian release notes for the target version before upgrading. They cover backups, package checks, repository changes, and the correct upgrade sequence.

Conclusion

When in doubt, run cat /etc/os-release. It works on every Debian system without extra packages and shows both the version number and the codename. If you also manage Ubuntu servers, the same file structure applies there.

Tags

Linuxize Weekly Newsletter

A quick weekly roundup of new tutorials, news, and tips.

About the authors

Dejan Panovski

Dejan Panovski

Dejan Panovski is the founder of Linuxize, an RHCSA-certified Linux system administrator and DevOps engineer based in Skopje, Macedonia. Author of 800+ Linux tutorials with 20+ years of experience turning complex Linux tasks into clear, reliable guides.

View author page