How can I get information about Ubuntu releases from the command line?
Items of interest
- Names vs. version numbers
- support state
ubuntu-distro-info from the distro-info package provides information about all Ubuntu releases.
You get an overview of all releases with
ubuntu-distro-info --all --fullname
For the "current" version
ubuntu-distro-info --stable --fullname
For the current LTS release
ubuntu-distro-info --lts --fullname
For currently supported releases
ubuntu-distro-info --supported --fullname
(This strangely includes the current development version although it is not supported yet)
To get the number of days till EndOfLive you add
ubuntu-distro-info --supported --fullname --days=eol
To get the number of days till the current development version will be released you can use just
ubuntu-distro-info --latest --fullname --days
Also a general way (works also on non-Ubuntu distros as well):
/etc/os-release to read the config data. On .deb-based distros, also
/etc/dpkg should correct as so. After a manual shift to/from Ubuntu, this should be manually corrected.