Package management tool
In Amazon Linux 2023 (AL2023), the default software package management tool is DNF. DNF is the successor to YUM, the package management tool in Amazon Linux 2.
DNF is similar to YUM in its usage. Many DNF commands are the same
and with the same options as YUM commands. In a Command Line Interface (CLI) command, in most cases
dnf
replaces yum
.
For example, for the following Amazon Linux 2 yum
commands:
$
sudo yum install packagename
$
sudo yum search packagename
$
sudo yum remove packagename
In AL2023, they become these commands:
$
sudo dnf install packagename
$
sudo dnf search packagename
$
sudo dnf remove packagename
Many of the dnf
commands and yum
commands are the same. In AL2023 the yum
command is still available, but as a pointer to the dnf
command. So, when the yum
command is
used in the shell or in a script, all commands and options are the same as the DNF CLI. For more
information about the differences between the YUM CLI and the DNF CLI, see Changes in DNF CLI compared to
YUM
For a complete reference of commands and options for the dnf
command, refer to the man page
man dnf
. For more information, see DNF Command Reference