Merry Christmas & Happy 2027! Less downtime. More good times. Celebrating 13 years of sorlavit.com
Skip to content
Sorlavit KimIT Support, Network & Infrastructure Services Let’s talk

Articles are written in English. The Thai translation button opens Google Translate; code and commands stay in their original form.

Linux Commands / IT Support Guides

Find the RPM package behind a Linux executable

Find which installed RPM package registered a file path.

Compiled for Sorlavit Kim · Published · Updated · 1 min read

Environment and inputs: Linux · Bash-compatible shell; package and service names vary by distribution

Understand the problem

Run the check on an RPM-based host. Identify the path you want to look up, such as /usr/bin/bash.

Run the command

Run rpm -qf with the file path. The q selects query mode and f asks RPM for the package associated with the file.

rpm -qf /usr/bin/bash

Read the output

A result beginning with bash- identifies the package. Its version and architecture depend on what is installed on the host.

Choose the next step

If RPM says the file is not owned by any package, verify the path. It could have been installed manually or generated after installation.

Before making changes

Record the installed package identifier in the incident notes. If you also need to check file integrity, use a package verification procedure.

Share this article

Back to all articles