Lpic 1 Linux Administrator · Free Practice Question Medium
Question 7
-
A
Use
yum-config-managerwith the--add-repooption. -
B
Add a
.repofile describing the repository to/etc/yum.repos.d/. -
C
Use
yum-config-managerwith the repository URL (without options). -
D
Pass the repository URL to
yumwith the--addoption. -
E
Add the repository name directly to
yum-config-managerwithout any options.
Reveal correct answer
Correct answer: A
A.
Using yum-config-manager with the --add-repo option is a valid and recommended method to add a new repository to a Red Hat-based system using the yum package manager. This approach is straightforward and widely used for modern systems.
B.
This is not the recommended method in modern systems. While valid, it involves manually creating files, which is prone to errors and less efficient compared to using yum-config-manager.
C.
This is not a valid method. The yum-config-manager command requires the --add-repo option to properly add a repository.
D.
This is not a valid method. The --add option is not recognized by yum for adding repositories.
E.
This is not a valid method. yum-config-manager requires specific options, such as --add-repo, to function correctly.
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
