From the course: Red Hat Certified System Administrator (EX200) Cert Prep: 1 Deploy, Configure, and Manage (2021)

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Query with RPM

Query with RPM

- [Instructor] RPM is used to install local software packages. Once a package is installed, the RPM package database is updated with the package information. We can query that package database. We can also query a package directly even if it isn't installed. In addition, we can query a file. In reality, it's looking through the package database for a reference to the file. This only works for files that belong to software packages. Let's use the RPM command to query the database. In a terminal, type in rpm -qa and hit Enter. The -q option tells RPM to query, and -a means all packages. We could specify the two options individually, but we can also place them next to each other as you see here. Because we haven't specified a package or a file to query, RPM will query the database. We can see from this list that there's a lot of packages installed. If you'd like to have a sorted list, just pipe it into sort. Type…

Contents