Forrest logo
back to the dnf tool

dnf:tldr:4e0c1

dnf: Find which packages provide a given command.
$ dnf provides ${command}
try on your machine

The command dnf provides ${command} is used to find the package that provides a specific command.

When you run this command with a specific command name, dnf (Dandified Yum) will search through all the installed packages and their files to locate which package provides that command. It will then display the package name and version that contains the requested command.

For example, let's say you want to identify the package that provides the ls command, which lists the files and directories in a directory. You would run the command dnf provides ls, and the output would display the name and version of the package containing the ls command, such as coreutils-8.32-6.fc34.x86_64.

This command is particularly helpful when you encounter a command that is not recognized or found by your system. It allows you to determine which package you need to install or update to gain access to that command.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the dnf tool