Manage software on your Amazon Linux instance - Amazon Elastic Compute Cloud
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 Amazon Linux instance

The base distribution of Amazon Linux contains many software packages and utilities that are required for basic server operations. Many more software packages are available in various software repositories, and even more packages are available for you to build from source code.

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 Amazon Linux instance.

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

  • Amazon Linux 2: 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 Amazon Linux instance. For help finding packages in enabled repositories, see Find software packages on an Amazon Linux instance. For information about installing software on an Amazon Linux instance, see Install software packages on an Amazon Linux 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 Amazon Linux 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.

To list installed packages

To view a list of installed packages on your instance, use the following command.

[ec2-user ~]$ yum list installed