User Tools

Site Tools


linux:debian:check-debian-version

This is an old revision of the document!


Check Debian 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 -a
Hostname and OS infohostnamectl
Kernel versionuname -r

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 -a
----------------
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 12 (bookworm)
Release:	12
Codename:	bookworm

/etc/debian_version

The /etc/debian_version file contains the Debian version number as a simple string.This file is always present on Debian systems and does not require any additional packages. The output shows the installed Debian point release.

# cat /etc/debian_version
-------------------------
12.15

/etc/os-release

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

# cat /etc/os-release
---------------------
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
linux/debian/check-debian-version.1788366356.txt.gz · Last modified: by oscar