Bird
0
0

What will be the output of the command apt list --installed | grep bash?

medium📝 Command Output Q4 of 15
Linux CLI - Package Management
What will be the output of the command apt list --installed | grep bash?
ARemoves the bash package from the system
BUpdates the bash package to the latest version
CLists all installed packages containing 'bash' in their name
DShows the bash package details from the repository
Step-by-Step Solution
Solution:
  1. Step 1: Understand apt list --installed

    This command lists all packages currently installed on the system.
  2. Step 2: Understand the use of grep bash

    grep bash filters the list to show only lines containing 'bash', so it shows installed packages with 'bash' in their name.
  3. Final Answer:

    Lists all installed packages containing 'bash' in their name -> Option C
  4. Quick Check:

    Command filters installed packages by name = Lists all installed packages containing 'bash' in their name [OK]
Quick Trick: Use grep to filter apt list output by package name [OK]
Common Mistakes:
  • Thinking it upgrades or removes packages
  • Confusing list with install or remove
  • Assuming it shows repository info

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes