Which command sequence lists all repositories (enabled and disabled) and installs a package with a repository disabled for that operation?

Prepare for the Red Hat Certified Systems Admin Exam EX200. Enhance your skills with interactive quizzes, flashcards, and detailed explanations. Ace your certification exam today!

Multiple Choice

Which command sequence lists all repositories (enabled and disabled) and installs a package with a repository disabled for that operation?

Explanation:
The concept being tested is how to inspect all repositories while controlling which repositories are used for a specific operation. To see every repository, enabled and disabled, you need a command that lists all of them: dnf repolist all. That shows both the active repos and those turned off. Then, to install a package while ensuring a particular repository isn’t used for that operation, you apply a per-command disable flag to the install: dnf --disablerepo=name install packagename. This tells DNF not to consider the specified repository when resolving the package, while still allowing it to use all the other repos. Using these together achieves the goal: you first view the complete set of repos, then perform the installation with a specific repo disabled for that operation. The other options fail for one of these reasons: they either list only enabled repos (missing the disabled ones), disable the repo for the listing step rather than the install, or use a different tool (yum) instead of dnf, which isn’t aligned with the scenario described.

The concept being tested is how to inspect all repositories while controlling which repositories are used for a specific operation. To see every repository, enabled and disabled, you need a command that lists all of them: dnf repolist all. That shows both the active repos and those turned off. Then, to install a package while ensuring a particular repository isn’t used for that operation, you apply a per-command disable flag to the install: dnf --disablerepo=name install packagename. This tells DNF not to consider the specified repository when resolving the package, while still allowing it to use all the other repos.

Using these together achieves the goal: you first view the complete set of repos, then perform the installation with a specific repo disabled for that operation. The other options fail for one of these reasons: they either list only enabled repos (missing the disabled ones), disable the repo for the listing step rather than the install, or use a different tool (yum) instead of dnf, which isn’t aligned with the scenario described.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy