How can you verify that the httpd package is installed on the system using yum?

Prepare for the Red Hat Certified Systems Admin Exam EX200. Enhance your skills with interactive quizzes, flashcards, and detailed explanations. Ace your certification exam today!

Multiple Choice

How can you verify that the httpd package is installed on the system using yum?

Explanation:
Querying yum for installed packages directly checks the system’s installed package list. Running the command to list installed packages filtered to httpd asks yum to look specifically for a package named httpd in its installed database and returns the package name, version, and source if it is present. If httpd is installed, you’ll see its entry with the version, confirming installation; if not, there will be no match, indicating it isn’t installed. This is the simplest and most precise way to verify installation using yum. Using a broader command like listing all installed packages would work only if you scan the entire list for httpd, which is less direct. A command using rpm would also verify installation but does not use yum. Attempting to install httpd would change the system state rather than verify what’s already installed.

Querying yum for installed packages directly checks the system’s installed package list. Running the command to list installed packages filtered to httpd asks yum to look specifically for a package named httpd in its installed database and returns the package name, version, and source if it is present. If httpd is installed, you’ll see its entry with the version, confirming installation; if not, there will be no match, indicating it isn’t installed. This is the simplest and most precise way to verify installation using yum.

Using a broader command like listing all installed packages would work only if you scan the entire list for httpd, which is less direct. A command using rpm would also verify installation but does not use yum. Attempting to install httpd would change the system state rather than verify what’s already installed.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy