Linux Migration for the Home PC User, Part 4

By Ed Hurst | Posted at 6:06 AM

In three parts (Part 1, Part 2 and Part 3) so far, Ed Hurst has worked through using CentOS as a home computer operating system. Now he dives deeper to look at important administrative tasks and how one performs them.

At this point, what you have is useful for most ordinary computer tasks. That includes a web browser, an email program, an office suite, and handful of other goodies. Yet, because Linux is fundamentally not a commercial product, there are some things missing which you might expect on a PC. As things stand, you may not have any games, you won't be able to watch any videos, flash animations will not display, and a lot of music files may not play. Getting those things to work will require the stronger do-it-yourself instincts. Thousands of people do it every day with Linux, but most of them are fairly serious Linux hobbyists, not average SOHO users, and especially not typical home PC users. What makes this a little more challenging is CentOS does not make it easy, because Red Hat doesn't make it easy for their corporate clients. They don't prevent you from doing it, but it's not a simple point-n-click operation.

If you want those things to work on your CentOS computer, you will have to dive into some technical competencies most Windows users can't imagine. If you just cannot do it, but need them, you'll have to get someone competent in Linux to set it up for you. If you are inclined to accept a little adventure in technology, it quickly becomes rather easy.

First, let's take a moment to understand the basic concepts. You may know in Windows Land, it's pretty simple for someone to create a package for PCs because it's all pretty much one thing. There are different versions of Windows, but a lot of software can be made to work on just about any version in a single package. That's because Windows is a commercial product from one big corporation. What if several companies were allowed to make their own versions of Windows? They might all be a little different. A piece of software for one might not work on another. Lots of consumer hardware products are like that, and Linux software is like that. Indeed, you pretty much have to find a specific software package to match your specific type/brand of Linux, and then to match the specific version you are running. If no one makes a package for what you run, you have to build it yourself. We may yet do that, but not right away. It's our good fortune most of what we could want is made by someone who uses CentOS, or at least is made for Red Hat's EL5 (almost identical to CentOS 5), and we can use them.

Still, most of those things are not one big single package to cover everything. Instead, we have to figure a way to get all the little bits and pieces of software together, everything each item needs to work, so the things you actually want to use will work. You may have heard of the Windows “DLL hell” — trying to get the proper collection of DLL files (reference libraries for software) to make things work properly. Linux isn't really all the different, but we need to activate some procedures which do all that mixing and matching for us. So instead of plunging you into the full-blown Linux hobby user's world, we are just going to do that little bit necessary to get past this one problem of missing entertainment software. The nice part is, we only have to work through the gritty details just once.

You may recall, during installation, we talked about package groups. I advised you to save some time and simply choose the GNOME Desktop. That was a lot of little packages. At about the same point, we also set up something called “repositories” — a fancy word which means a storage place on the Internet where packages are collected. All the software we installed from the DVD is matched by a collection in some repositories, which are “mirrored” all over the world. Used to be, you had to choose one yourself, but nowadays the package management software we will use does it automatically. All we have to do is tell it to add certain other repositories not included from the start. If you really want to see all the gory details, go the CentOS Wiki page on Repositories. We are going to focus on just one item from what is listed there, which should give us all the most popular multimedia software.

To do this requires you use what we call “the command-line” at least a couple of times — that little window with no icons, just a blank space where you type stuff and hit the ENTER key a lot. I'll try to keep it as simple as I can, but feel free to post questions in the comments section below.

After you have logged into your CentOS computer, and wait for the desktop to finish loading, I want you to find the Linux version of the old Windows “Start” button — in the upper left-hand corner of your screen, on the gray colored bar, you'll see the CentOS icon and the word “Applications”. Click that, and a menu drops down; select “Accessories”. Slide down to the word “Terminal” and click that. The menu will disappear, and you'll see a window open up, with a frame, a menu bar across the top, and a big white space. In that space will be some black characters displaying your user name, an “@” symbol, and something which amounts to the name of your computer. There will be some other symbols, followed by a “$”. There should be a vertical bar (called a “cursor”) flashing there. That is all called “the prompt”. That last symbol is an obscure reminder you are a regular user. If you start typing, the letters will appear under that cursor as it moves to the right.

What to type? First, we have to gain administrator rights to the machine, because we have to change some things which users should not normally be able to do. In Linux, most commands are quite simple, often two letters which abbreviate things some of Linux people don't even remember any more. However, we are going to use the command which means “switch to another account” — su — followed by the account to which we want to shift — root. It looks like this:

su root

Type that, and hit ENTER. The cursor will jump down to the next line and respond with Password:. Now, in this one example alone, nothing you type after that will be visible. Try to picture yourself in a place where folks might sneak a look over your shoulder and “steal” your password for the root account. So you won't see it, and you'll have to be careful to type the password, with all the proper letters, capitals, numbers and punctuation, blindly. It may take some practice, but this is the only place it will happen to you. If you do it right, the prompt will change; the $ gets replaced with a # to tell you that's the root account.

Don't be deathly afraid, but be cautious, because typing one letter wrong can cause some trouble. Let's do a couple of things to get used to the feel of how it works. In fact, let's do some things we have to do anyway. Let's tell our computer we want it to check to make sure all the software we have is up to date. Some of these commands will appear silly, and they should, because Linux people do have a sense of humor. In Red Hat/CentOS Land we have our favorite command for changing software. That command is yum followed by some specific instructions. It's a lot like talking to a three-year-old kid. Be very specific, and keep it simple. Type:

yum update

As always, hit ENTER and watch what happens. It should report back to you several lines, showing it's checking some places out there on the Internet to see if it can find any newer versions of what you already have from the repositories. Chances are, it will come back with a list of things to update. Right now, it's not critical you learn too much about reading all the details, just notice whether it offers a list of stuff to replace, and wants you to type “Y” (yes) or “N” (no). I can't think of any reason to say “no”, so hit the “Y” key. It should then report back several lines indicating it has checked out the dependencies, grabs the packages, installs them, and cleans up.

On the other hand, if it tells you there's nothing to upgrade, that's fine, too. Congratulations! You have just performed your first administrative task. Breathe a big sigh of relief. We are half-way there on getting the multimedia stuff added. That comes in the next part of this series. For now, type the word exit and hit ENTER to close your root access for the time being. You should now see the original prompt.

Ed Hurst is Associate Editor of Open for Business.