How to connect third-party ubuntu repositories. Adding and removing repositories in Ubuntu

All kinds of programs or updates that are currently used in Ubuntu are installed exclusively from repositories. However, many users do not even know what it is and what its main purpose is.

What it is?

A repository is a special place from which a user of the Ubunty operating system can install all kinds of updates or programs. If you have used operating rooms before Mac systems and Windows, then you have probably already gotten used to the fact that the software is one or more installation files, which are provided to the user on certain media or can be downloaded via the Internet. For operating room Ubuntu systems this distribution option is also provided software, but this applies more to specialized closed or proprietary programs.

The repository is where most of the Ubuntu software is stored, packaged into specialized .deb files containing the required libraries. Such files can often be found on the Internet or on some portable media, even on the CD from which the operating system itself is installed.

Repository as a universal Ubuntu repository

However, when seeing such files, many users may not even know what a repository is. This specialized server-storage where such files are located. In other words, repositories can be called a kind of source of applications, since users from their computers connect to them via the Network or the Internet, using specialized utilities, after which they can see which packages are on this moment are already on the computer, and which ones can be installed. It is worth noting that the vast majority of utilities support the procedure simple search By keywords, and can also split packages into several groups by category.

Ubuntu repositories contain a huge amount of different software, so it is often not difficult to find the utility you are interested in in them. Of course, you can simply download a package of .deb files from the Internet or even try to compile the program yourself from source, but you must understand that this option is more labor-intensive and does not always end up being effective.

How to search for and install various programs?

Initially, when using the Ubuntu repositories, you should assume that there is a certain task that needs to be solved using the utility, but you may not even know if it exists or what it is called. However, it is likely that you know similar programs that are used in other operating systems Oh.

Using some Internet search engine, you find the variants of the desired program that interest you, for example, by typing the name of a similar utility in Windows, but adding “for Ubuntu” to the query. In the vast majority of cases, the search engine will give you several program names, and it is worth noting the fact that they can be presented in quite a large number, but you can choose the most optimal one based on the reviews of those users who have already used it. Almost every modern utility has its own page on the Internet, where you can familiarize yourself with additional characteristics or view screenshots.

Where can I download the program?

After you decide on the name of the program you are interested in, you will need to launch the center Ubuntu applications, then find it in available list. Most likely, you will be able to find it and install it in a sufficient short time. In addition, it is likely that developers have their own repositories for iOS 7 or other operating systems. In the vast majority of cases, such repositories contain the most latest versions program you are interested in, therefore, if you are interested in maximum productivity, then you should carefully examine the site and also use the search.

Only if you couldn't find the desired program, using repositories for iOS 7 or other OSes, you should try other installation options. It often happens that those versions of software that are in the repositories are outdated versions, but in fact there are often situations where they are better integrated into Ubuntu, and in certain situations they are also more stable. .

Sections

In Ubuntu best repositories are divided into four sections, called components, and are intended to reflect the page in both the license and the level of support available to the user. The packages are divided into components as follows:

  • Main is completely free software that is supported by Canonical.
  • Restricter is a proprietary software that includes mainly various drivers devices. All utilities are also supported by Canonical.
  • Universe is also free software that is not officially supported by Canonical, but is controlled by the operating system's user community.
  • Multiverse is proprietary software and is not supported by Canonical.

Types of repositories

There are also 5 main repositories:

  • Release - packages that were released at the time of the release.
  • Release-security - packages that contain some critical security updates.
  • Release-updates - packages containing system updates, including various more modern versions software that was released after the official release.
  • Release-backports - all kinds of backports belonging to new versions of certain software, which are available exclusively in unstable versions of the Ubuntu operating system.
  • Partner is a repository that contains various software from Canonical partner companies.

It is worth noting that, in addition to the official ones, there are also other repositories for iOS 8 and other operating systems. They can be created by the authors of certain utilities, as well as by people who simply decided to assemble a full-fledged package from source code, and then release it into open access for other users.

Adding via Launchpad

If you don't know how to add a repository, Launchpad will help you with this, providing the ability to create PPA repositories. These repositories are relatively small packages in which the owner puts various sources, and users are provided with a full-fledged deb document as a result.

How to connect?

