Adding Repositories in Ubuntu

From Free Knowledge Base- The DUCK Project: information for everyone
Revision as of 11:46, 3 June 2015 by Admin (Talk | contribs)

Jump to: navigation, search

About Repositories

Programs that you can install using apt-get on your Ubuntu Linux system are stored in repositories. Ubuntu software repositories are organized into four separate areas based on the level of support offered by Ubuntu or third parties. The repository structure of organization is as follows:

  1. Main - preconfigured and your main Ubuntu support software
  2. Restricted - software with restricted licensing
  3. Universe - third-party free and open source software
  4. Multiverse - commercial software, closed source, free or pay

Universe repositories are by and large are numerous made up of individually or developer maintained sources of private development projects. Software developers often maintain their own repositories, from which software packages can be downloaded and installed directly. These are privately controlled repositories that are not monitored by a control so you should be careful what repositories that you trust and add to your list. Some repositories could contain malicious software. Basically, anyone can create a repository, and software to it, and publicly offer that software for users, for better or for worse.

PPA repositories or Personal Package Archives are a special type of Universe repository used to store experimental source packages still under development. Such software has not been approved by the Debian or Ubuntu developers (but may eventually become an accepted package). Use this software at your own risk just like any other third party repository software.

The Ubuntu installer references both Main and Restricted when adding components during installation. These repositories, or sometimes called repos for short, are already defined in your repositories sources list: /etc/apt/sources.list View them:

cat /etc/apt/sources.list|less

This repositories list can be edited by directly opening the text file sources.list or can be managed via a graphical user interface.

Add Repositories using Synaptic Package Manager

From within the desktop environment:

  • Menu -> System -> Administration -> Synaptic Package Manager -> Settings -> Repositories

For Third Party Software select Add -> enter the repository's address.

add Repositories from the command line

sudo apt-add-repository ppa:user/repository

When the repository name has a format similar to the following, enclose the repository name in quotation marks:

sudo apt-add-repository "deb http://repository.example.org trusty stable"

Example: We want to install, as an example, the Classic Gnome Menu in Ubuntu 14.04. Here is the entire process from adding the repository, refreshing, and running the new software. See below:

As root or using sudo do the following:

apt-add-repository ppa:diesch/testing
apt-get update
apt-get install classicmenu-indicator

After installing it, go and launch the application from Unity Dash. It’s called Classic Menu Indicator. When you launch it, it will automatically dock at the top panel over towards the right side. It should be just left of the speaker or clock. It will look like three horizontal bars.

You can add a repository without editing the sources.list file by defining additional source repository lists. You can place files in /etc/apt/sources.list.d The /etc/apt/sources.list.d directory provides a way to add sources.list entries in separate files. This seems unnecessarily "careful" however, some are more comfortable with this method.

External Resources

Ubuntu Trusty Packages and Repositories - focused on both Ubuntu and Kubuntu covering Unity, Gnome, and KDE. Extensive details on repository management.