nerdexam
CompTIA

XK0-005 · Question #1672

A Linux administrator needs to determine if prerequisites are met. One of the application requirements is to install Perl on a system. Which of the following commands would accomplish this task?

The correct answer is C. rpm -qa perl. rpm -qa queries all installed RPM packages. When combined with a package name like rpm -qa perl, it returns the installed version of Perl if it is present, or no output if it is not - this verifies whether the prerequisite is met. rpm -Uf upgrades or installs a package from a…

System Management

Question

A Linux administrator needs to determine if prerequisites are met. One of the application requirements is to install Perl on a system. Which of the following commands would accomplish this task?

Options

  • Arpm -Uf perl
  • Brpm -iv perl
  • Crpm -qa perl
  • Drpm -eh perl

How the community answered

(36 responses)
  • A
    6% (2)
  • B
    3% (1)
  • C
    89% (32)
  • D
    3% (1)

Explanation

rpm -qa queries all installed RPM packages. When combined with a package name like rpm -qa perl, it returns the installed version of Perl if it is present, or no output if it is not - this verifies whether the prerequisite is met. rpm -Uf upgrades or installs a package from a file, not a query. rpm -iv installs a package verbosely; it does not check if it is already installed. rpm -eh is not a valid rpm option combination.

Topics

#Package Management#RPM#Linux Commands#Software Installation

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice