Most Linux distributions that are aimed at average users have a package management tool. RedHat and Fedora have RPM, Debian/Ubuntu/Mint has APT, Arch has Pacman and so on. Each of them essentially do the same thing — keep track of what is installed, lets you install and remove software as well as prompt you to update the installed software whenever necessary. Choosing one to have a detailed look at, it would be APT package management in Ubuntu. So here we go:
There are tons of software application and tools available in Linux. There has to be a way to organise them somehow. Repositories do that. Repositories are like archives of software that runs on your computer. In Ubuntu world, repositories are classified into 4 categories – Main, Restricted, Universe and Multiverse. This categorization is based different levels of support. Main – contains software that is officially supported, Restricted – has software that is supported but is not available under a free (doesn’t refer to cost, but the license) license, Universe – contains software that is not officially supported but is maintained by the Linux Community, Multiverse – houses software that is not free.
Configure Software Sources
Now, all of the repositories are not enabled by default on every Ubuntu installation. There are a number of reasons why it is this way, reasons like the ones that don’t allow Ubuntu to ship with codecs and drivers out of the box. Anyhow, enabling repositories is very easy. Go to System > Administration > Software Sources and then you can simply check/uncheck to enable/disable repositories.
Install/Remove Software and Package Management in Ubuntu
The recent versions of Ubuntu include what is called the “Ubuntu Software Center” that lets you install and remove software as easy as installing applications from your iPhone App Store. The choices however, are limited. If you can find what you want in the Ubuntu Software Center, by all means go ahead and install if from there. It is the easiest way to do so. For a little more control, and what used to be the easiest way 6 months back, you can look up the Synaptic Package Manager.
It can be accessed via System > Administration > Synaptic Package Manager. The default view will list categories on the left side and clicking on any one of them shows you the packages on the right hand side. You can also use the search functionality to find what you need. Once you have the required package in sight, just check it and Synaptic will take care of the dependencies for you. Then click Apply and you will be shown an overview of what all will be changed on your computer. Accept or Cancel as the case may be.
Configuring “Other Software” or PPAs
It takes some time and backing up before a software can make into the repositories. This however is the age of the Internet and we don’t want to wait all that time. So how can you install software that is not in the repositories? Keep in mind that Google Picasa, Google Earth, Chrome are not available via repositories. Likes of Banshee and Gwibber were not in the repositories till some time back.
In that case, you need to use what’s called Personal Package Archives. There is nothing new or scary about these puppies. We have used them a number of times in the past when we installed latest software that was not available via the repositories. Once you add the PPA for your favorite software, you will get automatic updates and bug fixes for the software just like you would get for any software in the repositories. To add a PPA:
Visit the PPA page of the software (An example). It houses the important details that you would need in the following steps.
Go to System > Administration > Software Sources, then onto the Other Software tab.
Click on the Add button and then paste in the line that starts with deb and corresponds to your Ubuntu version. Karmic users would enter in a line that looks like :
deb http://<something, something, something> karmic main
Click Add source and you are done. Click Close and Ubuntu will reload package information.
PPAs generally list a OpenPGP key that is used by Package management tools to confirm the authenticity of the packages that are being installed. So once you have added the PPA, you also import the corresponding keys before you can install and use the software. Open up the terminal and issue the following command:
sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys <A number>
Where “A number” is a hexadecimal number that is listed on the PPA’s page. See the screen above.
You can now install, update and remove the software just as easily as you do with any other package from the repositories. Did you find that brief explanation helpful?
More articles about: