Monday, April 29, 2024
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 2055  / 1 Year ago, mon, november 28, 2022, 6:57:38

I very frequently forget release name corresponding to my Ubuntu version. Is there an easy method (preferably command-line one) to go from say



11.10 ->  Distro Name


I know we have



lsb_release -a


Say someone has Skeltor, and I want to know if Zenogi is newer? How much time has passed between the two releases? How many releases they are apart ?


More From » release-management

 Answers
0

If you need to know only your OS version's name, use /etc/os-release file:



$ cat /etc/os-release                                                                                             
NAME="Ubuntu"
VERSION="16.04.1 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.1 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial





There exists /usr/share/distro-info/ubuntu.csv file, which you can parse via text processing utilities , such as AWK , grep, python, perl , or any other.



Actually, there is a command ubuntu-distro-info. It is not installed by default but you can obtain it via sudo apt-get install distro-info. The command itself is a shell script, and relies on the mentioned ubuntu.csv file. So if you don't want to think too hard and write scripts yourself , use that:



$ ubuntu-distro-info --all -f
Ubuntu 4.10 "Warty Warthog"
Ubuntu 5.04 "Hoary Hedgehog"
Ubuntu 5.10 "Breezy Badger"
Ubuntu 6.06 LTS "Dapper Drake"
Ubuntu 6.10 "Edgy Eft"
Ubuntu 7.04 "Feisty Fawn"
Ubuntu 7.10 "Gutsy Gibbon"
Ubuntu 8.04 LTS "Hardy Heron"
Ubuntu 8.10 "Intrepid Ibex"
Ubuntu 9.04 "Jaunty Jackalope"
Ubuntu 9.10 "Karmic Koala"
Ubuntu 10.04 LTS "Lucid Lynx"
Ubuntu 10.10 "Maverick Meerkat"
Ubuntu 11.04 "Natty Narwhal"
Ubuntu 11.10 "Oneiric Ocelot"
Ubuntu 12.04 LTS "Precise Pangolin"
Ubuntu 12.10 "Quantal Quetzal"
Ubuntu 13.04 "Raring Ringtail"
Ubuntu 13.10 "Saucy Salamander"
Ubuntu 14.04 LTS "Trusty Tahr"
Ubuntu 14.10 "Utopic Unicorn"
Ubuntu 15.04 "Vivid Vervet"
Ubuntu 15.10 "Wily Werewolf"
Ubuntu 16.04 LTS "Xenial Xerus"
Ubuntu 16.10 "Yakkety Yak"
Ubuntu 17.04 "Zesty Zapus"


It has many other command-line flags, like -y for checking how many days are left until next milestone, be it reaching release stage or End-of-Life status. For example, this: distro-info --all -f -y"eol"
will tell you negative values for those that have reached End of Life status and positive for those that haven't.


[#12481] Monday, November 28, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
uccase

Total Points: 473
Total Questions: 100
Total Answers: 110

Location: Anguilla
Member since Sun, Jan 29, 2023
1 Year ago
uccase questions
;