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

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:debian:check-debian-version [2026/09/02 16:57] – [lsb_release] 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:
 ^X86^Raspberry^ ^X86^Raspberry^
Line 29: Line 48:
 Codename: bookworm Codename: bookworm
 </code>| </code>|
-===== /etc/debian_version =====+==== /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 50: 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> 
-===== hostnamectl =====+# 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. 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.
-<code>+^X86^Raspberry^ 
 +|<code>
 # hostnamectl # hostnamectl
 ------------- -------------
Line 67: Line 106:
   Hardware Model: Z77MX-D3H   Hardware Model: Z77MX-D3H
 Firmware Version: F17b Firmware Version: F17b
-</code> +</code>|<code> 
-===== uname =====+# 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. The uname command does not show the Debian version directly, but it displays the kernel version, which can help identify the release.
-<code>+|<code>
 # uname -r # uname -r
 ---------- ----------
Line 78: Line 127:
 ---------- ----------
 Linux pcwerkkamer 6.1.0-52-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.180-1 (2026-08-03) x86_64 GNU/Linux 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>|<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 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: 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:
linux/debian/check-debian-version.1788368278.txt.gz · Last modified: by oscar