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 17:06] – 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.
 ^X86^Raspberry^ ^X86^Raspberry^
Line 41: Line 60:
 12.8</code>| 12.8</code>|
  
-===== /etc/os-release =====+==== /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:
 ^X86^Raspberry^ ^X86^Raspberry^
Line 70: Line 89:
 BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
 </code>| </code>|
-===== hostnamectl =====+==== 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.
 ^X86^Raspberry^ ^X86^Raspberry^
Line 98: Line 117:
     Architecture: arm     Architecture: arm
 </code>| </code>|
-===== uname =====+==== 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>
linux/debian/check-debian-version.1788368769.txt.gz · Last modified: by oscar