mirror of
https://pagure.io/fedora-docs/quick-docs.git
synced 2024-11-24 21:35:17 +00:00
21 lines
901 B
Text
21 lines
901 B
Text
[id='adding-repositories']
|
|
= Adding repositories
|
|
|
|
This section describes how to add software repositories with the `dnf config-manger` command.
|
|
|
|
Use the following commands as the `root` user or under the `sudo` utility.
|
|
|
|
. Define a new repository by adding a new file with the `.repo` suffix to the [filename]`/etc/yum.repos.d/` directory. For details about various options to use in the `.repo` file, see the link:https://docs-old.fedoraproject.org/en-US/Fedora/26/html/System_Administrators_Guide/sec-Setting_repository_Options.html[Setting [repository\] Options] section in the System Administrator's Guide
|
|
|
|
. Add the newly created repository.
|
|
+
|
|
[literal,subs="+quotes,attributes"]
|
|
----
|
|
# dnf config-manager --add-repo _repository_
|
|
----
|
|
+
|
|
Replace `_repository_` with the path to the created `.repo` file, for example:
|
|
+
|
|
----
|
|
# dnf config-manager --add-repo /etc/yum.repos.d/fedora_extras.repo
|
|
----
|