Red Hat Linux Unleashed rhl01.htm

Previous Page TOC Next Page



1


Introduction to Linux


Welcome to Linux.

This book is about Linux, a clone of the UNIX operating system that runs on machines with an Intel 80386 processor or better, as well as Intel-compatible CPUs, such as AMD and Cyrix.

This first chapter introduces you to the major features of Linux and helps get you acquainted with them. It does not go into great detail or cover any advanced topics, as this is done in later chapters. Instead, it is intended to give you a head start in understanding what Linux is, what Linux offers you, and what you need to run it.

Don't be afraid to experiment. The system won't bite you. You can't destroy anything by working on it. UNIX has some amount of security built in, to prevent "normal" users (the role you will now assume) from damaging files that are essential to the system. The absolute worst thing that can happen is that you'll delete all of your files and have to go back and reinstall the system. So, at this point, you have nothing to lose.

One word of caution when reading this chapter: At times it will delve into topics that may seem very alien to you, especially if you are new to UNIX and Linux. Don't despair. As you go through this book, you will become more and more familiar with the topics introduced here. Linux is not an easy system to pick up in one day, so don't try to do it. There is no substitute for experience, so relax and learn Linux at your own pace.

What This Book Is Not


This book makes several assumptions about you, the reader. I hope we can safely assume that you have some working knowledge of PCs and Microsoft's Disk Operating System (MS-DOS). (In some Linux documentation, MS-DOS is also referred to as "messy DOS," but I'll let you be the judge of that!) If you are not familiar with DOS or computers in general, now would be a good time to pick up a book to introduce yourself to PCs. Even so, you should be able to follow this book without needing any extra material.

Some readers of this book will be familiar with UNIX. If that's the case, a lot of the early material will be familiar to you, especially when we talk about the shells. If you are new to UNIX, don't be concerned: This book was written with you in mind and should guide you through your early hesitant sessions at the console and show you everything you need to know. Pretty soon, you'll be an expert! Now, let's get started with Linux.

What Is Linux?


Linux is a free, UNIX work-alike designed for Intel processors on PC architecture machines. Linux is not UNIX, as UNIX is a copyrighted piece of software that demands license fees when any part of its source code is used. Linux was written from scratch to avoid license fees entirely, although the operation of the Linux operating system is based entirely on UNIX. It shares UNIX's command set and look-and-feel, so if you know either UNIX or Linux, you know the other, too.

Linux supports a wide range of software, from TeX (a text formatting language) to X (a graphical user interface) to the GNU C/C++ compilers to TCP/IP networking. Linux is also compliant with the POSIX.1 standard, so porting applications between Linux and UNIX systems is a snap.

New users of UNIX and Linux may be a bit intimidated by the size and apparent complexity of the system before them. There are many good books on using UNIX out there, for all levels of expertise ranging from novice to expert. However, few (if any) of these books cover, specifically, the topic of using Linux. Although 95 percent of using Linux is exactly like using other UNIX systems, the most straightforward way to get going on your new system is with a book tailored for Linux (such as this one, amazingly enough!).

How to Pronounce Linux


Pronouncing the word Linux is one of the great controversies of the Linux world. Americans pronounce the proper name Linus with a long i sound, as in style. However, because Linux was originally based on a small, PC-based implementation of UNIX called Minix (pronounced with a short i), the actual pronunciation of Linux preserves this characteristic: It's officially pronounced "LIH nucks."

Linux Versus UNIX


UNIX is a trademark of X/Open. Linux is not a trademark, and has no connection to the trademark UNIX or X/Open.

UNIX is one of the most popular operating systems worldwide because of its large support base and distribution. It was originally developed as a multitasking system for minicomputers and mainframes in the mid-1970s, but it has since grown to become one of the most widely used operating systems anywhere, despite its sometimes confusing interface and lack of central standardization.

UNIX is a multitasking, multiuser operating system. This means that there can be many people using one computer at the same time, running many different applications. (This differs from MS-DOS, where only one person can use the system at any one time.)

Under UNIX, for users to identify themselves to the system, they must log in, which entails two steps: Entering your login name (the name by which the system identifies you), and entering your password, which is your personal secret key to logging in to your account. Because only you know your password, no one else can log in to the system under your username.

In addition, each UNIX system has a hostname assigned to it. It is this hostname that gives your machine a name, gives it character, class, and charm. The hostname is used to identify individual machines on a network, but even if your machine isn't networked, it should have a hostname.

Versions of UNIX exist for many systems, ranging from personal computers to supercomputers. Most versions of UNIX for personal computers are quite expensive and cumbersome. Where does Linux fit in? Well, Linux is free (solves the expensive part), very powerful, and easy to install and maintain by an individual (so much for the cumbersome part).

