User Tools

Site Tools


linux:debian:check-debian-version

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
linux:debian:check-debian-version [2026/09/02 16:25] – created oscarlinux:debian:check-debian-version [2026/09/04 07:58] (current) – oscar
Line 1: Line 1:
-====== Check Debian Version ======+====== Check Architecture & Distribution ======
 ---- ----
 This guide explains several ways to check your Debian version from the command line. This guide explains several ways to check your Debian version from the command line.
-===== Quick Reference =====+===== 32 or 64 Architecture ===== 
 +To check if system is running a 32 (Raspberry) or 64 (X86) architecture, use one of the following commands: 
 +<code> 
 +# dpkg --print-architecture 
 +------------------------- 
 +armhf 
 +</code> 
 +<code> 
 +# getconf LONG_BIT 
 +------------------ 
 +32 
 +</code> 
 +<code> 
 +# file /lib/systemd/systemd 
 +------------------------- 
 +/lib/systemd/systemd: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, BuildID[sha1]=1dc619f043235803cc3339a671c7f0821b733d93, for GNU/Linux 3.2.0, stripped 
 +</code> 
 + 
 +===== Distribution & Version ===== 
 +Use one of the following commands to verify the distribution and version:
 ^Method^Command^ ^Method^Command^
 |Recommended|cat /etc/os-release| |Recommended|cat /etc/os-release|
Line 9: Line 28:
 |Hostname and OS info|hostnamectl| |Hostname and OS info|hostnamectl|
 |Kernel version|uname -r| |Kernel version|uname -r|
-===== lsb_release =====+==== 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: 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:
-<code>+^X86^Raspberry^ 
 +|<code>
 # lsb_release -a # lsb_release -a
 ---------------- ----------------
Line 19: Line 39:
 Release: 12 Release: 12
 Codename: bookworm Codename: bookworm
-</code> +</code>|<code> 
-===== /etc/debian_version =====+# lsb_release -a 
 +---------------- 
 +No LSB modules are available. 
 +Distributor ID: Raspbian 
 +Description: Raspbian GNU/Linux 12 (bookworm) 
 +Release: 12 
 +Codename: bookworm 
 +</code>| 
 +==== /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. 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.
-<code>+^X86^Raspberry^ 
 +|<code>
 # cat /etc/debian_version # cat /etc/debian_version
 ------------------------- -------------------------
 12.15 12.15
-</code> +</code>|<code> 
-===== /etc/os-release =====+# cat /etc/debian_version 
 +------------------------- 
 +12.8</code>| 
 + 
 +==== /etc/os-release ====
 The /etc/os-release file contains operating system identification data in a key-value format: The /etc/os-release file contains operating system identification data in a key-value format:
-<code>+^X86^Raspberry^ 
 +|<code>
 # cat /etc/os-release # cat /etc/os-release
 --------------------- ---------------------
Line 41: Line 75:
 SUPPORT_URL="https://www.debian.org/support" SUPPORT_URL="https://www.debian.org/support"
 BUG_REPORT_URL="https://bugs.debian.org/" BUG_REPORT_URL="https://bugs.debian.org/"
-</code>+</code>|<code> 
 +# cat /etc/os-release 
 +--------------------- 
 +PRETTY_NAME="Raspbian GNU/Linux 12 (bookworm)" 
 +NAME="Raspbian GNU/Linux" 
 +VERSION_ID="12" 
 +VERSION="12 (bookworm)" 
 +VERSION_CODENAME=bookworm 
 +ID=raspbian 
 +ID_LIKE=debian 
 +HOME_URL="http://www.raspbian.org/" 
 +SUPPORT_URL="http://www.raspbian.org/RaspbianForums" 
 +BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs" 
 +</code>| 
 +==== hostnamectl ==== 
 +The hostnamectl command displays the hostname and other system information, including the operating system version. The Debian version is shown on the “Operating System” line. 
 +^X86^Raspberry^ 
 +|<code> 
 +# hostnamectl 
 +------------- 
 + Static hostname: pcwerkkamer 
 +       Icon name: computer-desktop 
 +         Chassis: desktop 🖥️ 
 +      Machine ID: 006d83905710476d87e31bb1d873c52f 
 +         Boot ID: 863769c34bfc4c14ae25cab5a5acd495 
 +Operating System: Debian GNU/Linux 12 (bookworm)   
 +          Kernel: Linux 6.1.0-52-amd64 
 +    Architecture: x86-64 
 + Hardware Vendor: Gigabyte Technology Co., Ltd. 
 +  Hardware Model: Z77MX-D3H 
 +Firmware Version: F17b 
 +</code>|<code> 
 +# hostnamectl 
 +------------- 
 +Static hostname: domoticz 
 +       Icon name: computer 
 +      Machine ID: 12b558257a8f41a78fd44d8660ea1048 
 +         Boot ID: 12b91d670c26459b930cdcd197ddc3c4 
 +Operating System: Raspbian GNU/Linux 12 (bookworm) 
 +          Kernel: Linux 6.6.20+rpt-rpi-v7 
 +    Architecture: arm 
 +</code>| 
 +==== uname ==== 
 +The uname command does not show the Debian version directly, but it displays the kernel version, which can help identify the release. 
 +|<code> 
 +# uname -r 
 +---------- 
 +6.1.0-52-amd64 
 + 
 +# uname -a 
 +---------- 
 +Linux pcwerkkamer 6.1.0-52-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.180-1 (2026-08-03) x86_64 GNU/Linux 
 +</code>|<code> 
 +# uname -r 
 +---------- 
 +6.6.20+rpt-rpi-v7 
 + 
 +# uname -a 
 +---------- 
 +Linux domoticz 6.6.20+rpt-rpi-v7 #1 SMP Raspbian 1:6.6.20-1+rpt1 (2024-03-07) armv7l GNU/Linux 
 +</code>| 
 +===== Debian Releases and Codenames ===== 
 +Debian codenames come from characters in the Toy Story movies, and each release keeps its codename for life. The table below lists recent releases and how long each one receives security support: 
 +^Version ^Codename ^Released ^Status^ 
 +|Debian 14 |forky |Not yet released |Current testing| 
 +|Debian 13 |trixie |August 2025 |Current stable (13.6)| 
 +|Debian 12 |bookworm |June 2023 |Oldstable, LTS until June 2028| 
 +|Debian 11 |bullseye |August 2021 |LTS ends 31 August 2026| 
 +|Debian 10 |buster |July 2019 |LTS ended, ELTS until June 2029| 
 +|Debian 9 |stretch |June 2017 |LTS ended, ELTS until June 2027| 
 +|Debian 8 |jessie |April 2015 |End of life| 
 + 
 +Each release gets roughly three years of regular security support, after which the LTS team takes over for about two more years. 
linux/debian/check-debian-version.1788366356.txt.gz · Last modified: by oscar