How to find Amazon Linux 2023 version? - Stack Overflow
where are the release notes for Amazon Linux 2023.6.20241121?
Amazon Linux 2023 Officially Released
Amazon Linux 2025
Simplify upgrade processes
Ensure deterministic behavior and streamline integrating OS updates into frequent integration and deployment environments.
Improve consistency with version locking
Consistently apply updates across all your instances by locking them to a specific repository version.
Enhance your security posture
Set the system crypto policy to FUTURE or LEGACY, lock down SELinux, and set SELinux to enforcing or permissive mode.
Videos
From the Amazon Linux 2023 documentation:
You can change the value of releasever using one of the following methods. These methods are listed in descending system priority. This means that method 1 overrides methods 2 and 3, and method 2 overrides method 3.
- The value in the command line flag, --releasever=latest, if it's used.
- The value that's specified in the override variable file, /etc/dnf/vars/releasever, if it's set.
- The currently installed version of the system-release package.
So releasever can be found with the one-liner:
cat /etc/dnf/vars/releasever || rpm -q system-release
Original answer
Can be found like so:
cat /var/log/dnf.log | grep -i "ddebug releasever:" | rev | cut -f 1 -d " " | rev | tail -n 1
To double check run dnf list system-release. The numbers should be identical.
The packages amazon-linux-repo-s3 or kernel-livepatch-repo-s3 can be used in place of system-release.
I see it in eg:
% cat /etc/amazon-linux-release
Amazon Linux release 2023.5.20240805 (Amazon Linux)
% cat /etc/os-release
NAME="Amazon Linux"
VERSION="2023"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2023"
PLATFORM_ID="platform:al2023"
PRETTY_NAME="Amazon Linux 2023.5.20240805"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2023"
HOME_URL="https://aws.amazon.com/linux/amazon-linux-2023/"
DOCUMENTATION_URL="https://docs.aws.amazon.com/linux/"
SUPPORT_URL="https://aws.amazon.com/premiumsupport/"
BUG_REPORT_URL="https://github.com/amazonlinux/amazon-linux-2023"
VENDOR_NAME="AWS"
VENDOR_URL="https://aws.amazon.com/"
SUPPORT_END="2028-03-15"
% cat /etc/system-release
Amazon Linux release 2023.5.20240805 (Amazon Linux)
% rpm -q system-release
system-release-2023.5.20240805-0.amzn2023.noarch
% rpm -q system-release --qf "%{VERSION}\n"
2023.5.20240805
% dnf list system-release
Last metadata expiration check: 3:03:53 ago on Fri Nov 7 10:01:06 2025.
Installed Packages
system-release.noarch 2023.5.20240805-0.amzn2023 @amazonlinux