How to Add Repositories in Linux
The installation process of any software in Linux is totally different from Windows. In Linux, the software is installed via repositories. Let us discuss some methods to add repositories to Ubuntu/Debian-based Linux.
Method 1: Using Command-line
The most recommendable method is the command line method, so let’s discuss it.
Add Repository with add-apt-repository:
Use the following commands to add launchpad PPA to your system.
$ sudo add-apt-repository ppa:Software_name/ppa
If you want to download any hosted repositories, then you can get it by providing its reference URL/
$ add-apt-repository 'deb "URL of the software to download "'
Add Repository with Files:
You have to open and edit the source list by adding the required repository path in “/etc/apt/sources.list”, by using the following command:
$ vi /etc/apt/sources.list
Method 2: Graphical (Synaptic)
Many of you prefer graphical interfaces, so for them, there is a lightweight GUI front end apt package management system Synaptic made for Debian, Ubuntu, Linux Mint, and many other Debian/Ubuntu-based distributions.
Install Synaptic using the following command:
$ sudo apt install synaptic
After you are done with the installation, start synaptic as root user else you can’t perform anything properly
$ sudo synaptic
Now you can do everything you want according to your requirement. For managing the repository go to settings and choose a repository, you will be taken the following window: