You can use /etc/os-release file to get the info about Amazon Linux Version, the machine is running.

  1. In case of Amazon 1

    [ec2-user@ip-x-x-x- ~]$ cat /etc/os-release
    NAME="Amazon Linux AMI"
    VERSION="2018.03"
    ID="amzn"
    ID_LIKE="rhel fedora"
    VERSION_ID="2018.03"
    PRETTY_NAME="Amazon Linux AMI 2018.03"
    ANSI_COLOR="0;33"
    CPE_NAME="cpe:/o:amazon:linux:2018.03:ga"
    HOME_URL="http://aws.amazon.com/amazon-linux-ami/"
    
  2. In case of Amazon 2

    [ec2-user@x-x-x-x ~]$ cat /etc/system-release
    Amazon Linux release 2.0 (2017.12) LTS Release Candidate
    [ec2-user@fresh-amazon-host ~]$ cat /etc/os-release
    NAME="Amazon Linux"
    VERSION="2.0 (2017.12)"
    ID="amzn"
    ID_LIKE="centos rhel fedora"
    VERSION_ID="2.0"
    PRETTY_NAME="Amazon Linux 2.0 (2017.12) LTS Release Candidate"
    ANSI_COLOR="0;33"
    CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2.0"
    HOME_URL="https://amazonlinux.com/"
    

As you can clearly see the two different versions, mentioned as Amazon Linux and Amazon Linux 2.0

Answer from Hardeep Singh on Stack Overflow
🌐
Reddit
reddit.com › r/aws › what's the main difference between amazon linux 1 and amazon linux 2?
r/aws on Reddit: What's the main difference between Amazon Linux 1 and Amazon Linux 2?
January 14, 2023 - Package availability depends on ... a distribution stop getting updates because it's not worth the work. Amazon linux 1 is old and considered end-of-life....
🌐
Amazon Web Services
aws.amazon.com › compute › amazon linux 2 › faqs
Amazon Linux 2 FAQs
2 weeks ago - A Linux kernel tuned for performance on Amazon EC2. A set of core packages including systemd, GCC 7.3, Glibc 2.26, Binutils 2.29.1 that receive Long Term Support (LTS) from AWS.
🌐
End of Life Date
endoflife.date › amazon-linux
Amazon Linux | endoflife.date
2 weeks ago - AWS announced Amazon Linux 2023 2 as a successor to Amazon Linux 2, which uses Fedora as the upstream.
🌐
Reddit
reddit.com › r/aws › amazon linux ami 2018.03.0 or amazon linux 2 ami
r/aws on Reddit: Amazon Linux AMI 2018.03.0 or Amazon Linux 2 AMI
August 15, 2018 -

Reddit's decision to charge for API access has shown that the company is more interested in making money than in providing a good user experience. The changes will force many popular third-party apps to shut down, which will inconvenience millions of users. Reddit's actions have also alienated many of its moderators, who rely on third-party apps to manage their communities.

