Bird
0
0

What will be the output of the command dnf list installed | grep bash on a system where bash is installed?

medium📝 Command Output Q13 of 15
Linux CLI - Package Management
What will be the output of the command dnf list installed | grep bash on a system where bash is installed?
AA list of all packages except bash
BAn error saying 'bash not found'
CA list line showing the bash package details
DNo output at all
Step-by-Step Solution
Solution:
  1. Step 1: Understand the command components

    dnf list installed lists all installed packages; piping to grep bash filters lines containing 'bash'.
  2. Step 2: Predict output if bash is installed

    Since bash is installed, the output will show the bash package line.
  3. Final Answer:

    A list line showing the bash package details -> Option C
  4. Quick Check:

    dnf list installed | grep bash = bash package line [OK]
Quick Trick: grep filters output lines containing the keyword [OK]
Common Mistakes:
  • Expecting an error if package exists
  • Thinking grep excludes matching lines
  • Assuming no output means package installed

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes