3

I see lsb_release is mentioned below.

https://www.ionos.com/digitalguide/server/know-how/how-to-check-debian-version/

Unfortunately, it may not work on all Debian based systems; for example, on a stock Ubuntu 20.04.2, it returns the following:

$ lsb_release
No LSB modules are available.

Is there any other way for me to find out which version of Debian my current Ubuntu installation is based on?

Levente
  • 3,961
user1424739
  • 991
  • 4
  • 12
  • 20

2 Answers2

5

I suppose you could search for /etc/debian_version, even display it to get your answer.

    cat /etc/debian_version
mondotofu
  • 777
0

On Debian and Ubuntu (and maybe derivative) systems, /etc/debian_version exists. Looking in /etc/apt/sources.list should show you where the packages were installed from.

It is possible that someone installed the system and then later completely changed /etc/apt/sources.list (which would most likely break the system at next upgrade, but…). In this case you could look at where specific installed packages were obtained from with:

$ apt policy <packagename>

The proper way however is for package lsb-release to be installed so that the command you used gives proper output.

grifferz
  • 1,006