1

I want to create a deb string for my APT repository. Now it looks like deb http://sitename $(lsb_release -cs) main

Ubuntu derivatives display their own distribution name in lsb_release -cs (like sarah on Mint). Is there a universal way to get upstream Ubuntu version on Ubuntu itself and its derivatives?

3
  • cat /etc/version or cat /proc/version might get you what you want. Aug 26, 2016 at 23:05
  • 1
    I need an Ubuntu distribution codename, not kernel version string. Aug 26, 2016 at 23:08
  • 1
    Oh. Well in any case, I suggest you edit the title. Your question already has 2 close votes for being off topic. Aug 26, 2016 at 23:09

1 Answer 1

2

Ubuntu doesn't define any standard way to do this. A derivative may or may not include the name of its upstream release somewhere in a file.

The best way is probably to use some package versions to guess the upstream version. The package libc6 would be a good candidate for that, coreutils may be another one.

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