If a person does not find the utility he is interested in, he can independently figure out how to add a repository, and then load the necessary software into it. After all, it often happens that the Ubuntu repositories simply do not have various utilities, which may be needed to solve certain problems. It is for this reason that there is enough a large number of third-party repositories, when connected, you can get access to the necessary software. This can be done either using or through the console.

It’s immediately worth noting the fact that in some repositories, in addition to the packages you need, there may also be all sorts of experimental builds of various software, including kernels that contain Linux repositories. Since the version of such packages is in most cases higher than those that you use, the Update Manager can try to update the system on its own. It will do this through free repositories, which can cause damage to your system. It is for this reason that you need, in any case, to carefully read the descriptions of the connected storage, as well as the information that is in the “Update Manager”.

Using a graphical interface

IN in this case repositories for iOS 8 and other operating systems are connected as follows:

  1. The Ubuntu Application Center opens.
  2. Next, go to “Edit” / “Application Sources”.
  3. In the new window, select the “Other Software” tab, and then click on the “Add” button.
  4. In the new window, fill in the “ART Line:” field and click the “Add Source” button.
  5. Now the source is added and enabled, you can close the window.

Since you connected new source software, you will need to update the package information. In the vast majority of cases, after connecting, a window appears in which the user is prompted to update this data. In the window you just need to click on the “Update” button.

Once you have updated all the package information, the Application Sources window will close and you will most likely receive an error stating that the application source is unsigned. However, you can install the utilities you are interested in, which are contained in the repository you connected, using standard means. To resolve the unsigned repository error, you should already understand the security system.

Using the console

This option is the most optimal of all existing methods. It is best to add a local repository or other types of storage using the console. This is done quite simply, because the repository is added with just one command, such as, for example: sudo apt-add-repository ppa:ripps818/coreavc.

If necessary, you can delete the repository in the same way through the console.

Protection system

Since in the vast majority of cases repositories are located on the Internet, there is a possibility that attackers can replace the repository with their own, which contains various modified packages. Thus, by installing modified software on your computer, the user can put his system at real risk. However, many repositories provide protection against spoofing. This protection option is implemented by comparing the digital signatures of the client and the repository. If the repository has a digital signature, the user computer there is a key that is public for this repository.

In Ubuntu, the default trusted storages are those located on installation disks. If there are several connected repositories on the user's computer at the same time, trusted repositories will be preferable.

How to add a key?

By connecting storage that is protected digital signature, you will need to download a specialized public key, which must be added to the system. Quite often, a package can be provided for download, available for installation, which will completely independently register the repository key. If you download the key directly from the repository website, then in this case you will be provided regular file with the extension .gpg, .key or some other. Add this file it will be possible to enter the system using console command sudo apt-key add repo.key, but instead of .key the repository key that you received is indicated.

Adding a key via the server

Most the best option is to add a key through a specialized server that is protected. Quite often if we're talking about about the key, its alphanumeric identifier is given, which at first glance may be completely incomprehensible to the user, but this unique name. These keys are located on special servers, where anyone can get them.

The concept of installing software in Linux is very different from Windows. Here, too, you can download the program on the Internet and simply run it without installing anything, but no one does that. Programs are installed from reliable sources - official repositories maintained and updated by the distribution developers or the user community. In a nutshell, repositories are large collections of programs in which they are stored in special format and can be automatically downloaded and installed by the package manager.

In one of my previous articles I reviewed. In this article we will look at repositories in Ubuntu more globally, we will look at setting up Ubuntu repositories, we will talk about what they are, where they are stored, how to add and delete repositories.

Basically, Ubuntu repositories can be divided into two types - official and repositories third party developers. The official repositories contain only stable programs, and their versions will not be updated, they can only receive security updates. Third party ubuntu repositories can be created by anyone and their author can update and add software to the repository whenever necessary. Ubuntu PPA repositories are created to simplify the process of creating third-party repositories.

Each repository supports multiple branches. The first group of branches is the distribution version. For each version of the distribution there is separate software.

The second group of branches is more interesting. The fact is that Ubuntu has several branches for various types of software:

  • Main- main branch - stable officially supported Canonical software
  • Restricted- officially supported software not distributed under the GPL license
  • Universe- programs supported by the Ubuntu community
  • Multiverse- proprietary software branch

Official repositories follow this structure; third-party ppas may have a different structure or simply a main branch.

