Bird
0
0

What will be the output of the command yum list installed | grep httpd if the httpd package is installed?

medium📝 Command Output Q4 of 15
Linux CLI - Package Management
What will be the output of the command yum list installed | grep httpd if the httpd package is installed?
AError: Package httpd not found
BNo output
Chttpd.x86_64 2.4.6-97.el7.centos installed
Dhttpd is not installed
Step-by-Step Solution
Solution:
  1. Step 1: Understand the command behavior

    yum list installed lists all installed packages. Piping to grep httpd filters lines containing 'httpd'.
  2. Step 2: Interpret output if package is installed

    If httpd is installed, the output shows its name, architecture, version, and status 'installed'.
  3. Final Answer:

    httpd.x86_64 2.4.6-97.el7.centos installed -> Option C
  4. Quick Check:

    yum list installed + grep = package details if installed [OK]
Quick Trick: Pipe 'yum list installed' to grep to find installed packages [OK]
Common Mistakes:
  • Expecting error if package installed
  • Thinking no output means installed
  • Confusing command with search

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes