Introduction
Before we begin talking about how to check your Debian Linux Version, let's briefly understand – What is Debian?
Debian is a stable, versatile, and free OS with abundant software options. It is built and maintained by a global community of volunteers, making it a popular choice for servers, desktops, and embedded systems.
Debian is always actively maintained in three versions:
- Stable - Debian's most recent publicly released distribution. Debian's current stable distribution is version 9 at the time of writing this article (stretch). This is the version that should be used in production settings.
- Testing - This preview distribution will be the basis for the future stable release. It contains packages that aren't quite ready for stable release yet, but will be soon. This release will be updated on a regular basis until it is certified stable and frozen.
- Unstable, always nicknamed sid - This is the Debian distribution where active development takes place.
In this tutorial, you will check your Debian Linux Version. We will also address a few FAQs on how to check your Debian Linux Version.
Advantages of Debian
- Stability: Debian is known for its rock-solid stability, making it reliable for mission-critical systems.
- Vast Software Library: It offers a vast collection of software packages, ensuring a wide range of applications for different needs.
- Security Focus: Debian prioritizes security, actively providing timely updates and maintaining a robust security infrastructure.
- Flexibility: With support for various hardware architectures, Debian can be installed on a wide range of devices and customized to suit individual preferences.
- Community-driven: Being an open-source project, Debian benefits from a vibrant and dedicated community, resulting in continuous improvement and support.
Checking Debian Version from the Command Line
The lsb_release
utility displays LSB (Linux Standard Base) information about the Linux distribution.
The lsb_release
function, which shows LSB (Linux Standard Base) information about the Linux distribution, is the preferred technique for checking your Debian version. This strategy will work regardless of your desktop environment or Debian version.
lsb_release -a
Output
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.5 (stretch)
Release: 9.5
Codename: stretch
In the Description line, your Debian version will be displayed. I'm running Debian GNU/Linux 9.5, as you can see from the output (stretch).
Instead of printing all of the above information, use the -d
flag to display the description line, which displays your Debian version.
lsb_release -d
You will get an output like below:
Output
Description: Debian GNU/Linux 9.5 (stretch)
You can also use the following scripts to see what Debian version you're running.
Checking Debian Version using the /etc/issue
file
The contents of the /etc/issue
file, which contains a system identification text, can be viewed using the cat command:
cat /etc/issue
You will get an output like below:
Output
Debian GNU/Linux 9 \n \l
Checking Debian Version using the /etc/os-release
file
/etc/os-release
is a file that includes operating system identification information and is only seen in systemd-based Debian distributions.
Only Debian 9 or newer will work with this method:
cat /etc/os-release
You will get an output like below:
Output
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
Checking Debian Version using the hostnamectl
command
hostnamectl
is a command that may be used to set the hostname as well as check the Debian version.
Only Debian 9 and newer versions of Debian will operate with this command:
hostnamectl
Output
Static hostname: debian9.localdomain
Icon name: computer-vm
Chassis: vm
Machine ID: a92099e30f704d559adb18ebc12ddac4
Boot ID: 4224ba0d5fc7489e95d0bbc7ffdaf709
Virtualization: qemu
Operating System: Debian GNU/Linux 9 (stretch)
Kernel: Linux 4.9.0-8-amd64
Architecture: x86-64
FAQs to Check your Debian Linux Version
Is it necessary to know my Debian version?
Yes, knowing your Debian version helps in understanding compatibility, accessing appropriate updates, and troubleshooting issues effectively.
Can I check Debian version from the graphical desktop?
Yes, many desktop environments have a system info or settings option that displays the Debian version. Look for "About" or "System Information" in the menu.
Are there different Debian versions for different hardware?
No, Debian offers a single version compatible with multiple hardware architectures, ensuring broad device support.
Does Debian provide long-term support (LTS) versions?
Yes, Debian offers LTS versions for selected releases, providing extended support and updates beyond the standard lifecycle.
What if my Debian version is no longer supported?
It is strongly advised to upgrade to a supported release. Unsupported versions may lack security updates and compatibility fixes.
Are there different versions of Debian for different hardware architectures?
Yes, Debian supports multiple hardware architectures, including x86, ARM, PowerPC, and more. There are specific Debian versions optimized for each architecture.
Can I use Debian-based distributions like Ubuntu to check my Debian version?
Yes, the methods mentioned earlier should work for Debian-based distributions like Ubuntu since they inherit many of the same core functionalities from Debian.
Conclusion
We've taught you how to find the Debian version installed on your machine in this tutorial. Visit the Debian Releases website for more information about Debian releases.
If you have any queries, please leave a comment below and we’ll be happy to respond to them.