What is the equivalent '/etc/apt/sources.list' file in Fedora?

For a better understanding I must do mention of Ubuntu, about package management, through the apt command these two commands are very practically mandatory

sudo apt update
sudo apt upgrade

Where the former command works through the /etc/apt/sources.list file to get the latest information according the repositories defined about what is available to be upgraded through the latter command.

Now, about Fedora I know that these two Ubuntu commands are equivalent in Fedora to one command, it through either sudo dnf update or sudo dnf upgrade where the latter is an alias of the former, so both do the same job.

My question is - and of course if it applies -

  • What is the equivalent /etc/apt/sources.list file in Fedora?

If does not exist an equivalent file how knows Fedora what is available to be updated/upgraded?

1 Like

*.repo files are found under /etc/yum.repos.d

https://dnf.readthedocs.io/en/latest/conf_ref.html

3 Likes

According with the link it indicates:

DNF_ by default uses the global configuration file at /etc/dnf/dnf.conf and all *.repo files found under /etc/yum.repos.d . The latter is typically used for repository configuration and takes precedence over global configuration

Pls, can you explain (expand mostly) the difference/relation between these files?

1 Like

/etc/dnf/dnf.conf is the main configuration file for DNF
/etc/yum/repos.d is the directory that contains all of the repository files

IE if you want to influence the behavior of dnf the change would be in dnf.conf

The repository files are the *.repo files in /etc/yum.repos.d

These are similar to the sources.list file you’re referring to.

You can find additional details about adding/removing repositories here

A common repository that is added is rpmfusion.

3 Likes

Huge thanks for the quick and polite answer - a cold beer to you :beer: :nerd_face:

4 Likes