6

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/

4
  • 2
    You want an old version of Ubuntu so that you can use an old version of Galera? A current version of galera is available for bionic. May 18, 2019 at 17:19
  • @MichaelHampton. Thanks. Are you able to add a link to the galera bionic repository? May 18, 2019 at 22:04
  • 1
    You have to use mysql-wsrep 5.7, 5.6 is too old. May 18, 2019 at 22:05
  • Ok, thanks. I was following the tutorial on Galera website and I guess their instruction is not up to date... Thanks a lot for letting me know. May 18, 2019 at 22:09

6 Answers 6

7

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
3
5

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.

0
4

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

$ lsb_release -rc
Release:    16.04
Codename:   xenial
1

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.
1
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
0

While the OP already chose an answer to be accepted, cat’ing out the file “os-release” would show you which version of Linux you have, which also works on non-Debian derivatives (and if I am not mistaken, even on the BSDs as well):

cat /etc/os-release

This file holds a host of information about the OS release and can be grep’ed, cut, tr’ed for the information you need.

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