nerdexam
ExamsLX0-103Questions#4
CompTIA

LX0-103 · Question #4

LX0-103 Question #4: Real Exam Question with Answer & Explanation

The correct answer is C: rpm --query --all. The rpm --query --all command (equivalent to rpm -qa) lists all packages currently installed on an RPM-based system. The other options use incorrect syntax for either rpm or yum.

Question

Which of the following commands lists all currently installed packages when using RPM package management?

Options

  • Ayum --query --all
  • Byum --list --installed
  • Crpm --query --all
  • Drpm --list installed

Explanation

The rpm --query --all command (equivalent to rpm -qa) lists all packages currently installed on an RPM-based system. The other options use incorrect syntax for either rpm or yum.

Common mistakes.

  • A. yum does not support --query as a valid option - that flag belongs to the rpm command, not yum.
  • B. yum uses the subcommand syntax yum list installed rather than --list --installed with double-dash flags.
  • D. rpm --list is not a valid rpm option - listing installed packages requires the --query --all (-qa) syntax, not --list.

Concept tested. Querying all installed RPM packages

Reference. https://man7.org/linux/man-pages/man8/rpm.8.html

Community Discussion

No community discussion yet for this question.

Full LX0-103 Practice