Living free with Linux: Round 2

Last month, in "Living free with Linux: 2 weeks without Windows," I wrote about what life was like for a longtime Windows user trying to live with Linux. One of the main drawbacks: The difficulties I encountered when installing or updating software.

Living free with Linux: 2 weeks without Windows

Enterprise Linux? Not so fast

Loads of people responded with advice for newbies and Windows refugees on installing and updating software in Linux. I've learned a lot from them, as well as from my colleague Steven Vaughn-Nichols' blog, "Installing Linux software 101 for Windows users."

So here's what newbies need to know before installing and updating software in Linux.

One note before I begin: This article describes how to install and update software in Ubuntu 8.04. Although the advice generally applies to Linux, there may be variations for other Linux versions.

Understanding the Linux world

Because Windows has a near-monopoly on desktop operating systems, Windows users tend to think that the world revolves around them and that all operating systems operate alike. In fact, that's not the case. When it comes to installing and updating software, Linux uses a very different set of paradigms than Windows does, and if you're a longtime Windows user, as I am, you'll need to understand them before you can properly update and install software.

First, there is no single version of Linux, controlled by a single company, in the same way that there is a single version of Windows, controlled by Microsoft. Instead, there are multiple versions of Linux, called distributions, or distros for short. Ubuntu, Red Hat, Gentoo and Fedora are all examples of Linux distros.

Why is this important? Because when you install software, you need to install a version specifically written to work with your Linux distribution.

However, that may be easier than it sounds. In Linux, the way you install and update software is intimately tied to the operating system itself. As a result, in most cases, you'll be able to install software without even knowing your distribution (although it certainly helps if you run into problems). For example, it helped me to know that the file extension for Ubuntu software is .deb.

Next, you need to understand how software is distributed and installed in Linux, which is different from the way it is distributed in Windows.

In Windows, you typically install software by downloading and running a self-contained installer file. In Linux, software necessary for installation or update is stored in an online repository, which your version of Linux then contacts to perform the installation or update.

In the past, users had to muck around with command lines to install Linux software, and it's perfectly possible to do that -- if you're a glutton for punishment. And in some instances, the command line may be the only way to install the software. But in the vast majority of cases, software built directly into Linux handles all the packaging and installation details.

Now, all the files and information required to install the software are contained in a "package." A package manager, which comes with the OS, maintains a relationship with the online file repositories and does all the work of finding and/or updating software so that you don't have to go out and find software or updates yourself.

With that as a brief background, we're ready to take a look at how to find and install new software.

Installing and updating software

In my article, I described my immense frustration in trying to install a piece of software I came across on the Web. Ultimately, it required downloading a file archive, unpacking the archive and trying, through hit-and-miss methods, to figure out how to install it. I finally succeeded -- almost accidentally.

Mucking around with archives and the command line, multiple people told me, was not the way to go. Instead, it's a much better bet to use the package manager -- in my case, the Synaptic Package Manager, a built-in application for installing, updating and uninstalling software in Ubuntu. Before I explain how to use the Synaptic Package Manager, though, I need to say a little more about how Linux handles packages and repositories.

There are four different ways to get access to repositories in order to install and upgrade software in Linux. You can use the Synaptic Package Manager, use Add/Remove, use the Update Manager, or fool around with a command-line program called apt. (I won't cover apt in this piece, because it's simply too confusing for newbies; even many experienced Linux experts stay away from it.)

The Synaptic Package Manager is the most powerful of these tools. With it, you can install, remove, configure or upgrade software packages; browse, sort and search a list of programs to install; manage software repositories; or upgrade the whole system. Think of it as the Swiss Army Knife of Ubuntu program management.

Although the Synaptic Package Manager is more fully featured and offers more software to install, Add/Remove is for those who want something simple to use and don't care about the widest range of software.

If you're looking to only update your system and not looking for new software, you can use the more limited Update Manager, which only checks to see if there are newer versions of what you already have installed in the libraries.

Synaptic Package Manager

The Synaptic Package Manager includes a set of repositories through which you can search for software. You get to it by selecting System --> Administration --> Synaptic Package Manager. Click the Section button to see categories of software and then browse through what's available in the repositories. You can also do a search by clicking the Search button at the top of the page.

When you find the software you want to install, you click the box next to it, then select Mark for Installation and click Mark from the screen that appears. In some instances, the software you chose may require other software to be installed as well; if that's the case, you'll be told.

After you mark the software you want to install, you'll come to a screen that shows you all the software you've marked for installation. Click Apply at the top of the screen, and a screen appears asking if you want to "apply changes." (Linux sometimes uses the English language in a way that's only marginally associated with common usage.) Click Apply. The software will now be downloaded and installed. The Synaptic Package Manager will also install any software required to run the software you're downloading.

Want to uninstall the software? Again, it's simple to do. Run the Synaptic Package Manager, search for the software you've installed, click the box to the left of it and tell the Synaptic Package Manager to remove it. Then click Apply, and follow the same instructions for installing software. The Synaptic Package Manager takes care of the rest.

All this sounds simple, and sometimes it is. Unfortunately, though, sometimes there are glitches. For example, let's say you know of an application that you want to download that isn't listed in the Synaptic Package Manager. What do you do then?

Ideally, that application is in a repository somewhere, which just doesn't happen to be in the list of repositories in the Synaptic Package Manager. So you'll need to add the repository to the Synaptic Package Manager.

In some instances, the download page for the software will tell you which repository to use. Again, you'll need to know your Linux distribution, because different versions of the software for different distributions may be in different repositories.

To add the repository to your Package Manager, you select System > Administration --> Software Sources, select the Third-Party Software tab, and click on Add. A screen appears, asking you to enter the "APT line" of the new repository. Again, if you're lucky, the software you want to download will have the exact line you need to add on its Web page. It may look something like this:

deb http://archive.ubuntu.com/ubuntu/ hardy main

Once you add that, you should be able to download and install the software normally using the Synaptic Package Manager.

However, there will be times when you can't find the software in a repository. If you're a newbie like me, my recommendation at that point would be not to bother. Find an alternative from the plenty of other Linux applications available.

Using Add/Remove

Add/Remove offers only the most popular software, not the Synaptic Package Manager's wider selection. And you won't be able to add new repositories to it. But if you want to try it, here's now to proceed:

Select Applications --> Add/Remove, and the Add/Remove Applications screen appears. You'll find a list of categories, including Accessories, Education, Games, Graphics, Internet, Office and so on. Select the category you're interested in. You'll get a list of applications, descriptions and popularity ratings, gauged by the number of people who have downloaded it. Check the box next to any you want to install. Some of the applications may already have checks next to them -- that means that you already have the application installed.

Click Apply Changes. A notification screen appears asking if you want to "apply the change." Yes, the terminology is awkward, weird and confusing, but get over it --- this is Linux, after all.

Click Apply, and enter your system administrator password to continue. After minutes, depending on the size of the download, you'll get a notification that a new application has been installed. You'll also see the name of the program you just installed. Double-click it to run the application.

To uninstall the application, select Applications --> Add/Remove. To quickly find the application you want to remove, select Installed Applications Only from the top of the screen. You'll see a list with only the applications you've installed. Uncheck the box next to it, and follow the same directions for installing an application, and the application will be uninstalled for you.

The Update Manager

The Update Manager is best used for updating your system software, and any applications that came with your system, rather than any software you've subsequently downloaded. For that reason -- and others noted below -- I've found it confusing to use, although not all Linux users have the same issues with it that I have.

The Update Manager is accessed via the starburst at the top right-hand top of the screen. Click it, but be prepared -- you're about to be confronted with literally hundreds of potential updates with incomprehensible names and unenlightening descriptions.

Here's an example:

Alacarte

easy GNOME menu editing tool

anacron

cron-like program that doesn't go by time

app-install-data-commercial

Application installer (data files for commercial applications)

bind9-host

By default, every update has a check next to it in the Update Manager. Uncheck the boxes next to those you don't want to update -- I recommend updating only software that you recognize. To quickly uncheck the box next to every update, right-click inside the Recommended updates area and select Uncheck all.

Once all the boxes are unchecked, scroll through the Update Manager, putting checks next to the updates you want to install. When you're done, click Install Updates. A screen appears asking that you type in your password. Click OK. The Update Manager will then automatically download the updates and install them.

Or you can use either Add/Remove or the Synaptic Package Manager. They will both tell you when there are updates, although I've noticed that there tends to be a delay between the time when an update is available and when the Package Manager notes that it's available.

Problems remain

I've somewhat simplified the installation and updating process for Linux. In some important instances, I was unable to update my software using the Synaptic Package Manager or Add/Remove.

The most notable and disturbing instance of this was OpenOffice.org, the excellent Office suite I use in Linux. The version that came with Ubuntu 8.4 was OpenOffice.org 2.4, even though OpenOffice.org 3.0 was available at the time I installed Ubuntu. But OpenOffice.org 3.0 doesn't show up in either the Synaptics Package Manager or Add/Remove as an option, even several months after OpenOffice.org 3.0 was made available. There appears to be no way to update it using either of those methods.

In my earlier article, I described my attempt to update it by downloading the file directly and using the command line -- and ultimately, I was unsuccessful. I wouldn't suggest that the fainthearted attempt this, even if they're command-line veterans like myself.

Worse yet, I use Version 8.04 of Ubuntu, and Version 8.10 is available, but I can't find a way to upgrade to it. The Update Manager, Synaptics Package Manager and Add/Remove don't seem to have a way to do the upgrade, and don't even tell me that it's available.

That's because, I discovered, 8.04 is what's called a Long Term Support (LTS) release, but 8.10 isn't, and by default, the Ubuntu Update Manager won't tell you about releases that are not LTS. And in the Linux world, version numbers serve a different purpose than they do in the Windows world. I'm told that the difference between a Version 8.04 and an 8.10 is like the difference between XP and Vista -- and after all, one wouldn't expect to be able to upgrade directly from XP to Vista via Windows Update, right?

The upshot: Installing and updating software in Linux is not as difficult as my earlier article implied. However, it can still be problematic, as my difficulties in updating OpenOffice.org show. Still, as I learned, most of the time you'll eventually be able to get what you want out of Linux -- even if you need Round 2 to get you there.

This story, "Living free with Linux: Round 2" was originally published by Computerworld.

Join the Network World communities on Facebook and LinkedIn to comment on topics that are top of mind.

Copyright © 2009 IDG Communications, Inc.

SD-WAN buyers guide: Key questions to ask vendors (and yourself)