How do you list all installed packages in a Red Hat-based system?

Prepare for the LPIC-2 Certification Test with our study tools, including flashcards and multiple choice questions with hints and explanations. Get ready to pass your exam!

To list all installed packages in a Red Hat-based system, the command that is most widely used and effective is rpm -qa. This command utilizes the RPM Package Manager, which is the default package management tool in Red Hat and its derivatives (like CentOS and Fedora). The -q option stands for "query," and the -a option specifies that you want to query all installed packages.

Using this command will output a list of all RPM packages that are currently installed on the system, providing you with their names and version numbers. This is crucial for system administration tasks, such as troubleshooting or verifying that specific software is installed.

The other options listed are not applicable for Red Hat-based systems. For example, dpkg -l is specific to Debian-based systems, while apt-get list installed is also a command for Debian-based systems that utilize the Advanced Packaging Tool (APT) for package management. The command yum list installed can also list installed packages on Red Hat-based systems, but rpm -qa is the more direct command suited for checking all installed packages specifically through RPM, which is the core package manager for these distributions.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy