How to know exact version of Amazon Linux 2?

0

I need to know exact version of Amazon Linux 2, do someone know how to do it? I see in release notes versions like 2.0.20220719.0, but I'm not sure where the version can be obtained from.

/ets/os-release contains only major version 2

질문됨 일 년 전1381회 조회
1개 답변
0

I am not aware of a method on how to obtain this information within the instance, however /etc/os-release will contain the major release version information amongst other things, also hostnamectl will output some information for you.

Having said that if you want to know the exact release version that your instance was based on (before you performed any updates/upgrades via packagemanager etc) you can take a look at the AMI ID as it will contain the releaseversion in its name:

Enter image description here

As you can see here the AMI name will contain the releaseversion which correlates with this here: https://docs.aws.amazon.com/AL2/latest/relnotes/relnotes-20221116.html

AWS
답변함 일 년 전
  • Unfortunately I don't have access to such information. I need to check OS version inside .NET application on a customer VM.

  • @Sergey, you could retrieve the ami-id by calling the instance metadata service and then use that to perform a query against the AWS API to extract the needed data.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