How to determine the distribution of Ubuntu [duplicate]

I want to launch an EC2 instance on AWS. I want to install Ubuntu Xenial distribution. How do I know which one of these is Xenial?

I see a lot of options like:

  • Ubuntu Server 18.04 LTS (HVM), SSD Volume Type - ami-0b76c3b150c6b1423
  • Ubuntu Server 14.04 LTS (HVM), SSD Volume Type - ami-001dae151248753a2
  • Deep Learning AMI (Ubuntu) Version 23.0 - ami-0726ab58f406b644f
  • Deep Learning Base AMI (Ubuntu) Version 18.0 - ami-00c2ec90e50ed2f33
  • Ubuntu Server 16.04 LTS (HVM) with SQL Server 2017 Standard - ami-f13ff693
  • Ubuntu Server 14.04 LTS (HVM), SSD Volume Type - ami-0d21bd76bdbb39f53

Update

The reason I want Xenial is that Galera cluster is already built for xenial:

http://releases.galeracluster.com/mysql-wsrep-5.6.39-25.22/ubuntu/dists/xenial/


Ubuntu 16.04 (the 5th item in the list in the question) is codenamed xenial. You can verify this by opening the terminal and running the following command:

lsb_release -c

If the operating system is 16.04 the results of the above command will be:

Codename:   xenial

Ubuntu 16.04 LTS is code named Xenial Xerus (https://wiki.ubuntu.com/XenialXerus)

The full list of releases can be seen at https://wiki.ubuntu.com/Releases, providing links to end of standard support (or LTS EOL), or ESM support if available.


Without parsing anything, use -r and -c flag to get releases and codename respectively.

$ lsb_release -rc
Release:    16.04
Codename:   xenial

You can also match the Ubuntu version codename (xenial) to its version number (16.04) without installing the OS itself or while being away from the computer in question:

  • Wikipedia was the most convenient method to use for me.
  • Ubuntu wiki is also an option as pointed out by /u/guiverc.

uname -m && uname -r && cat /etc/*release

typical output

x86_64
5.0.0-15-generic
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=19.04
DISTRIB_CODENAME=disco
DISTRIB_DESCRIPTION="Ubuntu 19.04"
NAME="Ubuntu"
VERSION="19.04 (Disco Dingo)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 19.04"
VERSION_ID="19.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=disco
UBUNTU_CODENAME=disco
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free  inact active   si   so    bi    bo   in   cs us sy id wa st
 1  1  24696 3070640 1620404 2600012    0    0    73   124  551  451 26  9 64  1  0
Desktop: ubuntu:GNOME
Session: ubuntu