How do I add a software source?

26,476

Solution 1

You can easily add them in the Software Center->Edit->Software Sources->Other Sources->Add"

  1. Start the Software Center.

  2. In the panel go to Edit and select Software Sources.

    edit-software-sources

  3. In the tab Other Sources click on the Add button at the bottom.

    other-sources

  4. Add the deb URL in the APT Line input field and hit Add Source.

    software-properties-gtk

Once you close the Software Sources window your cache is going to be updated automatically.

You can now browse the newly added source in the New Source sub-list using the upper left list in Get Software.

Solution 2

From the command line we may add software sources by

sudo add-apt-repository deb http://something something

This will add the given source to our sources.list. We may need to additionally import a signature key:

sudo apt-key add <downloaded-keyfile>

There is a short form for a ppa:

sudo add-apt-repository ppa:<lp-user>/<ppa-name>

that will expand the entries for the sources list and automatically imports the gpg key.


After having added a new source we need to update the package index files in any case by running

sudo apt-get update

Solution 3

Here is another version.

gksudo gedit /etc/apt/sources.list

Add the deb URL to bottom of file and save it. After that you have to update the apt cache with

sudo apt-get update

Now you can install software from that source just like from any other source using

sudo apt-get install [packagename]
Share:
26,476

Related videos on Youtube

Jorge Castro
Author by

Jorge Castro

Updated on September 18, 2022

Comments

  • Jorge Castro
    Jorge Castro over 1 year

    Sometimes I see sites offering Ubuntu packages via something like

    Add this line to your software sources: deb http:// something something

    How can I add these to my package manager so I can install the software and keep it up to date? I'd like both GUI and command line options.