The Essential Unix/Linux Reference

The Essential Unix/Linux Reference
Unearthed by Lee Holmes

Fellow Gnomie and Sheller Lee Holmes has compiled his essential guide to Unix and Linux. Lee tells me that Chris has featured his guide in a previous Windows Daily, but that he thinks this might actually be a better target audience!

What would compel this compilation undertaking? I’ll let Lee tell you:

“My friend got a great Unix reference the other day — a $14 buy from one of those “up to 80% off” computer discount bins. No matter how hard I looked, though, I couldn’t find one worth buying second hand.

“Rather than spend the fifty bucks on a new Unix / Linux command reference, I decided to create my own: an edited and compiled version of the almighty manpages for 39 of the most used (and useful) Unix / Linux commands.”

This is, indeed, a thorough reference, available in PDF and text formats. With more than 370 pages of commands culled from the Linux man pages, Lee has pulled off a monumental task.



If I could distill my love of Linux down to one single element, it might easily be the world-wide community of users
and the open and helpful spirit that often accompanies it. The quickest path to that community is the newsgroups.
You’ll find hundreds (if not thousands) of users in the comp.os.linux newsgroups who have encountered and solved any
problem you may run up against 24/7. Like any community, the newsgroups can be boisterous, contentious and
irritating. They can also provide an immediate solution to a pressing problem.

Pan can be your doorway in Linux to that open spirited community. A newsreader loosely based on Agent and Gravity,
Pan is at once powerful and easy to use. Pan has such indispensible features as subject and text searches, replying
by email, filtering, offline storage and searching, and sortable threading. Regular expression matching, multiple
connection management and flexible keyboard bindings round out a fully advanced feature set.

If you’re an experienced newsgroup user familiar with Outlook Express or other Windows-based news readers, Pan will
be one of the easiest adjustments you’ll make in the Linux world. If you’re new to the world-wide newsgroup
community, Pan is the perfect introduction.



Shell. I’m really starting to like the sound of that word. It conjures up images of peaceful beaches, lazy snails,
reams and reams of email … a growing and knowledge-hungry community.

The reference to shell in Penguin Shell is a coy tip of the hat to the element of the Linux OS that interprets and
executes all your commands. Linux has a legacy of shells almost as rich as Maui or Bora Bora. While the shells found
on the beaches of either locale can only evoke memories years down the road, the shells in Linux can help make your
computer time more productive and useful.

As Linux has evolved, several shells have grown with it. Some have sprung up and faded, others remain. The most
common shell in most current Linux distributions is bash, or the Bourne Again Shell. It’s a direct descendant
of the very first shell for Linux, the Bourne shell. Most of the command line tools we’ll cover in the Penguin Shell
are intended for bash.

Aside from bash, you may also operate in the csh (C Shell), tcsh (Enhanced C Shell), ksh (Korn Shell) or zsh (Z
Shell) shells. These shells vary from bash in their programming constructs, as well as their ability to edit the
command line – a common gauge of the power of the shell. For all these derivatives, it’s widely accepted that the
bash shell is the single most powerful.

How can you tell which shell your distribution utilizes? A simple command will tell:

     echo $SHELL

This command simply instructs the shell to print to the screen (echo) the $SHELL variable.

You can also switch shells on the fly. Just enter the name of the shell you’d like to test. For many
distributions, the tcsh and bash shells are available as part of the stock install.

You choose – objects that sound like the ocean roaring in your ear, or a fundamental piece of code that executes
your every command. Yep. That’s what I thought. Geeks, indeed.

Word Completion

If you’ve been following along the past week or so, you’ve seen that Linux commands can add up to a lot of typing. What with all the options available for each command, life in the console window could easily be a quick trip up carpal tunnel lane.

Linux provides a way to circumvent that wrist and finger irritation in the form of word completion. In short, Linux is capable of finishing what you start when typing a command in a console screen. The secret to word completion in Linux is a concept called “minimal completion.” In other words, you need only type enough of a command or file name to distinguish it from other files in a directory. The magic key to word completion? The tab key. Here’s an example.

You type:    /usr/lo [tab]
You get:      /usr/local/

You type:    /home/t [tab]
You get:      /home/tony/

Once the shell works its word completion hoodoo, all you need to do is press enter to move to the directory or execute the command.

Another interesting feature of word completion in the bash shell is the ability to list all files with a spelling similar to what you’ve typed. Again, the magic lies in the tab key. For this list, simply press the tab key twice. Here’s an example:

