Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save aelkz/0dc6864cd7f3665a2780b2a111ad1a49 to your computer and use it in GitHub Desktop.
Save aelkz/0dc6864cd7f3665a2780b2a111ad1a49 to your computer and use it in GitHub Desktop.
##[IMPORTING GPG KEY]
# https://getfedora.org/pt/keys/faq/
```
rpm --import PUBKEY ...
```
##[Adding a DNF Repository]
==============
To define a new repository, you can either add a [repository] section to the /etc/dnf/dnf.conf file, or to a .repo file in the /etc/yum.repos.d/ directory. All files with the .repo file extension in this directory are read by DNF, and it is recommended to define your repositories here instead of in /etc/dnf/dnf.conf.
DNF repositories commonly provide their own .repo file. To add such a repository to your system and enable it, run the following command as root:
dnf config-manager --add-repo repository_url
…where repository_url is a link to the .repo file.
Example 6.8. Adding example.repo
To add a repository located at http://www.example.com/example.repo, type the following at a shell prompt:
```
~]# dnf config-manager --add-repo http://www.example.com/example.repo
```
adding repo from: http://www.example.com/example.repo
##[Enabling a DNF Repository]
To enable a particular repository or repositories, type the following at a shell prompt as root:
```
dnf config-manager --set-enabled repository…
```
…where repository is the unique repository ID. To display the current configuration, add the --dump option.
##[Disabling a DNF Repository]
To disable a DNF repository, run the following command as root:
```
dnf config-manager --set-disabled repository…
```
…where repository is the unique repository ID. To display the current configuration, add the --dump option.
@PranavBhattarai
Copy link

noice

@duttabhishek0
Copy link

Awesome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment