How to Check Your 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
| Method | Command |
|---|---|
| Recommended | cat /etc/os-release |
| Version number only | cat /etc/debian_version |
| Distribution summary | lsb_release -d |
| Hostname and OS info | hostnamectl |
| Kernel version | uname -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:
lsb_release -aNo LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 13 (trixie)
Release: 13
Codename: trixieThe version is shown in the Description line. To display only the description:
lsb_release -dDescription: Debian GNU/Linux 13 (trixie)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:
cat /etc/debian_version13.5This 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:
cat /etc/os-releasePRETTY_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 :
grep PRETTY_NAME /etc/os-releasePRETTY_NAME="Debian GNU/Linux 13 (trixie)"Using hostnamectl
The hostnamectl command displays the hostname and other system information, including the operating system version:
hostnamectl 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-64The 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:
uname -r6.12.0-1-amd64To see all system information:
uname -aDebian Version History
The following table lists Debian releases and their codenames:
| Version | Codename | Release Date | Status |
|---|---|---|---|
| Debian 13 | trixie | 2025 | Current stable |
| Debian 12 | bookworm | 2023 | Oldstable |
| Debian 11 | bullseye | 2021 | LTS |
| Debian 10 | buster | 2019 | End of life |
| Debian 9 | stretch | 2017 | End of life |
| Debian 8 | jessie | 2015 | End 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 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