8

My os was installed from debian 8.5.0 amd64.
Execute commands after installation.

cat /etc/issue
Debian GNU/Linux 8 \n \l

No 8.5 here.

cat /proc/version
Linux version 3.16.0-4-amd64 ([email protected]) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.43-2+deb8u2 (2017-06-26)

No 8.5 here too.

Does deb8u2 means debian 8.5?

1
  • 1
    It's not clear what you are asking - the question is not explicit - but on the assumption that you want a way of obtaining the full version number, /etc/debian_version contains the full version number, and has done so for a long time. The command lsb_release -a also returns the full version number. And I'd recommend making your question more clear/explicit. Commented Jul 29, 2017 at 8:45

2 Answers 2

15

Debian does not include the minor version number in /etc/os-release, despite the clear indication in the manual that minor versions are allowed, and despite the inclusion of minor version numbers there by other Linux distributions.

The only explanation that anyone has ever come up with for this is the rather weak one — admittedly proferred by a person known only by a pseudonym on a discussion forum and hardly in any way official — that the Release Announcement for 8.5 said "this update does not constitute a new version of Debian 8". Yet that self-same announcement used "8.5" as the string in its headline.

You can obtain the minor number in the Debian-specific way that is still the only mechanism mentioned in its FAQ document, which makes no mention of /etc/os-release at all: Use lsb_release or read the Debian-specific /etc/debian_version file, which does include the minor version number, again demonstrating that the minor number is considered part of the version.

Debian is not the only operating system which does not include the minor version number in the version string in /etc/os-release. Neither does CentOS. (See CentOS bug #9448 and bug 8359.) Arch does not include a version string at all.

As for deb8u2, that is not a complete version string either. The actual version string, as you can see in that output, is 3.16.43-2+deb8u2. This string follows the convention of suffixing a local version string to the origin version string. The origin version here is 3.16.43, and the suffix is 2+deb8u2, known as the Debian version of the package. You'll find this debNuM scheme used a lot in Debian package versions. The suffix does indicate Debian 8, but the update number is the update number for the Debian package version, and is not the minor version number of the Debian operating system. This is the Linux kernel package in Debian with Linux version 3.16.43 and Debian version 2+deb8u2. See the version history of that package.

In the larger picture, what is in /proc/version is the version string of the (running) kernel, in particular here the version string of the Debian kernel package containing the kernel, not of the operating system.

1
  • The phrasing in the 8.5 announcement is indeed sub-optimal. It helps to read the sentence following the quote though. Perhaps “this update does not constitute a new version of Debian” would have been more accurate; the idea being to highlight that 8.5 isn’t a massive change compared to 8, unlike the difference between 7 and 8, or 8 and 9. Commented Jul 29, 2017 at 15:28
5

For Debian 9, you can use lsb_release -a or cat /etc/debian_version:

## Example Debian 9.13 ##

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.13 (stretch)
Release:        9.13
Codename:       stretch

$ cat /etc/debian_version
9.13

At least since Debian 11(.2?), only cat /etc/debian_version will show the "minor" version:

## Example Debian 11.2 ##

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye

$ cat /etc/debian_version
11.2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .