How to Check Amazon Linux Version (EC2 Instance)

How to Check Amazon Linux Version (EC2 Instance)

To check the Amazon Linux version on an EC2 instance, you can use the cat command to display the contents of the /etc/system-release file. This file contains information about the Amazon Linux version installed on the EC2 instance.

To check the Amazon Linux version, log in to the EC2 instance and run the following command:

refer ‮ot‬:lautturi.com
cat /etc/system-release

This will output the Amazon Linux version, along with the release number and other information.

For example, the output might look something like this:

Amazon Linux AMI release 2018.03

Alternatively, you can use the lsb_release command to display the Linux distribution and version information. This command is part of the Linux Standard Base (LSB) package, which is installed by default on most Linux distributions, including Amazon Linux.

To use the lsb_release command, run the following command:

lsb_release -a

This will display a list of distribution-specific information, including the distribution name, version, and release number.

For example, the output might look something like this:

Distributor ID: AmazonAMI
Description:    Amazon Linux AMI 2018.03
Release:        2018.03
Codename:       amzn-ami-hvm-2018.03.0.202212.2

It's worth noting that the Amazon Linux AMI is updated regularly, so the version and release number may change over time.

Created Time:2017-10-28 21:38:57  Author:lautturi