Difference between using `add-apt-repository` and adding a link to the sources.list

From a user's point of view, they seem equivalent. Some programs can be installed via apt-get install after adding a link to the sources.list.

Others have to be installed by adding a ppa though command line, and as far as I can see, this method doesn't create an entry in the sources.list.

So there must be a technical difference? And, if at all, what is the difference between a PPA and a repository?


Solution 1:

Adding via PPA does add a list. file in /etc/apt/sources.list.d, which is sourced by apt so there is a repository there.

The convenience that add-apt-repository provides is that it not only adds the source, it adds the GPG key of the repository so you don't have to do that manually.

Solution 2:

Adding a PPA through command line does create an entry.

Command line:

sudo add-apt-repository ppa:webupd8team/jupiter
sudo apt-get update
sudo apt-get install jupiter

After adding the repository it shows up in Ubuntu Software Center:

enter image description here