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?

5
  • 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 6, 2021 at 16:43
  • It is better to ask at Unix & Linux. It seems to be off-topic here.
    – Pilot6
    Feb 6, 2021 at 16:46
  • I also get No LSB modules are available. on stock Ubuntu 20.04.2.
    – Levente
    Feb 6, 2021 at 17:42
  • 1
    I have offered a bold edit to this question to keep it on-topic for this website.
    – Levente
    Feb 6, 2021 at 17:49
  • Does this answer your question? What Debian version are the different Ubuntu versions based on?
    – muru
    Feb 10, 2021 at 9:59

2 Answers 2

5

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

    cat /etc/debian_version
1
  • Odd how easy this is to do but difficult find. TLDR - 23.04 is bookworm/sid Oct 6, 2023 at 17:21
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.

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