This tutorial have describes two methods to configure Apt repository on your Ubuntu & Debian systems. The first method uses the add-apt-repository command to configure the repository for you. You can also use symlink command apt-add-repository. In any case, the command doesn’t exists on your system. The tutorial add-apt-repository command not found will help you.
Method 1 – Add Repository with add-apt-repository
Use the add-apt-repository (or symlink apt-add-repository) command to add launchpad PPA to your system. You just need to provide launchpad reference address as the following command.
sudo add-apt-repository ppa:libreoffice/ppa
You can fixed error add-apt-repository command not found if occurred.
For other hosted repositories, can be also configured by providing its reference as below:
add-apt-repository 'deb http://archive.getdeb.net/ubuntu wily-getdeb games'
Method 2 – Add Repository with Files
You can just create a file in /etc/apt/sources.list.d directory. The file name must end with .list extension. The apt package manager also read repository configuration files from here.
Add the repository paths as below.
deb http://archive.getdeb.net/ubuntu wily-getdeb games
Its good to use one repository per file but you can add multiple repository references in a single file as much as required.