how to check debian version

How to Check Debian Version?

Knowing your Debian version is crucial for various reasons. It helps you find compatible software, check for updates specific to your release, and troubleshoot any issues that might arise. Thankfully, checking your Debian version is a straightforward process, and there are several ways to do it.

Here’s a breakdown of three simple methods:

1. Using the hostnamectl command:

This method utilizes the hostnamectl command, which is available on systems using systemd. Open a terminal window and type the following command:

hostnamectl

Output:

Static hostname: debian
Icon name: computer-laptop
Operating System: Debian GNU/Linux 11 (bullseye)
Kernel version: 5.10.109-2 (arm64)

The output display various information about your system, including the operating system name and version. Look for the line that mentions “Operating System” or “Machine Id”. This contain your Debian version, either as the full version number or the codename.

In this example, the Debian version is displayed in both formats:

  • Debian GNU/Linux 11 (version number)
  • bullseye (codename)

2. Checking the /etc/os-release file:

This file stores information about your operating system, including the version. Open a terminal window and type the following command:

cat /etc/os-release

Output:

NAME="Debian GNU/Linux"
VERSION="12 (bookworm)"
ID=debian
ID_LIKE=debian
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
VERSION_ID="12"
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support/"
BUG_REPORT_URL="https://bugs.debian.org/"
PRIVACY_POLICY_URL="https://www.debian.org/privacy/Policy"
VERSION_CODENAME=bookworm
UBUNTU_CODENAME=jammy

This display the contents of the file, including a line with the key “PRETTY_NAME” followed by the Debian version information. In this example debian vrsion is Debian GNU/Linux 12 (bookworm).

3. Using the lsb_release command (if available):

The lsb_release command provides information about your Linux distribution. While not always pre-installed on Debian, it might be available on your system. If present, you can use the following command to get the version details:

lsb_release -a

Output:

Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm
LSB Version:    core-11.1-noarch:amd64:debian
LSB Features:   COMMON

This output display various details about your distribution, including the codename and version number in “Description” line.

Bonus Tip: Graphical User Interface (GUI)

If you prefer a graphical approach, some desktop environments might display the version information in the system settings or about section. However, using the terminal methods mentioned above is generally more reliable and consistent across different environments.

By following these methods, you can easily determine your Debian version and use this information to manage your system effectively.

Leave a Reply

Your email address will not be published. Required fields are marked.