nerdexam
CompTIA

XK0-005 · Question #178

A Linux administrator attempts to install the package newprogram.x86_64.rpm using a package manager. The administrator receives a warning indicating the command that was run was using a deprecated…

The correct answer is A. # dnf install newprogram.x86_64.rpm. To install an RPM package on a modern RPM-based Linux distribution without using deprecated tools, the administrator should use the DNF package manager.

System Management

Question

A Linux administrator attempts to install the package newprogram.x86_64.rpm using a package manager. The administrator receives a warning indicating the command that was run was using a deprecated package manager. Which of the following commands should the administrator use to avoid the warning and install the newprogram.x86_64.rpm program?

Options

  • A

    dnf install newprogram.x86_64.rpm

  • B

    rpm -e newprogram.x86_64.rpm

  • C

    dpkg -i newprogram.x86_64.rpm

  • D

    apt-get install newprogram.x86_64.rpm

How the community answered

(35 responses)
  • A
    89% (31)
  • B
    3% (1)
  • C
    3% (1)
  • D
    6% (2)

Why each option

To install an RPM package on a modern RPM-based Linux distribution without using deprecated tools, the administrator should use the DNF package manager.

A# dnf install newprogram.x86_64.rpmCorrect

`dnf` is the current-generation package manager for RPM-based Linux distributions, replacing `yum`, and is used for installing, updating, and removing packages. The `dnf install newprogram.x86_64.rpm` command will correctly install the specified local RPM package.

B# rpm -e newprogram.x86_64.rpm

`rpm -e` is used to erase (uninstall) an RPM package, not install it.

C# dpkg -i newprogram.x86_64.rpm

`dpkg` is the package manager for Debian-based systems and cannot directly install `.rpm` files.

D# apt-get install newprogram.x86_64.rpm

`apt-get` is also for Debian-based systems and cannot install `.rpm` files.

Concept tested: Linux DNF package manager usage

Source: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/managing_software_with_dnf/installing-and-removing-packages_managing-software-with-dnf#installing-a-package_installing-and-removing-packages-with-dnf

Topics

#Package Management#dnf#RPM#Linux Administration

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice