# Unoffical Guide to Amazon Linux 2023 ## Amazon Linux 2023 Resources - https://aws.amazon.com/linux/amazon-linux-2023/faqs/ - https://github.com/amazonlinux/amazon-linux-2023/ - https://cdn.amazonlinux.com/al2023/os-images/latest/ - https://alas.aws.amazon.com/alas2023.html - https://docs.aws.amazon.com/linux/al2023/ - https://docs.aws.amazon.com/linux/al2023/release-notes/relnotes.html - https://docs.aws.amazon.com/linux/al2023/ug/deterministic-upgrades.html - [Manage package and operating system updates in AL2023](https://docs.aws.amazon.com/linux/al2023/ug/managing-repos-os-updates.html) - https://lwn.net/Articles/926352/ ## Overview of Updating Amazon Linux 2023 ### AL2023 Repository Details ``` # cdn.amazonlinux.com (x86_64) https://cdn.amazonlinux.com/al2023/core/mirrors/latest/x86_64/mirror.list https://cdn.amazonlinux.com/al2023/core/guids//x86_64/ # cdn.amazonlinux.com (aarch64) https://cdn.amazonlinux.com/al2023/core/mirrors/latest/aarch64/mirror.list https://cdn.amazonlinux.com/al2023/core/guids//aarch64/ # al2023-repos-us-east-1-.s3.dualstack..amazonaws.com https://al2023-repos--.s3.dualstack..amazonaws.com/core/mirrors//x86_64/mirror.list https://al2023-repos--.s3.dualstack..amazonaws.com/core/guids//x86_64/ https://al2023-repos--.s3.dualstack..amazonaws.com/core/mirrors//SRPMS/mirror.list https://al2023-repos--.s3.dualstack..amazonaws.com/kernel-livepatch/mirrors/al2023/x86_64/mirror.list ``` ### Checking for new releases / updates Get the hosts current Amazon Linux 2023 release: ```shell rpm -q system-release --qf "%{VERSION}\n" ``` OR ``` cat /etc/amazon-linux-release ``` To find out the LATEST SYSTEM RELEASE of Amazon Linux 2023: ```shell # You can use the following command to get more verbose output sudo dnf check-release-update --refresh --latest-only --version-only #sudo dnf check-release-update ``` To upgrade the Amazon Linux 2023 based host for the CURRENT SYSTEM RELEASE i.e. (`cat /etc/amazon-linux-release`): ```shell sudo dnf check-update --refresh sudo dnf upgrade --refresh ``` To upgrade the Amazon Linux 2023 based host to a SPECIFIC SYSTEM RELEASE: ```shell sudo dnf check-update --refresh --releasever=2023.5.20240722 sudo dnf update --refresh --releasever=2023.5.20240722 ``` To upgrade the Amazon Linux 2023 based host to the LATEST SYSTEM RELEASE: ```shell sudo dnf check-update --refresh --releasever=latest sudo dnf upgrade --refresh --releasever=latest ``` Note: Using `sudo dnf upgrade --releasever=latest` updates all packages, including system-release. Then, the version remains locked to the new system-release unless you set the persistent override. To permanently switch the host to always get the latest system release updates: ```shell # This command only needs to be run once sudo touch /etc/dnf/vars/releasever && echo 'latest' | sudo tee /etc/dnf/vars/releasever ``` Then it's just a matter of running the following commands to update via `latest`: ```shell sudo dnf check-update --refresh sudo dnf upgrade --refresh ``` To get more details about the current repos: ```shell dnf repoinfo dnf repolist all --verbose ```