DNF Package Manager Commands
The DNF (Dandified YUM) package manager is a powerful tool for managing software on Linux distributions like Fedora, CentOS, and RHEL. It simplifies the process of installing, updating, and removing packages, ensuring your system is up-to-date and secure. This guide covers essential DNF commands for everyday use.
Install Packages with DNF
The primary function of DNF is to install software. Use the install command followed by the package name.
dnf install <package>
Search for Packages
If you're unsure of a package name or want to find software related to a specific term, use the search command. This is crucial for discovering available software.
dnf search <phrase>
Find Package Providers
Sometimes you need to know which package provides a specific executable or file. The provides command is invaluable for this.
dnf provides <executable>
Download Packages
Before installing, you might want to download a package's RPM file. The download command allows you to do this without installing.
dnf download <package>
Install Build Dependencies
For developers, installing the necessary dependencies to build software from source is common. The builddep command helps by installing these requirements.
dnf builddep <file>
List Installed Packages
To see all the software currently installed on your system, use the list installed command.
dnf list installed
These fundamental DNF commands will help you efficiently manage your system's software. For more advanced usage, consult the official DNF documentation.