To install apps in Linux Mint provides a graphical software Manager. The problem is that the packages in the official repositories are updated much less frequently than software developers release updates. If you need to have the latest version, better to install a subroutine from third party sources, such as PPA. However, before anything to download from these repositories, you need to add them to the system.
Also sometimes there is a need to edit the repository list Linux Mint by default. For example, you can add other sources of packages for Ubuntu that will allow you to install updates and programs designed for another system. However, there are important two conditions: first, operating systems should be compatible, and secondly, you need to understand what and why will be installed in the system. In this article we will discuss how to add repository in Linux Mint.
How to add a repository to MintSources
The easiest way to add new repositories — a new tool mintsources, has graphical interface and is available at: Menus → System → software Sources. To work with the official or third party repository, choose the corresponding menu item.
1. Setting the official repositories
To select a mirror repository, it is sufficient to click on its name. Opens a list of all official addresses. Then wait 2-3 minutes, during this time, and upload information about the upload rate file for each of them. It makes sense to choose the option with the highest speed.
Next, the system asks you to press the button OK to complete the update of the APT cache. If you do not, you will use the previous settings.
Also the Official repository settings are located additional sources:
- Source code repositories — if you are going to make changes to the source code of Linux Mint, leave the slider in a state of Off.
- Debug symbols for debugging. If you are a developer of Linux Mint, you are unlikely to be needed. To do so, as in the previous case.
- Unstable packages (romeo) in this repository are kept ready but not yet tested packages. Download them participating in the beta testing. If you are one of them, just leave everything as it was.
By the way, if you do not remember how I did, but I had to click on everything, use the button to Restore the default. All changes, even the saved will be lifted.
2. Configuring PPA-repositories
Initially, the list of third party repositories is empty. To add repository in Linux Mint, click Add. The screen will appear a window where you must enter the repository’s address.
For example, let’s use the repository program Grub Customizerallows to change appearance and settings of the operating system loader. Please read more about it in another article. And in the meantime prescribe in the name of the repository — ppa:danielrichter2007/grub-customizer and press OK to confirm.
If the repository is found, the following window will appear with information from the developer. Here, too, you have to press OK.
And the last step is updating of the package index apt. Once again click OK and the system will read the entire list of sources, the repository will be added.
Similarly, you can add additional repositories of Linux Mint.
Add repositories using add-apt-repository
Unlike utilities mintsources, utility add-apt-repository only works from the terminal. All changes to the repository list are held only by a user with system administrator rights. So be sure to use sudo to execute these commands.
1. Repositories PPA
So the first team. Actually, she adds a new ppa repository Linux Mint to the list:
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
The second command executes the already-familiar refresh the list of packages:
sudo apt update
After the introduction of the first command, enter your password. When the system displays information about the repository and will ask you to confirm adding it, hit Enter.
2. The usual repositories
Added exactly the same as and third party. The only difference is how to specify a link to the source. If in the previous case she had a form of ppa:ppa-owner/ppa-name, when you add the usual repositories, you must specify the key word deb, a link to the source, for example, http://mirrors.evowise.com/linuxmint/packages and release name for 19.3 — tricia:
sudo add-apt-repository deb http://mirrors.evowise.com/linuxmint/packages tricia
Class (stable, oldstable , and the like) can be omitted. Don’t forget about updating your APT cache:
sudo apt-get update
Manually add repositories
In addition, it is possible to add repositories to Linux Mint manually editing the file in which they are registered. To open sources.list to official sources, type the command in the terminal:
sudo nano /etc/apt/sources.list.d/official-package-repositories.list
Nano is the favorite text editor of the author, and you can use any one you want.
The repository is added similar to how it is done with the help of apt-add-repository, but here you just write the string repository settings to a file. If you need to add third party repository go to the address: /etc/apt/sources.list.d/etc/apt/sources.list.d/. In this directory in a separate file data is stored on PPA-repositories.
To add a new repository, create a file of the linux mint repositories with the extension .list:
sudo nano /etc/apt/sources.list.d/title-repository.list
Specify the actual name of the repository.
Find online https://launchpad.net the page of the repository you want to add. You will need the data in the following form:
deb http://ppa.launchpad.net/nazvanie-repozitoria/nazvanie-programmy/ubuntu bionic main
# deb-src http://ppa.launchpad.net/nazvanie-repozitoria/nazvanie-programmy/ubuntu bionic main
Copy them, paste to a file, and then save the changes. In the directory /etc/apt/sources.list.d will appear the newly created file. Third-party repository added.
Today we figured out how to add repository in Linux Mint. It’s hardly the first encountered difficulty is for the user who installed Linux Mint and wanted to install that is not in the application Manager. In conclusion, I would like to warn everyone thinking that in Linux there is no malware.
Actually not so much, as for the rest of the OS, but they are, and private repositories (PPA) — one of the ways of infection. Usually, installing a program from a little-known and unpopular sources, you run the risk of making the computer part of a botnet or “to give” personal data hackers. So, be careful and cautious in their actions.