Top answer
1 of 5
19
I find myself referring to Michael Wittig's blog post on Migrating to Amazon Linux 2 quite often. He briefly talks about: long term support SysVinit (the old) vs. systemd (the new) journald and the changes to the log files starting and stopping services the lack of EPEL and Amazon's replacement some agents and services were renamed, potentially breaking scripts ruby, netcat (nc) and cnf-init don't work out of the box there are no NAT and ECS optimized Amazon Linux 2 images. In general, I feel... if you have a relatively short development cycle and you need to set up your website (or whatever) soon, stick with Amazon Linux 1 aka 2018.03.0 and successive patches. if you have the time to experiment, look for solutions and potentially write your own, start using Amazon Linux 2. As u/cr125rider implies elsewhere in this thread, the switch to systemd (and IMHO, journald) is huge and at the very least will require you to retrain your muscle memory and the way you think about approaching problems. I.e., type X instead of Y. We're using both in my shop and quite frankly, I don't see much of a difference (yet) but speaking from experience, I know it's really painful skipping multiple versions when upgrading the OS. If you ever have to apply security patches to an application and those patches are only available for the most recent OS, you're in for a long weekend either upgrading to each version in succession, or rebuilding the whole instance. To recap: immediate need? Use Amazon Linux 1. Just playing around? Use 2.
2 of 5
11
Amazon Linux 2 is based off centos 7.3.1 it has systemd. Amazon Linux is based on the centos 6 series
🌐
AWS
docs.aws.amazon.com › amazon linux › user guide › what is amazon linux 2?
What is Amazon Linux 2? - Amazon Linux 2
With the implementation of Amazon Linux 2023 (AL2023), AL2 is now the previous generation of Amazon Linux from AWS.
🌐
Medium
cmakkaya.medium.com › amazon-linux-2-vs-amazon-linux-2023-10-key-differences-we-need-to-know-to-avoid-errors-9d0aa4b2bd0d
Amazon Linux 2 vs Amazon Linux 2023 (10 key differences we need to know to avoid errors.) | by Cumhur M. Akkaya | Medium
September 1, 2024 - Amazon Linux 2 vs Amazon Linux 2023 (10 key differences we need to know to avoid errors.) Important announcement for AWS cloud users: If the commands you used in the User Data or …
Find elsewhere
🌐
Quora
quora.com › What-is-the-difference-between-Amazon-Linux-and-Amazon-Linux-2
What is the difference between Amazon Linux and Amazon Linux 2? - Quora
Answer: Here are differences : Amazon Linux 2 :- Amazon Linux 2 provides modern application environment with the latest enhancements from the Linux community and offers long-term support. It comes with systemd, GCC 7.3, Glibc 2.26, Binutils 2.29.1 that receive Long Term Support (LTS) from AWS. ...
🌐
Amazon Web Services
aws.amazon.com › products › compute › amazon linux 2
Amazon Linux 2
2 weeks ago - Amazon Linux 2 is a Linux operating system from AWS. It provides a security-focused, stable, and high-performance execution environment to develop and run cloud applications. Amazon Linux 2 is provided at no additional charge.
🌐
AWS
docs.aws.amazon.com › amazon linux › user guide › comparing al2 and al2023
Comparing AL2 and AL2023 - Amazon Linux 2023
1 month ago - Learn about key differences between AL2 and AL2023. Find out about lifespan and support, consistency with deterministic upgrades through versioned repositories, and new core packages.
🌐
AWS
docs.aws.amazon.com › amazon linux › user guide › al2 on amazon ec2
AL2 on Amazon EC2 - Amazon Linux 2
For --count, the default is 1. If you have a default VPC and a default security group, they are used. aws ec2 run-instances --image-id resolve:ssm:/aws/service/ami-amazon-linux-latest/amzn2-ami-kernel-default-hvm-x86_64-gp2 --instance-type m5.xlarge --key-name MyKeyPair · For more information, see Using public parameters in the AWS Systems Manager User Guide. Amazon Linux 2 ...
🌐
Ntegral
ntegral.com › home › insights › amazon linux 2023 vs. amazon linux 2
Amazon Linux 2023 vs. 2: Which is Right for You? | Ntegral
October 28, 2024 - Compare Amazon Linux 2023 and Amazon Linux 2 to make an informed decision. This guide covers key differences, performance benchmarks, and security considerations.
🌐
AWS
docs.aws.amazon.com › aws elastic beanstalk › developer guide › managing elastic beanstalk environments › updating your elastic beanstalk environment's platform version › migrating your elastic beanstalk linux application to amazon linux 2023 or amazon linux 2 › migration from amazon linux ami (al1) to al2 or al2023
Migration from Amazon Linux AMI (AL1) to AL2 or AL2023 - AWS Elastic Beanstalk
It's worthwhile to note that there is a high degree of compatibility between the Elastic Beanstalk Amazon Linux 2 and Amazon Linux 2023 platforms. Although some areas do have differences: the Instance Metadata Service Version 1 (IMDSv1) option default, support for the pkg-repo instance tool, ...
🌐
AWS
docs.aws.amazon.com › aws elastic beanstalk › developer guide › elastic beanstalk platforms › elastic beanstalk linux platforms
Elastic Beanstalk Linux platforms - AWS Elastic Beanstalk
There is a high degree of compatibility between Elastic Beanstalk Amazon Linux 2 and Amazon Linux 2023 platforms. Although there are some differences to note: Instance Metadata Service Version 1 (IMDSv1) – The DisableIMDSv1 option setting defaults to true on AL2023 platforms.
🌐
AWS
docs.aws.amazon.com › amazon linux › user guide › comparing al1 and al2023
Comparing AL1 and AL2023 - Amazon Linux 2023
Support for each releasesystemd ... 2.6 and 2.7 has been replaced with Python 3OpenJDK 8 as oldest JDK · The following topics describe key differences between AL1 and AL2023 that aren't already covered by the comparison with AL2. AL1 reached its end-of-life (EOL) on December 31, 2023 and will not receive any security updates or bug fixes starting January 1, 2024. For more information about AL1 EOL and maintenance support, see the blog post Update on Amazon Linux AMI ...