What Do I Get with a Linux System?


Linux is a freely distributable version of UNIX developed primarily by Linus Torvalds at the University of Helsinki in Finland. Linux was further developed with the help of many UNIX programmers and wizards across the Internet, allowing anyone with enough know-how and gumption to hack a custom UNIX kernel the ability to develop and change the system.

UNIX and its clones have long been perceived as large, resource-hungry, disk-devouring systems. Linux is not such a beast. It is small, fast, and flexible.

Linux has been publicly available since around November of 1991. v0.10 went out in November of 1991, v0.11 in December of 1991. There are very few small bugs now, and in its current state Linux is mostly useful for people who are willing to port code and write new code. Because Linux is very close to a reliable and stable system, Linus decided that v0.13 will be known as v0.95.

So what are some of the important features of Linux that make it so unique? Here are a few:

Arguably, the most important advantage of using Linux is that you get to work with an honest-to-goodness kernel. All of the kernel source code is available for Linux, and you have the ability to modify it to suit your needs. Looking at the kernel code is an educational experience in itself.

Undoubtedly, the development of Linux has been so rapid because of the availability of the source code. Also, with an ever-expanding group of hackers who want to get their hands dirty with their own system, Linux has grown steadily into the fully packed operating system that it is today.



Linux uses the Intel 80386 chip's protected mode-functions extensively, and is a true 32-bit operating system. CPUs before the 80386 will not run Linux as they lack protected modes.


The Downside of Linux and the Reason for This Book


Linux is a hacker's project, written by a multitude of gifted programmers for the sheer joy of programming and sharing the code. This hacker attitude can be a daunting experience for someone not familiar with UNIX, and its side effects are sometimes noticed quite easily (such as a lack of documentation, obtuse commands, and dependencies on other programs that are not clear). Luckily, there is little problem with stable Linux software because it has been worked on by many people; it's the early releases of new software that tend to show these holes.

Help with Linux is generally not a phone call away as it is with a commercial version of UNIX. You can get help from the Internet newsgroups and other members of the Linux community via e-mail. However, when it's midnight and your system just won't boot like the README file said it would, you do feel a sense of despair.

There is a huge distinction between commercial versions of UNIX and Linux: Commercial versions of UNIX are designed for customers and will work out of the box, whereas Linux is not guaranteed to work at all on your system. You are indeed on your own.

Actually, the only problem for new users is a lack of basic UNIX system-administrative knowledge. Setting up and running your own UNIX system is something most UNIX users never get to do, even after years of experience. Yes, you get to do it yourself, but it ain't that easy. You might actually consider being nice to your local UNIX system administrator after installing Linux for the first time.

Here are some other parts of Linux that you should be warned about:

Even with standard Linux distributions, there are sometimes little quirks that need to be fixed by hand in order for everything to work correctly. If you have previous UNIX experience, it should be easy to find these problems. However, if you're new to UNIX, it would serve you well to read up on using and running a UNIX system before you dive in.

To reiterate, Linux isn't for everyone. Many users can get in over their heads when starting with Linux. To keep your head above water, I strongly encourage you to find a good book on using UNIX system administration.

About Linux's Copyright


Ah, yes—that old topic of copyrights. Compared to death and taxes, Linux copyrights are a mere annoyance.

Actually, Linux is copyrighted under the GNU General Public License, sometimes called the GPL or copyleft. (Note the left instead of right.) This copyleft license was developed by the Free Software Foundation to enable programmers to write "free software," where "free" refers to freedom, not just cost. The GPL provides for the protection of such free software in a number of ways:



Also, if you sell the software, you have to be able to provide at no cost the full source code so that others can modify the software and resell it if they wish. You cannot hold back the source of your modifications.

The original authors of the Linux software may never see a dime of these revenues. This is allowed by the GNU GPL because the point of free software isn't to make money. This is simply an understanding between the authors of the software and those using or selling it.

One other thing: Free software, as covered by the GNU GPL (which includes Linux), comes with absolutely no warranty. However, individual vendors may provide support for the software, which usually includes a warranty. Unless you purchased such support, the assumption is that the software comes with no such warranty, and if you use a piece of free software that goes haywire and wipes everything on your system, neither the authors nor those who distributed the software to you are liable.

Free software as covered by the GPL is not shareware, nor is it in the public domain. Neither of these terms correctly describes what free software really is. The complete GNU GPL is printed in Appendix E, "Copyright Information." To sum it all up, you can freely distribute Linux as much as you like, and you can even modify it and distribute your own version of Linux. But in doing so, you can't take away those rights from others. In short, you must attribute the original authors of the work.



