In AWS I need to add amazon linux instance to domain based on this article. However how do i know which Amazon Linux version the instance is using. I do not have access to AWS console. But i do have access to actual instance. What linux command i should be using.
I use uname -srm
command which returns Linux 4.4.0-1057-aws x86_64
Not sure if this is Amazon Linux 1 or Amazon Linux 2
Amazon Linux 2 (AL2) is the current Amazon Linux release that is Generally Available. AL2 supports the latest Amazon EC2 instance capabilities and is tuned for optimal performance on AWS.
To find an instance type using the consoleOpen the Amazon EC2 console at https://console.aws.amazon.com/ec2/ . From the navigation bar, select the Region in which to launch your instances. You can select any Region that's available to you, regardless of your location. In the navigation pane, choose Instance Types.
Operating Systems and Software Amazon Machine Images (AMIs) are preconfigured with an ever-growing list of operating systems, including Microsoft Windows and Linux distributions such as Amazon Linux 2, Ubuntu, Red Hat Enterprise Linux, CentOS, SUSE and Debian.
AWS integrationAmazon Linux 2 comes with many AWS tools (e.g. AWS CLI) and cloud-init. These tools are designed to simplify the scripting of common administration tasks from within an instance and enable remote configuration of instances.
You can use /etc/os-release
file to get the info about Amazon Linux Version, the machine is running.
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/"
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With