Exam LFCS All QuestionsBrowse all questions from this exam
Question 23

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

    Correct Answer: C

    The correct command to list all currently installed packages when using RPM package management is rpm --query --all. This command, abbreviated as rpm -qa, queries and lists all the installed RPM packages in the system.

Discussion
passnowOption: C

I tested it and it worked like a charm on my centos . the given answer is correct

BuruguduystunstugudunstuyOption: C

Option C. rpm --query --all is the command that lists all currently installed packages when using RPM package management. RPM (Red Hat Package Manager) is a package management system that is used to install, remove, and manage packages on Red Hat-based systems. It is the low-level package manager for these systems and is responsible for installing and managing individual package files (.rpm files). To list all currently installed packages when using RPM package management, you can use the rpm --query --all command. This command shows a list of all installed packages and their details, such as the package name, version, and installation date.

Buruguduystunstugudunstuy

Option A: The yum --query --all command is not correct, because it is used with the yum package manager, which is not compatible with RPM packages. Option B: The yum --list --installed command is not correct, because it is used with the yum package manager, which is not compatible with RPM packages. Option D: The rpm --list –installed command is not correct, because it is missing a space between the list and –installed options. The correct syntax is rpm --list --installed.