nerdexam
GIAC

GSEC · Question #102

Which command would allow an administrator to determine if a RPM package was already installed?

The correct answer is B. rpm -q. The rpm -q flag queries the RPM database to determine whether a specific package is currently installed on the system.

Linux and Cryptography

Question

Which command would allow an administrator to determine if a RPM package was already installed?

Options

  • Arpm -s
  • Brpm -q
  • Crpm -a
  • Drpm -t

How the community answered

(27 responses)
  • A
    7% (2)
  • B
    74% (20)
  • C
    4% (1)
  • D
    15% (4)

Why each option

The rpm -q flag queries the RPM database to determine whether a specific package is currently installed on the system.

Arpm -s

There is no standard -s flag in rpm used to check installation status; -s is not a recognized standalone query option.

Brpm -qCorrect

The -q option in the rpm command stands for 'query' and checks the local RPM database for the presence of a named package. Running 'rpm -q <packagename>' returns the package name and version if installed, or a 'not installed' message if absent.

Crpm -a

The -a modifier means 'all' and is used in combination with -q (e.g., rpm -qa to list all installed packages), but is not a standalone option for checking a specific package.

Drpm -t

There is no standard -t flag in rpm for querying installation status of a package.

Concept tested: RPM package query command usage

Source: https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/managing_software_with_the_dnf_tool/assembly_introduction-to-rpm_managing-software-with-the-dnf-tool

Topics

#RPM#package management#Linux commands#software inventory

Community Discussion

No community discussion yet for this question.

Full GSEC Practice