13.0k views
0 votes
You're using a Linux distribution that uses RPM for package management. Which command would you use to check to see if the httpd package, the Apache HTTP Server package, is installed?

--------------------------------------------------------------------------
yum search httpd

yum list installed httpd

yum info httpd

yum list installed

1 Answer

3 votes

Final answer:

To check if the httpd package is installed on a Linux system using RPM, the command 'rpm -q httpd' is used. It queries the RPM database and returns the installed version or indicates that the package is not installed.

Step-by-step explanation:

To check if the httpd package, which is the Apache HTTP Server package, is installed on a Linux distribution that uses RPM for package management, you would use the command: rpm -q httpd.

This command queries the RPM database to check if the httpd package is installed. If the package is installed, the version number will be displayed, otherwise, a message indicating that the package is not installed will appear. It's important to note that yum commands like yum list installed httpd can also be used to list installed packages, but for a direct query to the RPM database, rpm -q is the more specific tool for the job.

User Workwise
by
7.6k points