A Linux repository is a storage location from which your system retrieves and installs OS updates and applications. Each repository is a collection of software hosted on a remote server and intended to be used for installing and updating software packages on Linux systems. When you run commands such as \u201csudo apt update\u201d or \u201csudo apt upgrade\u201d, you may be pulling package information and package updates from a number of repositories.\nRepositories contain thousands of programs. Standard repositories provide a high degree of security, since the software included is thoroughly tested and built to be compatible with a particular distribution and version. So, you can expect the updates to occur with no unexpected "side effects."\n\nRepositories may be standard or non-standard. Once a non-standard repository has been added to your system's list of repositories, the system can install software from it, as well as from the standard ones; otherwise, it cannot. In general, adding a non-standard repository is a simple step. The sudo apt-add-repository command on Ubuntu, for example, can be used to add a repository. The --help option for the apt-add-repository command shows these command examples:\n apt-add-repository 'deb http:\/\/myserver\/path\/to\/repo stable myrepo'\n apt-add-repository 'http:\/\/myserver\/path\/to\/repo myrepo'\n apt-add-repository 'https:\/\/packages.medibuntu.org free non-free'\n apt-add-repository http:\/\/extras.ubuntu.com\/ubuntu\n apt-add-repository ppa:user\/repository\n apt-add-repository ppa:user\/distro\/repository\n apt-add-repository multiverse\n\nThe apt-add-repository command also supports removing a repository with use of the -r option.\nOn Fedora,\u00a0the command for adding a repository looks like this:\ndnf config-manager --add-repo repository_url\nYou should be careful, however, when adding a non-standard repository to be sure that it has been tested and is known to work on your particular system.\nIf you\u2019re curious about which repositories your system is using, you can issue a command on the command line to have your Linux system provide that information to you.\nRPM-based systems\nOn RedHat, Fedora and similar systems, you would use a command like the one shown below to view the repositories that your update commands use. Note that we're using the dnf command in this example. This is the replacement for the older yum command.\n$ sudo dnf repolist\nLast metadata expiration check: 0:18:37 ago on Sat 15 Sep 2018 12:28:02 PM EDT.\nrepo id repo name status\n*fedora Fedora 28 - x86_64 57,327\n*updates Fedora 28 - x86_64 - Updates 18,739\n\nThe status field in the output above represents the number of packages in each of the repositories. If you add the "all" specification, you will also see disabled (not used) repositories. In the command below, we see that quite a number of other repositories are disabled.\n$ sudo dnf repolist all\nLast metadata expiration check: 0:19:39 ago on Sat 15 Sep 2018 12:28:02 PM EDT.\nrepo id repo name status\n*fedora Fedora 28 - x86_64 enabled: 57,327\nfedora-cisco-openh264 Fedora 28 openh264 (From Cisco) disabled\nfedora-cisco-openh264-debuginfo Fedora 28 openh264 (From Cisco) disabled\nfedora-debuginfo Fedora 28 - x86_64 - Debug disabled\nfedora-source Fedora 28 - Source disabled\n*updates Fedora 28 - x86_64 - Updates enabled: 18,739\nupdates-debuginfo Fedora 28 - x86_64 - Updates - D disabled\nupdates-source Fedora 28 - Updates Source disabled\nupdates-testing Fedora 28 - x86_64 - Test Update disabled\nupdates-testing-debuginfo Fedora 28 - x86_64 - Test Update disabled\nupdates-testing-source Fedora 28 - Test Updates Source disabled\n\nEnabling a repository can be done with a command like this:\n# dnf config-manager --set-enabled repository_url\n\nYou can also add repositories fairly easily with commands like this:\n# dnf config-manager --add-repo http:\/\/www.example.com\/example.repo\n\nDebian-based systems\nFor Debian systems such as Ubuntu, you could use a command like the one shown below to list the repositories that are used when you update your system.\u00a0This command selects sources from the \/etc\/apt\/sources.list file and \/etc\/apt\/sources.list.d directory on the system where this information is maintained. The ^[^#] argument is suppressing the comments.\n$ grep ^[^#] \/etc\/apt\/sources.list \/etc\/apt\/sources.list.d\/*\n\/etc\/apt\/sources.list:deb http:\/\/us.archive.ubuntu.com\/ubuntu\/ bionic main restricted\n\/etc\/apt\/sources.list:deb http:\/\/us.archive.ubuntu.com\/ubuntu\/ bionic-updates main restricted\n\/etc\/apt\/sources.list:deb http:\/\/us.archive.ubuntu.com\/ubuntu\/ bionic universe\n\/etc\/apt\/sources.list:deb http:\/\/us.archive.ubuntu.com\/ubuntu\/ bionic-updates universe\n\/etc\/apt\/sources.list:deb http:\/\/us.archive.ubuntu.com\/ubuntu\/ bionic multiverse\n\/etc\/apt\/sources.list:deb http:\/\/us.archive.ubuntu.com\/ubuntu\/ bionic-updates multiverse\n\/etc\/apt\/sources.list:deb http:\/\/us.archive.ubuntu.com\/ubuntu\/ bionic-backports main restricted universe multiverse\n\/etc\/apt\/sources.list:deb http:\/\/security.ubuntu.com\/ubuntu bionic-security main restricted\n\/etc\/apt\/sources.list:deb http:\/\/security.ubuntu.com\/ubuntu bionic-security universe\n\/etc\/apt\/sources.list:deb http:\/\/security.ubuntu.com\/ubuntu bionic-security multiverse\n\/etc\/apt\/sources.list.d\/teejee2008-ubuntu-ppa-bionic.list:deb http:\/\/ppa.launchpad.net\/teejee2008\/ppa\/ubuntu bionic main\n\nOne thing you might notice when looking at the listing above is the use of the terms restricted, universe, and multiverse. These terms identify some important distinctions:\n\nMain \u2013 officially supported, open-source software. Canonical provides official support for these packages. Every open-source software package included in the default installation is included along with some other important packages.\nRestricted \u2013 officially supported, closed-source software \u2013 e.g., hardware drivers -- supported for the length of the release.\nUniverse \u2013 community-maintained, open-source. The majority of the Ubuntu software comes from this repository. Canonical does not provide official support or updates.\nMultiverse \u2013 unsupported, closed-source and patent-encumbered software.\n\nWrap-up\nStandard Linux repositories provide:\n\nReliable locations to get software with confidence, knowing that it's free from malware and properly tested\nSimple installations without concerns for dependencies (all the required packages are provided)\nEasy ways to find and download what you need\n\nKnowing which repositories you are using can shed light on how your system manages updates. In general, this is very straighforward. If you use non-standard repositories, it's probably a good idea to occassionally review your software sources.