You type:    /usr/l [tab] [tab]
You get:      lib    local

Tabbing twice lists all the subdirectories of /usr that begin with the letter l.

See? Linux can even save you from repetitive stress disorder.

So, I’m working away today….

So, I’m working away today, sharply focused on pulling together a wiring harness. The radio was close by, but NPR was fading into the background noise of hammers nailing crates closed, the fork truck moving assorted sheets of 3/8″ aluminum and a drill press drilling holes. As I fumbled with a 20-pin Molex plug, I heard a quiet sound behind me, so different from the others that it stopped me at my work table.

In the primary work area where I install and configure our Linux systems and do all the electrical work, we have a rack of 5 computers with a Quantum tape backup unit. These computers are half of what it will take to control our telescope in Japan. The other 5 are … well … Windows boxes. A few months ago, pressed for time and manpower, we outsourced the heavy-lifting type coding for archiving to the Quantum images produced by the telescope. A small firm in Atlanta took the job, and have been very diligent in working on the project remotely.

The Quantum is actually a tape backup library containing 24 tapes, each with gobs o’ gigs capacity. A mechanism inside changes the tapes when they’re full and reads a barcode on the tape to index the contents. Fun stuff.

So here I sit, in Iowa City, Iowa, at 2:45 in the afternoon, when this strange and quiet noise disrupts my wiring. I stood up and looked around, following the sound as best I could. When I stopped in front of the computer rack, I realized it was the Quantum, tape changer whirring away, running by remote from Atlanta. With utter geek glee, I dropped to the keyboard of the main computer, opened a console window and entered “users.” Sure enough, there was our Atlanta developer logged in and working.

Even though computers and networks put food on my table, I’m sometimes still amazed by the tasks we can accomplish with technology and by the ability to do it all remotely. A small moment, I know, but the sound of that running tape drive reminded me that only 20 years ago (when I was half my age!), operating that machine remotely would have been a much, much bigger accomplishment. Today? No big deal.

It’s a pretty cool world, indeed – one that still occasionally fills me with remote amazement.


Linux Newbie
Unearthed by James Bailey

This site aims to safely walk the newbie Linux user through the minefield of filesystems, distributions, desktop environments, and much, much more. The format presents new items on the front page with links to “Newbieized Help Files,” Articles, Discussion, and Bookshelf. I especially liked the discussions, which are further broken down into relevant and very useful categories. is a great place to go either when you need a quick answer or are looking for some “learning time” to kill.



GMerlin is a media player for Linux, featuring both audio and video playback capabilities in one package. Additionally, GMerlin comes with an MP3 encoder, visualization plugins, and the capability to create animations using blender.

This is a pretty sizeable download (4352 Kb) but the program does what it sets out to do quite well. All third-party packages are included in the tarball, as promised by the author, so no additional libraries or programs are necessary. I did notice the occasional hiccup on my 500 Mhz Celeron, but nothing that dissuaded me from keeping GMerlin as a favorite audio and video player for Linux.

Set your freeware free. Share it.

Reading Partitions

Reading Partitions

If you’ve been a bit intimidated by Linux’s rather cryptic command set, you’re not alone. However, if
you’ve used DOS commands in Windows, you might be surprised to find a few commands in Linux that are
similar to those in DOS. One of those commands is fdisk.

Like the DOS version, fdisk in Linux is, fundamentally, a partitioning tool. Rich with command options,
fdisk allows the root user (remember – prudence) to view, modify, create, and delete partitions on a
hard drive with relative ease and complete control.

That said, most Linux distributions handle partitioning in a much easier fashion. There are several fine
graphical partitioning tools built into the install process of RedHat, Mandrake, Suse, and Caldera. With
such strong programs utilized during install, partition changes are seldom necessary for a normal Linux

Fdisk does have some value as an addition to a process I wrote about last week – mounting Windows
partitions in Linux. When used as root (with prudence!) with the -l option, fdisk will list every
partition on every hard drive, along with the partition types and sizes. This is incredibly useful when
attempting to mount a Windows partition other than C:. By way of example, here’s the output on my
machine from the /bin/fdisk -l command:

/dev/hda2 1015486530933157+fWin95
Ext’d (LBA)
/dev/hda3 822949102816083Linux
/dev/hda4 9501014522112+82Linux
/dev/hda5 101523111041812183Linux
/dev/hda6 2312486520514973+bWin95

