CONTINUED

The Linux kernel

The Linux kernel comes in many different varieties. To begin with there are different versions. The most common versions these days are derivatives of version 2.4 and version 2.6. We recommend selecting a distribution that uses the 2.6 kernel due to its expanded hardware support, better performance, and the fact that it is much easier to build, configure and use.

A simple naming scheme is set up to help determine what kind of kernel you may be using: even numbers delineate ``stable'' or well-tested kernel versions, and odd numbers delineate ``unstable'' or development kernel versions. The 2.7 kernel, for instance, will be the development kernel that attempts to introduce major revisions and technological features to the 2.6 kernel. When it's complete it will be renamed 2.8 and be released as ``stable'' after sufficient testing.

If a kernel needs specific support for a new kind of hardware, or if a security flaw or bug is discovered, a ``patch'' is released to fix it. Each major patch increments the kernel version's number, so you'll always want the highest number in the stable series that you can get. For example the 2.6.11 kernel is a better choice than the 2.6.4 kernel.

Within the versions there are different flavors of the Linux kernel. The standard kernel is known as the Vanilla kernel. This is the ``safe'' kernel with all of the customary modules, settings, and options. The mm-patches kernel contains experimental changes and additions applied by 2.6 kernel maintainer Andrew Morton, and ac-patches contains kernel developer Alan Cox' experimental changes. Beyond these examples, every major distribution has its own custom kernel, tailored for its own goals and user base.

How will you know which one to choose? The kernel that comes with your distribution is a good kernel to start with. When you become more proficient in the use and configuration of GNU/Linux then you might get some enjoyment out of experimenting with other kernels. One of the advantages of using GNU/Linux is that you can change kernels without changing anything else in your operating system other than updating some of the configuration files. An example of editing and compiling the kernel can be found in Appendix B.

The GNU/Linux file structure

The Unix directory structure, which applies to Unix, BSD, GNU/Linux and all other *NIX operating systems, is rather archaic but based on the POSIX specification and conforms to a standard that all such operating systems use. Here is a brief description of the directory structure that is generally used by most GNU/Linux distributions:

/ (the root directory; the parent directory for all other directories)

/opt (where program files for 3rd party programs are kept)

/etc (where most configuration files are kept)

/bin (essential command binaries/executables)

/sbin (essential system binaries/executables)

/tmp (temporary files)

/lib (shared libraries and kernel modules)

/dev (device nodes for your hardware and peripherals)

/home (where program config files, settings, and personal data is stored for each user)

/root (root's home directory)

/boot (where the boot files, such as GRUB and the compiled kernel, are kept)

/mnt (symlinks to mounted drives in /dev)

/var (system logs and variable data)

/usr (global system/program files)

/proc (virtual filesystem that reflects running kernel processes)

Generally a user account does not have write permissions to any of these directories except the user's home directory. The root account has full access to all directories, however the /boot dir is not generally mounted by default in most distros. To access the /boot directory you may have to specifically mount it by using the mount command.

The Shell

Most GNU/Linux distributions use BASH (Born Again SHell) as the default shell, but there are several more that you may come across in your *NIX travels; TCSH and CSH are two examples of other shells. As mentioned earlier, the shell is the way we interface with the operating system. You type in commands and the system (hopefully) complies.

Navigating the Command Line Interface (CLI)

Files are stored in directories according to their nature and purpose. Using the command line interface is inevitable if you're going to use GNU/Linux or any other *NIX system. While you don't usually need to go to the CLI often or for very long, knowing how to use it is very important. This is how you have access to the shell and important system functions as far as your logged user privileges/permissions allow. Finding your way around the CLI means thinking in different terms if you're used to a graphical file manager. The directory structure above and the command reference below can be of some assistance when learning your way around. Here are the basic navigational functions:

To change directories, type in cd and then the directory as in this example:

cd usr

This assumes you're in the root directory or that you're trying to go to a subdirectory within the one you're in. If you need to change directories from one to another, for instance from /usr/src to /lib, then you need to put a slash before the destination directory as in the following example:

cd /lib

To list files in the directory, type ls. To find a file or a directory, type whereis and then the filename. To copy, the command is cp, and to delete, the command is rm. With this basic knowledge you can begin to learn to navigate the command line interface.