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.
yumdoes not support--queryas a valid option - that flag belongs to therpmcommand, notyum. - B.
yumuses the subcommand syntaxyum list installedrather than--list --installedwith double-dash flags. - D.
rpm --listis not a validrpmoption - listing installed packages requires the--query --all(-qa) syntax, not--list.
Concept tested. Querying all installed RPM packages
Community Discussion
No community discussion yet for this question.