As you can see, Linux fdisk displays the device name in the left column, boot, geometry and system id
information in columns 2-6, and the system type in column 7. You’ll notice that Win32 partitions are
referred to as Win95 FAT32. You’ll also notice that the extended Windows partition is listed as
/dev/hda2 ([h]ard [d]rive [a], [2]nd partition). This numbering convention has been known to confuse new
Linux users – myself included! My D: partition is actually listed as /dev/hda6, because it’s located
behind the C:, Win Extended, Linux /boot, Linux Swap, and Linux / partitions. So, if I wanted to mount
my D: partition, I’d issue the following command (assuming I’ve already created a mount point called

    mount -t vfat /dev/hda6 /mnt/wind

And there you have it – a new tool with an old name to help you read your Windows partitions in Linux.

And, by the way – using root to fdisk with the -l option is pretty safe. The option actually tells
fdisk to print the partition information to the screen and exit!

Using RPMs

Using RPMs

I was thrilled when Internet Explorer added the “Open” option at the end of file downloads. It meant
only a couple less steps in the download and install process, but a couple fewer steps for each
download over the course of a month or year is a lot of steps and time saved.

Linux offers a way to save download and install steps, as well. Though still not quite as short as
choosing the “Open” option in IE, RPM files represent a significant time savings over the .tar.gz
process we talked about last week.

“RPM” stands for RedHat Package Manager. And while RedHat perfected the process, the most commonly-used
Linux distributions now utilize an RPM-style system. Installing an RPM file is as simple as executing
the RPM command, with some options, on a file.

    rpm -i somefile.rpm

Executing this command from within the directory containing the RPM file will install the file and any
necessary libraries, and add the path to the program to the environment variable. That last means
that you should only have to enter the name of the program (rather than the full path to the program)
for the system to know where to find it.

Useful options for RPM include:

    U     Update an existing package
    i      install the package whose name follows
    v     install in verbose mode, showing the
    e     uninstall the package whose name follows

Not sure what packages are installed on your system? Both KDE and Gnome Desktop Environments offer
graphical package managers.

Crazy Long Weekend

This was a crazy, crazy long weekend. I
worked, putting in 14 hours on Saturday and another 6 on Sunday. We’ve got four telescopes that need to
be finished and ready for delivery by the end of November. If you’ve seen the webcam shots, you already know that these
are not just your average backyard telescopes. The telescope pictured in today’s shot is now, thanks
to our Saturday efforts, nestled into 13 crates, awaiting shipment to Japan. The telescopes, by the way, are controlled by
computers running RedHat 6.2 – a testament to the wide-ranging capabilities of my favorite OS.

That was Saturday’s work. Sunday found me twisting an allen wrench on one of two other telescopes
headed to Spain in January. My wrist is tired, but the
effort to finish these telescopes for some great customers makes the minimal pain easily worthwhile.

I’ve been completely impressed by the amount of email you guys can generate. It’s phenomenal! I’ve been
an email junkie since day one on the
Internet and you’ve rocketed me into email heaven. This level of email takes an organizational skill at
least an order of magnitude higher than I’ve had in the past. And, I love responding to them as much as
I love receiving them. I try to respond to as many as I possibly can. Just know that if I haven’t
responded to *yours*, bear with me. I’m working my way through the stack.

A quick note of great system importance. More than one reader brought to my attention last week the
potential dangers of the root user in Linux. In fact, I got scolded by a couple of them for not
providing a warning about the powers of root. Justifiably, I might add. Let me ease their concerns and
rectify my omission with the following warning: be *very, very* cautious when executing commands in Linux
as the root user. In fact, avoid it wherever possible. Root has omnipotent powers in Linux and, without
great caution, you can wipe out important system files. Prudence …

I’m blocking out the Penguin Shell issues for next week, and I thought I’d give you a heads-up as to
what I’m going to be featuring. All through the week next week, the Report will delve into the mystery
of Linux distributions. Why so many? Which one is best? What’s the difference between them? Which one
should I install? I’ll be putting a few to the test this week on my home box and keeping copious notes.
Feel free to ask if you have
specific questions.

Also down the road a bit is what could be a very fun project. As you may know, I took home an HP Jornada 565 from Gnomedex. I’ve promised that I’ll convert it to Linux and report
on the process in the Penguin Shell. I’m still researching the OS options, but seem to be getting closer
to landing on a distribution. I hope to have these reports ready in December.

    – Submitted by Gold

Sense a theme in issue 2 of Penguin Shell? Maybe a shell? Console? Console shell commands? True, true and true. Consistent with those themes, is “your one-stop command line shop.” This site is rich with detail regarding the shell and writing useful shell scripts. There’s a detailed view of the directory structure, permissions, navigating through the directories, and other invaluable information about Linux in general.

Warning: prodigious and habitual use of this site can increase the risk of perpetual geekdom.


    – Submitted by stu

Imici has made quite a splash with instant message users. Unlike the “big boys,” Imici has aimed at and hit the mark of IM interoperability from its inception. It’s capable of communication with AOL, ICQ, Yahoo!, and MSN messaging programs. The interface is clean and very easy to use. New to version 3 are grouping and aliases. If your’re tired of opening three or four IM programs, or if you’re just jumping into the Linux IM fray, Imici can make your life online much less cluttered and much more enjoyable.

Useful Console

Useful Console

Since we’ve already taken a dive into the console with tar in this issue, it might be useful to pass along some other interesting and helpful console commands. These are some of my favorites:

cp [copy]

ls [list the contents of a directory in short format]

ls -l [list the contents of a directory in long format]

rm [remove]

rm -r [remove recursively]

rm -rf [remove recursively, forced (no confirmation prompts)]

uptime [displays the runtime since the last machine reboot]

clear [clears the screen]

df [displays free space on all partitions]

du [displays the used space on all partitions]

This is just a bare minimum command list. There are, literally, hundreds more in Linux. As always, these commands (and all others) are made more useful by adding options. Where’s the best place to find and understand options? Simple. Type in the word “man” followed by the command in question. This will display the built-in manual pages for each command, including all the available options.

Tarred, Not Feathered

Tarred, Not Feathered

When I was a kid, I was very influenced by my peers. In frustration at some of the stupid things I’d do for peer recognition, my mom used to ask me, “If your friends stuck their hands in a bucket of tar, would you have to do it, too?”


Tar in Linux is a different matter, though. It doesn’t smell. From what I can tell, it’s colorless, and, rather than making a mess, it can actually help clean one up.

“Tar” stand for tape archive, and is yet another throwback to the days of Unix. But the metaphor with the sticky road-covering substance is actually pretty appropriate. The purpose of the tar program in Linux is to stick (or unstick) a bunch of files into one while retaining all the original file permissions and ownership. Thus the term “tarball.” Just a big bunch of files all stuck together. The convention for creating a tar is:

    tar [options] new_file.tar files_you’re_tarring

The convention for untarring a file is surprisingly similar:

    tar [options] file_you’re_untarring

The common options for use with tar are:

    c – create an archive (tar file)
    f – specifies that the file to be acted upon is filename
    r – append the files to the end of an existing archive
    v – show the actions taken in verbose mode
    x – extract a file from an archive
    z – specifies that the tar file being created *or* extracted is compressed or in gzip format

Ok. So let’s stick this all together. To create a tar file named downloads.tar from the directory /home/tony/downloads, I’d issue the following command:

     cd /home/tony/downloads; tar cf downloads.tar *

(The asterisk is the wildcard in this case for “everything in this directory.”) This will create downloads.tar in the /home/tony/downloads/ directory.

If I wanted to also compress that file using gzip, the command would vary only a little:

    cd /home/tony/downloads; tar czf downloads.tar.gz *

Finally, we can untar and unzip that file using:

    cd /home/tony/downloads; tar f downloads.tar


    cd /home/tony/downloads; tar zxvf downloads.tar.gz

Sure beats black hands and my mom’s look of shock.

Think independently?

What a Killer Day

What a killer day. Iowa in November is normally in the 40s and 50s, cloudy, and racing headlong into the cold belly of winter. Not today. The sun was shining and the temperatures were in the 70s. I started to think maybe Chris had sent me some San Francisco weather to celebrate the first Penguin Shell.

And speaking of the first Penguin Shell – you all rock! I received more email today than in any other single day in my life, hands-down. You were cordial, congratulatory and excited by the first issue. If your feedback is any gauge, we’re on the right track by focusing on newbie tips and basic Linux functionality. Heck, we even got some old-timers to contribute some *very* useful information. Thanks for a great first day.

If the weather holds out today, I may even find myself on the road.

Tony Steidler-Dennison