I was told we recently created a new Amazon Linux instance with the latest and greatest (Version 2017.3–01) . I'm trying to find out if it is based on CentOS 7 (because that is the only version that supports installation of Google Chrome). I have run

[davea@mymachine ~]$ uname -a
Linux mymachine 4.9.32-15.41.amzn1.x86_64 #1 SMP Thu Jun 22 06:20:54 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

but I still can't tell what version of CentOS my Amazon Linux distro is based on.

Edit: per suggestion given, here is the output of the cat command

[davea@mymachine ~]$ sudo cat /etc/*release*
[sudo] password for davea:
NAME="Amazon Linux AMI"
ID_LIKE="rhel fedora"
PRETTY_NAME="Amazon Linux AMI 2017.03"
Amazon Linux AMI release 2017.03

3 Answers 3


Found this on server fault. https://serverfault.com/questions/798427/what-linux-distribution-is-the-amazon-linux-ami-based-on

To sum up: Quote from AWS folks :

The Amazon Linux AMI is not based on any one upstream Linux project. That said, one of the goals of the most current Amazon Linux AMI (2013.09) is to be as compatible as possible with RHEL 6. If there are places in which you find that we are not, please let us know so that we can investigate further."

  • Where do I find that information (e.g. Amazon Linux AMI 2013.09) from my terminal?
    – Dave
    Aug 18, 2017 at 13:48
  • 1
    @Dave it's from the os-release file. In my case, I can find it at cat /etc/os-release. This should work for you, since I didn't adjust anything. But I am using Amazon Linux Version 2. May 2, 2018 at 4:01
  • last week I was searching the same. Answer is pretty much waht Chris told - amazon linux is not directly based on anything else. There are no official centos AMI's so option is to go with RHEL7 AMI. At lease you'll know it from the beginning. Sure, it's compatible with Centos repos ;) Jun 3, 2018 at 5:38

you can get the centos/rhel version details from the file "/proc/version"

to get the version detail alone then you can grep like this

echo "Red Hat:`cat /proc/version | awk -F "Red Hat" '{print $2}' | awk -F ")" '{print $1}'`"

else using rpm

rpm -E %{rhel}

You can find out from /proc/version.
It gives Red Hat 7.3.1-9 in the following example:

# eg:
$ grep "Red Hat" /proc/version
Linux version 4.14.186-146.268.amzn2.x86_64 (mockbuild@ip-10-0-1-118) (gcc version 7.3.1 20180712 (Red Hat 7.3.1-9) (GCC))

You must log in to answer this question.

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