Software installation

Q I'm a recent convert to Linux and I can't see how to install new software. When I read about software installation, I keep seeing instructions on compiling from source. Why can't it be as easy as installing in Windows?

A Linux is an open source system, so it's normal for software to be distributed as source code. However, that doesn't mean you need to compile the software yourself, at least not in the vast majority of cases. The Windows method is quite haphazard - you have to go trawling various websites to find program installers, and then go back to them regularly for updates. There's also a risk that you'll download an infected program, as you're using a host of websites you know little about. Linux distros use a completely different method, which is based on package managers, such as Ubuntu's Synaptic.

These use repositories - large collections of software ready to install on your computer. The package manager also handles dependencies, where one program requires another to run. For example, program A may need program B, which in turn needs library C. This is more common with Linux than Windows, since programs usually call on other programs and libraries to share the work instead of reinventing the wheel. The package managers take care of these dependencies, telling you they want A and will download and install B and C for you.

How does this work with Ubuntu in particular? Run Synaptic from the System > Administration menu and you'll see a list of all the software installed and available. It's initially sorted into sections, so you can browse for software of a particular type. If you know the name of the program you need, type it in the search box. Once you have what you need, select it and press Apply. Synaptic will then download, install and configure the software for you. It will also let you know when there are updates to your program through the Ubuntu Update Manager.

What if your program is not in Synaptic? The first step is to check the other repositories. Most distros split packages between various locations, and commercial or otherwise non-free software is often in a separate repo, so you can exclude it. There are also legal issues with distributing certain kinds of software in some countries, and Linux distros are global. So these programs, such as the CSS libraries to read encrypted DVDs, are kept in separate repositories, not in the mainstream distro. Ubuntu has Medibuntu (http://www.medibuntu.org), Mandriva has the Penguin Liberation Front (http://plf.zarb.org), SUSE has Packman (http://packman.links2linux.org) and so on. Check the websites for details of what they include and how to add them to the repository. This is a one-off task, adding a line or two to a file or GUI, after which the extra packages are always available to you.

Follow us on Identi.ca or Twitter

Username:   Password:
Create Account | About TuxRadar