Please note that there are absolutely no warranties with any of the software you get with Linux. If an application goes awry and wipes your disk, you have no one's neck to wring. Unless someone explicitly gives you a warranty in writing on their software, do not assume any warranty whatsoever for anything other than what is explicitly written in the warranties.


Hardware Requirements


Now that you know a little about the good and bad points of Linux, let's see what's required in terms of hardware.

Unlike some other versions of UNIX for the PC, Linux is very small. You can run an entire system from a single, high-density 5.25-inch floppy. However, to run a complete Linux system, there are other hardware requirements.

Linux, by its very nature, is continuously expanding, and more features are added every day. However, hardware compatibility is limited to that hardware the developers themselves have access to. For instance, if none of the Linux developers has access to the WhizBang Slice-O-Matic T3222 Ethernet card from a no-name manufacturer, then chances are it isn't supported.

On the other hand, there are many generic drivers for hardware, such as the IDE disk driver, which should work with all IDE hard drives and adapters regardless of manufacturer. Of course, the developers of the drivers couldn't test their software against every IDE device on the market, so they assume the IDE standards are followed by manufacturers. If a device doesn't work, it's probably because the manufacturer deviated from the standards, or added features the generic drivers can't handle.

A good place to look on the CD-ROM is in the /docs/howto directory for the Hardware-HOWTO file. This file will list a lot of the supported hardware for Linux.

If your favorite peripheral isn't supported by Linux, all that's required is to write a kernel driver for it. This may be easy or difficult, depending on the hardware and the technical specifications that are available. For example, some hardware developers prefer to write their own drivers for MS-DOS and Windows, and not release specifications for third parties to write their own. Therefore, writing drivers for Linux will be difficult, if not impossible.

The following is a rough guideline of some hardware requirements for Linux. You do not have to follow them directly, but this list should give you a rough idea of what's required:



If you're in the market for a new system, you should heed the following recommendations.



MicroChannel architecture (MCA) machines, such as the IBM PS/2 line, are not currently supported.


Other Hardware Requirements


Linux will also run on a number of laptop machines (some laptops use certain software interrupts to power the memory, and Linux doesn't work well with these systems to date). The best way to find out if Linux will run on your hardware is just to try it out.



At the time of writing, Linux doesn't run on an IBM PS/2 computer. Stay tuned to the Internet for details.

There are other hardware drivers currently under development for Linux. To use these drivers, however, you usually have to patch them into your kernel code, which assumes that you already have a running Linux system (a kind of chicken-and-egg problem if you have not already installed Linux). In such cases, you can install whatever Linux you happen to have and then apply the patches with the Linux patch command.

Then there is the issue of tape drives for Linux. There is a working QIC-02 device driver for Linux, supporting Everex/Wangtek cards. There are additional patches for the QIC-02 to support Archive SC402/499R. You can find them in /pub/linux/alpha/qic-02 directory at tsx-11.mit.edu server. (There have been reports of some bugs in the driver, but you can back up and restore.)

Most of the newer tape drivers are all for SCSI drives, so if you have a SCSI tape drive, chances are that it is supported.

Special Requirements for X


Your 4MB of RAM will make X run very slowly. You should have at least 8MB of RAM for running programs in X. You will need another 6MB to 10MB of disk space for the GCC compiler in addition to X if you want to develop applications for X.



Do not try to bring up an Xserver that does not support your hardware. There have been cases where damage has resulted from pushing the monitor (especially fixed-frequency monitors) beyond its capabilities.

As far as mice go, Linux supports both serial and Bus varieties. For the serial mice, you can use Logitech, Microsoft, MouseSystems, or compatibles. The following Bus mice are known to work: Logitech, Microsoft, ATI_XL, and PS/2 (aux).

There you have it, a brief introduction to an operating system that could very well change the way you program. Now for getting yourself ready for Linux.

Before You Get Started


Assuming that you have hardware compatible with Linux, obtaining and installing the system is not difficult. But be prepared to be a bit frustrated at first, if you are new to UNIX or Linux. The two best defenses against frustration with using Linux are the following:

  1. Get organized.

  2. Educate yourself about Linux and UNIX.



Experience with my bad memory has forced me to keep an indexed log of all the bugs, quirks, and symptoms in Linux. I have a dog-eared notebook of all the weird features of Linux.


Summary


In this chapter we learned about Linux and some of its more prominent features:

It's best to check the Linux Hardware Compatibility List on the CD-ROM before starting your installation process or buying anything for your PC.

Previous Page Page Top TOC Next Page