2

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,672
  • 1
  • 18
  • 40
user1424739
  • 941
  • 4
  • 12
  • 19
  • This is not the site for all Debian based system. Which official flavors and version of Ubuntu are you running? Try `lsb_release -a`. – user68186 Feb 06 '21 at 16:43
  • It is better to ask at [linux.se]. It seems to be off-topic here. – Pilot6 Feb 06 '21 at 16:46
  • I also get `No LSB modules are available.` on stock Ubuntu 20.04.2. – Levente Feb 06 '21 at 17:42
  • 1
    I have offered a bold edit to this question to keep it on-topic for this website. – Levente Feb 06 '21 at 17:49
  • Does this answer your question? [What Debian version are the different Ubuntu versions based on?](https://askubuntu.com/questions/445487/what-debian-version-are-the-different-ubuntu-versions-based-on) – muru Feb 10 '21 at 09:59

2 Answers2

3

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

    cat /etc/debian_version
mondotofu
  • 721
  • 4
  • 8
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
  • 996
  • 5
  • 12