쿠키 기본 설정 선택

당사는 사이트와 서비스를 제공하는 데 필요한 필수 쿠키 및 유사한 도구를 사용합니다. 고객이 사이트를 어떻게 사용하는지 파악하고 개선할 수 있도록 성능 쿠키를 사용해 익명의 통계를 수집합니다. 필수 쿠키는 비활성화할 수 없지만 '사용자 지정' 또는 ‘거부’를 클릭하여 성능 쿠키를 거부할 수 있습니다.

사용자가 동의하는 경우 AWS와 승인된 제3자도 쿠키를 사용하여 유용한 사이트 기능을 제공하고, 사용자의 기본 설정을 기억하고, 관련 광고를 비롯한 관련 콘텐츠를 표시합니다. 필수가 아닌 모든 쿠키를 수락하거나 거부하려면 ‘수락’ 또는 ‘거부’를 클릭하세요. 더 자세한 내용을 선택하려면 ‘사용자 정의’를 클릭하세요.

Identify AL2 instances

포커스 모드
Identify AL2 instances - Amazon Linux 2
이 페이지는 귀하의 언어로 번역되지 않았습니다. 번역 요청

The following information describes how to identify an AL2 instance from another Amazon Linux version or other Linux distribution.

Identify Amazon Linux images

Each image contains a unique /etc/image-id file that identifies it. This file contains the following information about the image:

  • image_name, image_version, image_arch – Values from the build recipe that Amazon used to construct the image.

  • image_stamp – A unique, random hex value generated during image creation.

  • image_date – The UTC time of image creation, in YYYYMMDDhhmmss format.

  • recipe_name, recipe_id – The name and ID of the build recipe Amazon used to construct the image.

Amazon Linux contains an /etc/system-release file that specifies the current release that is installed. This file is updated using yum and is part of the system-release RPM Package Manager (RPM).

Amazon Linux also contains a machine-readable version of /etc/system-release that follows the Common Platform Enumeration (CPE) specification; see /etc/system-release-cpe.

AL2

The following is an example of /etc/image-id for the current version of AL2.

[ec2-user ~]$ cat /etc/image-id image_name="amzn2-ami-hvm" image_version="2" image_arch="x86_64" image_file="amzn2-ami-hvm-2.0.20180810-x86_64.xfs.gpt" image_stamp="8008-2abd" image_date="20180811020321" recipe_name="amzn2 ami" recipe_id="c652686a-2415-9819-65fb-4dee-9792-289d-1e2846bd"

The following is an example of /etc/system-release for the current version of AL2.

[ec2-user ~]$ cat /etc/system-release AL2

The following is an example of /etc/os-release for AL2.

[ec2-user ~]$ cat /etc/os-release NAME="Amazon Linux" VERSION="2" ID="amzn" ID_LIKE="centos rhel fedora" VERSION_ID="2" PRETTY_NAME="Amazon Linux 2" ANSI_COLOR="0;33" CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2" HOME_URL="https://amazonlinux.com/"

Amazon Linux AMI

The following is an example of /etc/image-id for the current Amazon Linux AMI.

[ec2-user ~]$ cat /etc/image-id image_name="amzn-ami-hvm" image_version="2018.03" image_arch="x86_64" image_file="amzn-ami-hvm-2018.03.0.20180811-x86_64.ext4.gpt" image_stamp="cc81-f2f3" image_date="20180811012746" recipe_name="amzn ami" recipe_id="5b283820-dc60-a7ea-d436-39fa-439f-02ea-5c802dbd"

The following is an example of /etc/system-release for the current Amazon Linux AMI.

[ec2-user ~]$ cat /etc/system-release Amazon Linux AMI release 2018.03

이 페이지에서

프라이버시사이트 이용 약관쿠키 기본 설정
© 2025, Amazon Web Services, Inc. 또는 계열사. All rights reserved.