Repositories can also be divided into two more types - repositories with binary files- ready assembled packages, and source code repositories where you can download source programs and assemble it on your computer.

Setting up repositories in Ubuntu

Ubuntu repository settings are located in several files in the /etc/apt directory.

All official repositories are recorded in the Ubuntu repositories file - /etc/apt/sources.list. For each PPA a repository is created separate file in the directory /etc/apt/sources.list.d/*

Thus, you already know how to view the list of repositories in Ubuntu in a primitive way. In fact, you can already open this file and add the Ubuntu repository right there at the end of the file, but there are special tools in the system for such actions, and we will look at them later.

Setting up repositories in the GUI

Repositories can be managed using the system settings utility. Launch System Settings, then open Programs and updates or run immediately Programs and updates from the Dash menu:

On the first tab, you can enable or disable branches of official repositories (main, restricted ...), and also select the mirror closest to you:

To add a repository in Ubuntu, go to the tab other software on this tab you can see the entire list of Ubuntu repositories that were connected to the system:

To have access to additional programs It is recommended to connect a third-party Canonical partner repository. To do this, simply check the box next to it.

To add the Ubuntu repository, click the button Add:

Here in the only field you need to enter the apt repository string and click the button add source.

The apt repository line has the following syntax:

deb http://repository_address distribution_version branches

For example:

deb http://ua.archive.ubuntu.com/ubuntu/ xenial main restricted

deb https://apt-mo.trafficmanager.net/repos/dotnet/ trusty main

The first line is the official repository, the second is the ubuntu PPA repository. As you can see, they look the same. With the distribution version everything is clear, this is the code name, with the branch too - this is main. But where can I get the address? This is your business, you can search for repositories anywhere, on forums, in search engines or in our article, which contains a list of the best repositories.

The installation of the Ubuntu repository is complete and it appears in the list. To disable it, simply uncheck the box. And to delete the Ubuntu repository, click the button delete:

For third-party repositories, you need to import the GPG key for proper operation in the system, if the key is not added, then when updating the Ubuntu repositories, apt will generate a signature verification error. This is done so that no one can replace the packages and you do not install viruses. Go to the tab Authentication then select import key from file:

As a rule, in the description of the repository, if it requires a key, a link is indicated where it can be downloaded. You can download the key using your browser, or console utility wget, for example:

wget http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0xFC6D7D9D009ED615

You can also delete keys using the button delete:

If you are confused and don’t know how to return the default state, you can simply click the button restore to restore Ubuntu repositories:

If new repositories have been added, upon exit the program will prompt you to update the Ubuntu repositories; this is necessary to download package lists from newly connected sources. The update can also be performed through the terminal, but more on that below.

Setting up Ubuntu PPA repositories

Ubuntu PPA repositories are located on the site created by Canonical - launchpad.net. Ubuntu is able to automatically distinguish, find the apt line and download GPG keys for such repositories. It is enough to specify the ppa address instead of apt terms when adding a repository to Ubuntu, for example:

In fact, PPA repositories are the same as regular repositories. If you want to add a repository manually, you can find out the apt line and key by revealing the spoiler Technical details about this PPA on the repository description page:

Now it can be added to the system, just as described above.

Adding repositories to Ubuntu from the terminal

In many instructions we see commands for connecting a repository in Ubuntu via the terminal. Indeed, this is a little more convenient than launching the utility, loading keys and doing everything with the mouse. To add the Ubuntu repository via terminal use the command: apt-add-repository:

sudo apt-add-repository "deb http://ppa.launchpad.net/shutter/ppa/ubuntu wily main"

The apt repository string is indicated in quotes. You can also simply add this line to /etc/apt/sources.list:

echo "deb http://ppa.launchpad.net/shutter/ppa/ubuntu wily main" >> /etc/apt/sources.list

To add GPG security keys, there is the apt-key command. You can add a key from a file, or download a key from using curl and redirect its output and apt-key:

curl -L http://debian.datastax.com/debian/repo_key | sudo apt-key add

Adding a repository to Ubuntu via the terminal is much easier than using the GUI.

How to delete a repository in Ubuntu

You can delete the Ubuntu repository via the terminal using the same command with the remove option:

sudo apt-add-repository --repository "deb http://ppa.launchpad.net/shutter/ppa/ubuntu wily main"

Or simply comment out the deb line in the /etc/apt/sources.list file or in one of the /etc/apt/sources.list.d/* files.

Adding a PPA repository to Ubuntu

You can add a PPA repository to Ubuntu using the same command. As I already said, the system will automatically recognize the repository and download the necessary keys. The recording format is:

sudo apt-add-repository ppa:repository/ppa

For example:

sudo apt-add-repository ppa:shutter/ppa

How to Delete a PPA Repository on Ubuntu

You can delete a repository in Ubuntu using the same command as in the previous example.

Represents some kind of storage for software. Installers are stored on a server, which can be accessed if necessary. When you add a repository, a list is loaded, called an index, containing information about utilities and applications. Basically, if you need to download any program or application, you can simply select the one you need from the list, and the Ubuntu Application Center will do the rest. From time to time, Ubuntu checks its repositories and updates its indexes. Thanks to this, the system can always receive latest updates software. Using a repository-utility combination makes it possible to use a simple, centralized method of installing/uninstalling utilities, as well as a convenient way to upload updates. In a freshly installed Ubuntu, all the necessary repositories are already connected, but you can always install and use third-party ones. They contain quite a large amount of different software. In this article, we will take a closer look at how to add or remove an Ubuntu repository. Let's figure it out. Go.

As mentioned above, initially Ubuntu already has a basic source of applications. In case it is not enough, the user can install additional repositories. Adding a repository proceeds as follows:

  1. First, go to System Settings and open Settings & Updates.
  2. Next, go to the “Other Software” tab.
  3. Click “Add source”, specifying the storage address.
  4. After that, update the Ubuntu indexes. Exit the settings section and click the “Update” button in the window that appears.

The same can be done via command line. First you need to open a terminal (to do this, use the hot keys Alt+Ctrl+T), and then run the command:

sudo apt-add-repository "deb http://dl.google.com/linux/chrome/deb/stable main"

The system may ask you to enter a user password.

After that, write a command that will update Ubuntu indexes:

If you want to see a list of repositories, just run in a terminal:

sudo nano /etc/apt/sources.list

To leave the nano editor, use the keyboard shortcut Ctrl+Z.

Now let's look at how to delete a repository in Ubuntu. This can be done in two ways: through GUI and via the command line.

To get started, go to the "Programs and Updates" section and select "Other Software". Select the desired line from the list and click on the “Delete” button. If you don't want to delete it, you can simply disable the repository. To do this, you just need to uncheck the box next to the corresponding list item.

Removing through the terminal is very simple. You just need to write the command:

sudo apt-add-repository -r “deb http://dl.google.com/linux/chrome/deb/ stable main”, just like in the previous case, specify the password if the system requires it.

That's all. As you can see, it's quite simple and doesn't take much time.

The most in a simple way Distributing programs for Ubuntu is by posting them in a repository. The official Ubuntu repositories, although they contain great amount packages are difficult to access regular developers, they are difficult to maintain current versions of its program, and in general, not every project has a chance to get there. To create your own repository, you need resources, at least a server, and good administrator skills. All this creates some obstacles to the distribution of programs for Ubuntu.

Therefore, to support and develop free projects, the launchpad.net service was created. You can do a lot of things using this service, but one of its key advantages is for regular user- the ability for anyone to create their own repository, which within the launchpad calls personal archive packages (Personal Package Archive - PPA), and use it to distribute your packages without unnecessary technical difficulties.

A huge number of projects are already actively using this service, and this will certainly increase in the future. However, at the moment the entire service is only available on English language, which is not very convenient for users who are new to it. In addition, to correctly add a ppa to the system, you need to perform a number of non-trivial actions.

Finding the required PPA and its description

If you are not new to Ubuntu and have already tried to install packages not only from the default repositories, then most likely you have already come across links like http://ppa.launchpad.net/deluge-team/ppa/ubuntu. This is a direct link to the PPA for deluge-team, following it you will only see folders with various files. Nowadays a huge number of packages are available through various PPAs, many projects use launchpad.net as the main source for distributing their programs for Ubuntu users, so references to ppa are very common. In addition, there is a search on launchpad.net, try to find your favorite project through it, it is quite possible that it is already registered on launchpad.net and ready-to-install packages have been posted for it.