Manage software on your AL2 instance - Amazon Linux 2
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Manage software on your AL2 instance

The base distribution of Amazon Linux contains the software packages and utilities that are required for basic server operations.

This information applies to AL2 and Amazon Linux. For information about AL2023, see Managing packages and operating system updates in the AL2023 User Guide.


The Amazon Linux AMI reached its end-of-life on December 31, 2023 and will not receive any security updates or bug fixes starting January 1, 2024. For more information about the Amazon Linux AMI end-of-life and maintenance support, see the blog post Update on Amazon Linux AMI end-of-life. We recommend that you upgrade applications to AL2023, which includes long-term support until 2028.

It is important to keep software up to date. Many packages in a Linux distribution are updated frequently to fix bugs, add features, and protect against security exploits. For more information, see Update instance software on your AL2 instance.

By default, Amazon Linux instances launch with the following repositories enabled:

  • AL2: amzn2-core and amzn2extra-docker

  • Amazon Linux AMI: amzn-main and amzn-updates

While there are many packages available in these repositories that are updated by Amazon Web Services, there might be a package that you want to install that is contained in another repository. For more information, see Add repositories on an AL2 instance. For help finding and installing packages in enabled repositories, see Find and install software packages on an AL2 instance.

Not all software is available in software packages stored in repositories; some software must be compiled on an instance from its source code. For more information, see Prepare to compile software on an AL2 instance.

Amazon Linux instances manage their software using the yum package manager. The yum package manager can install, remove, and update software, as well as manage all of the dependencies for each package. Debian-based Linux distributions, like Ubuntu, use the apt-get command and dpkg package manager, so the yum examples in the following sections do not work for those distributions.