Beginner Package: dnf

dnf

Install and manage software on Fedora, RHEL and derivatives.

Syntax

dnf [command] [package]

Description

dnf is the modern package manager on Fedora, RHEL 8+, CentOS Stream, Rocky and AlmaLinux, succeeding yum with faster dependency resolution while keeping a very similar command syntax.

Examples

sudo dnf install httpd
Install a package and its dependencies
sudo dnf remove httpd
Remove a package
sudo dnf update
Update all installed packages
dnf search dns
Search available packages by keyword
RHEL-based only. yum is still available as an alias to dnf on most current releases.

Applies to

RHEL CentOS / Rocky / AlmaLinux Fedora