Which of the following commands lists all currently installed packages when using RPM package management?
Click on the arrows to vote for the correct answer
A. B. C. D.C
The correct command to list all currently installed packages when using RPM package management is option D: rpm --list -installed
.
Here's a breakdown of each option:
A. yum --query --all
: This command is not valid. The correct option to query all installed packages with YUM is yum list installed
.
B. yum --list --installed
: This command lists all installed packages using YUM package management. However, the question specifies that RPM package management should be used instead.
C. rpm --query --all
: This command will list all installed packages and their version numbers. However, it will not list the package names, so it may not be as helpful as option D.
D. rpm --list -installed
: This command will list all installed packages using RPM package management. It will display the package names, version numbers, and installation dates.
Overall, the correct answer is D: rpm --list -installed
.