You've heard all the hype, and decided to find out what this "Linux" thing is all about. Or maybe you need a low cost alternative to one of the commercial operating systems. Perhaps you need an easy way to connect diverse systems and let them all communicate with each other..tomorrow.. or you'll be encouraged to "seek new employment challenges." In any case, you have a problem that needs a solution, or a curiosity that needs to be satisfied. Well, you have come to the right place. Join me as we take a journey into the exciting world of the Linux operating system. Please keep your hands inside the car at all times, and remain in your seat.
Linux is a freely distributable version of Unix developed by Linus Torvalds and thousands of other programmers scattered all over the world. What started as a hacker's system, designed primarily for the technically adept, has now evolved in to a viable, stable operating system with a robust set of applications and tools making it suitable for both personal and mission critical commercial use.
In just the past six months Linux growth has undergone an exponential expansion. Every day Linux gains more and more press and exposure. Many commercial vendors are announcing support, or ports of their products to the Linux operating system. I saw just the other day that Oracle and Informix, both major players in the Unix database world, have ports to Linux underway.
This is incredibly significant, not just to the techno-geeks (yes, that's me) but to the entire spectrum of computer users. One of the benchmarks of the commercial viability of any product is the support of the application vendors.
While it's great fun for me to write my own programs and applications, most people just need to get some work done, on time, as easily as possible. Or perhaps you want to surf the net for entertainment, or playing games. Without the "killer apps", an operating system is doomed commercially.
What this all means to you is never before has there been an operating system, with a robust set of applications and development tools, available for little or no cost, other than the "sweat equity" required to learn to use it effectively.
An additional point to consider is that as you progress in your Linux education you are also increasing your skill level and, ultimately, your worth in the marketplace.
One of the strengths of Linux is that you have the power to choose the depth of knowledge required to accomplish your tasks. Want to just bang out a document or two, or play games? You can. Want to surf the Internet and exchange e-mail with your friends and coworker's? No problem. Want to learn to program in a variety of different languages? Go ahead.
The point here is Linux can do all these things, and much more. Additionally, with Linux, you are not required to fork over more money for each function you want to add.
While this was the case at one time, here and now, in 1998, it's simply not true. Major advancements have been made in the installation and configuration process, and in most cases Linux is no more difficult to install than any other operating system. With the advent of package managers, Graphical User Interfaces, and "smart" probing of your system's components, installation has become largely a moot issue.
The truth is, you could not have picked a better time to join the Linux world. Granted, once you get to networking issues, there is more to it in a Unix machine than a Windows box, but with the new configuration utilities, combined with an intuitive, easy to understand process, I firmly feel that Linux is about as easy to configure as Windows.
Luckily, there are commercial distributions of Linux available, as well as commercial support contractors who will be happy to help you out. And usually for quite a bit less than the people in Redmond, and the Linux vendors actually answer the phone. And call you back.
Now I'm going to tell you about Linux's secret weapon. Remember, those thousands of people I mentioned before? Well, there is a virtual universe, populated with people who are ready, willing, and able to help you out. You will find them on USENET, commonly called newsgroups, on Internet Relay Chat, commonly called IRC and in your local area, in the form of Linux User's Groups. As a matter of fact, this free noncommercial group of people have made such an impact on the end user community, that in an unprecedented move, Infoworld magazine named the Linux support community as a whole, as the 1997 Product of the Year!
The answer is a resounding yes! Linux will run on anything from a diskless workstation, to an XT, to the latest whizbang hardware. As a matter of fact, I've used these machines for everything from routers to web servers, from dialup servers to file servers. I currently run 2 486 66's as my backup DNS machines, each hosting multiple zones.
This is another one of Linux's strengths. The ability to take "obsolete" machines and do great things with them. This is a great low cost method for nonprofit organizations, and cost conscious organizations to squeeze extra value from "old" machines.
The one exception to this is your video subsystem. X, the Graphical User Interface , is very picky about the video cards it will and will not support. This is primarily due to the fact that many video card manufacturers are reluctant to release specification information to Linux developers.
However, support is improving every day, and there are also commercial X servers available to address these issues. The bottom line here is to try to make sure your video card is supported by X if you want to run more than VGA at 16 colors.
That said, different distributions of Linux have different hardware requirements. And of course, I don't mean to imply that you should not take advantage of a newer machine if you have access to one. I simply want to convey to you that you don't have to have a Pentium II with 256 Megs of RAM, or a 600Mhz Alpha to be able to use Linux.
As a general guideline, any 386 or better with 4MB of RAM or more should run quite nicely. If you plan on running X, 8MB would be better, 16MB better still.
Generally speaking, the more RAM, the better. As a matter of fact, I often tell my clients that I would rather have a slower processor with more RAM, than a faster processor with less RAM.
Contrary to what you may have been told, the processor speed is NOT the primary determining factor of performance. In reality the performance of your system is determined by the amount of RAM you have, The speed of your Disk subsystem, and your processor. In that order.
Any type of IDE HDD, and any ATAPI CD-ROM drive will work quite nicely, as will most SCSI hosts and disks. However, SCSI installations can often be more involved, and will be covered in a separate document.
The first thing you will need to do is pick a distribution. Linux is packaged as collections of programs, applications, utilities, and the operating system, by different people and vendors. These are called distributions. There are many, fine distributions out there, and choosing the "right" one is a nebulous process. This is somewhat analogous to picking the "best" vacation spot, or the "best" outfit to wear.
I will be discussing the Slackware 3.5, and RedHat 5.1, as these are the ones I am familiar with. Many of the descriptions and configuration options, most notably the autoprobing of PCI devices, and support for many newer video cards, are applicable ONLY to these distributions. All my comments and recommendations are just that - comments and recommendations. Your preferences may be entirely different.
Slackware 3.5
The first distribution I ever used, and still my favorite. It has the option for either a Command Line Interface (CLI) install, or a Graphical User Interface (GUI) install. Uses Tarballs, or .tgz package format. I like this because I am not "forced" to install X just to use my system like some of the other distributions ( see below.) I am also given more control over what does and does not get installed. (Upgrade path is not too good.) Best for people who want to really learn about how the system works, and like installing and compiling their own software. A full install will eat up ~400MB of disk space.
RedHat 5.1
This is the current "darling" of the commercial side of the Linux community. Probably the easiest to install. Forces the installation of the X window system, whether you want it or not. Uses the RPM package format to ensure all packages and programs are installed correctly (sort of.) Upgrade path is good. Currently has the lion's share of the media attention, and thus, application support. This is the one I recommend for people who want a working system quickly, and are less concerned about the internal workings of the Operating System. A full install will eat up ~600MB of disk space.
I had originally intended to do an in-depth comparison of the various distributions, but the August issue of the Linux Journal just arrived in my mailbox today, and I see that Phil has beat me to it. I respectfully disagree with regard to the Caldera Distribution. I am overwhelmed by it's cost, and underwhelmed by it's performance. Other than that, I would suggest you refer to his article for a more in-depth comparison. He has done an outstanding job, much better than I could have ever done.
Here you have several options. All the distributions I mention are freely available on the Internet for download. Additionally, RedHat, and Slackware are available for purchase, either directly from the manufacturers, or through third parties. Finally, some or all of them are often bundled with books on Linux or can be had at your local Linux User's Group's Install Party, an event where people bring in their computers and the hosts at your Linux users Group will install the software for you.
IMPORTANT NOTE: While it is possible to install some of these distributions using FTP or NFS, I strongly urge you to acquire a CD-ROM for your first installation. See the resources section at the end of this document for vendors, or check your local book store.
While an Install Party is probably the easiest method to get your system up and running, You will get more out of it by doing the installation yourself. Messing up, and doing it yourself is the best way to learn.
Excellent question. Here are some things to consider:
While it is possible and feasible to have multiple operating systems residing on one system, I recommend using a separate machine if possible, or at least a separate disk or disks on your machine just for Linux.
This will give you the confidence to bang away at it, install multiple times, and decrease the chance of harming your primary OS or data. Also, in later installments, I will show you how to make this machine do all kinds of neat tricks, like serve up your Internet connection, store files and applications, even become the starting point for your own home network.
Check around in the paper, your local Linux user group, your place of employment or even your local community college for one of those "old" machines. They can often be had at little or no cost.
What we are aiming for here is maximizing your chances for a successful installation, there will be plenty of time for you to learn the more esoteric methods as your Unix skills increase.
If at all possible try to get a separate machine, preferably with two Hard Disk Drives, and an ATAPI compliant CD-ROM.
If you absolutely must disregard my warnings, and intend to try out Linux on your primary machine, BACKUP ANYTHING YOU CAN NOT AFFORD TO LOSE ONTO FLOPPY DISK, TAPE, OR WHATEVER BACKUP DEVICE YOU PRESENTLY USE. IF YOU DON'T HAVE ONE, PUT THIS DOWN AND GO GET ONE! YOU HAVE BEEN WARNED. Consider the Slackware distribution. It offers the option of running directly off of the CD-ROM.
If you have not acquired a separate machine, refer to the warning above. BACKUP ANYTHING YOU CANNOT AFFORD TO LOSE.
The first thing you will need to do is create your boot disk, and in some cases, a root or supplemental disk.
If you purchased the commercial distribution of RedHat, the required disks should already be included. The commercial version of Slackware should be bootable directly from the CD-ROM on newer systems.
If you obtained the software bundled with a book, you will probably need to create the disk or disks yourself.
You will need one or two DOS formatted disks for this.
What boot image you need will depend on which distribution you are installing.
For RedHat, look for the /images directory, which should contain two files named boot.img and supp.img. Normally only the boot.img disk will be required.
For Slackware, look for a directory called /bootdsks.144, and another called /rootdsks. Unless you have something other than IDE devices in your machine, the bare.i image is the one you will be looking for as your boot disk. In the rootdsks directory, you will need the color.gz image for your root disk.
The method used for creating your boot and/or root disks will depend on whether you are using a Linux (or Unix) machine, or a DOS based machine.
If you are on a DOS based machine, I.E. Windows 3.x, Windows 95, Windows 98 or Windows NT, you will need to use RAWRITE.EXE to create your images. This program should be included either in the same place as the images we just discussed, or under an /install, or /dosutils directory in some cases.
You will need to open a command prompt (sometimes called a DOS box) on your machine, or exit windows to get to the command prompt.
Then type: RAWRITE <enter> You will be asked for the source file name:bare.i <enter>
You will next be asked for your target drive: A: <enter>
If the program errors out, and complains about "Attempting to DMA across 64k boundary," FTP to sunsite.unc.edu, then cd to:
/pub/Linux/distributions/redhat/redhat-5.1/i386/dosutils/
And retrieve the version of RAWRITE there. It will be smaller than the one you were using (~14k,) and the problem should go away. As I recall this is only an issue on NT and possibly Windows 98 boxes.
If you are on a Linux or Unix box, the command to get it done is:
dd if=<your boot or root image> of=<where to write it to> bs=1440kSo, if you are making a Slackware boot disk:
dd if=bare.i of=/dev/fd0 bs=1440k <:enter>For the root disk:
dd if=color.gz of=/dev/fd0 bs=1440k <enter>
Now insert the boot disk into your floppy drive and re-boot your machine.
At this point, you will be prompted to login as root. After you login, you must partition your disk or disks to prepare the HDD for formatting, and ultimately, the installation of your software.
Linux requires at least two partitions for installation. You must have a partition for your root or top level directory to live in, and you also need a partition for your swap file to live in.
This is just a fancy way of saying you need at least one place on your hard drive to store your operating system, and one place on your hard drive to be used as a temporary storage area for your operating system to put things that are not immediately needed.
If you are familiar with a Windows based system, the root partition is the equivalent of your C:\ drive, and the swap file is the equivalent of your pagefile.sys.
Just as it is always a good idea on a Windows box to store your data on a separate device, apart from the operating system, the same rule applies to Linux. This is why I urge you to have two HDD's in your Linux machine.
Depending on which distribution you choose, the process required to create the necessary partitions will vary. Similarly, whether you have one or two HDD's will also make the best partitioning scheme vary.
Slackware:
Use the cfdisk utility. It is fairly easy to understand, and has decent help.
RedHat:
You will probably want to use Disk Druid here.
For a single disk system, I would suggest two partitions:
One swap partition, between 16 and 32MB in size, depending on how much RAM you have in your machine. The utility you are using, may or may not ask you to specify the hex code to tell Linux that this is a swap partition. If prompted for it, the proper code is type 82.
The rest of the disk should be partitioned as Linux native.
Some might argue that there should be three partitions here, in case something goes wrong with the root partition, thus saving your data. I have rarely seen a disk fail in just "spots", usually if a disk commits suicide it's an all or nothing kind of deal.
I recommend two disks for precisely this sort of situation. The only time I have ever seen two disks fail at once was due to a lightening strike, which smoked the whole machine.
For a two disk system, I would suggest the following:
On the primary or first HDD (usually called hda in most distributions:)
Create two partitions, as stated above.
On the second HDD or secondary IDE interface:
Another swap partition of 16 or 32MB as above.
The rest of the drive should be partitioned Linux native.
After partitioning the disk or disks, you will be prompted to format them.
Depending on the distribution used, at some point you will be asked where you want the Linux native partition or partitions to be mounted. This simply is asking you where in the filesystem hierarchy each formatted partition should reside.
For single disk systems, mount your single Linux native partition as your root, or / partition.
For two disk systems, mount your first disk as described above, then mount the Linux native partition on your second drive as your /home directory. This will be where all of your user specific information and files will be stored, thus preventing an OS failure from taking all your hard work and critical data with it.
THIS IS INTENDED TO COMPLEMENT, NOT REPLACE A DILIGENT, REGULAR BACKUP SCHEME. I CAN'T STRESS ENOUGH THE IMPORTANCE OF REGULAR, RELIABLE BACKUPS.
If I seem to be a bit paranoid about backups, I proudly state that I am. I cannot begin to count the times my clients, friends and coworkers have snickered, giggled, and laughed outright when I talk about this. I am a constant source of jokes and entertainment for them. Until something goes wrong. Then I am suddenly a savior to them.
By the way, when something like this happens to you, and it will, when all the suits are sweating bullets, and looking to you like Moses with the backup tablets in each hand, this is a great time for salary negotiation.
You have, with one notable exception, four possible choices for your Linux installation. I will list them in order, from the smallest to the largest. EXCEPTION - Option one, running directly off of the CD-ROM is not available with the RedHat Distribution.
1. Running directly off of the CD-ROM, called a "live" filesystem.
This is the best option for just trying out Linux with a minimum impact to your present system. Performance will be degraded, particularly if you have a slow CD-ROM. This is the ONLY option I can safely recommend if you are not doing this on a machine other than your primary system.
The exact actions required to accomplish this will vary between the distributions, but will be called something like "run from CD-ROM", or "run from live filesystem"
2. A minimal, or base installation, with just enough stuff to get you up and running.
Slackware:
Select the following disk series:
A
AP (optional)
RedHat:
You can safely accept the defaults. (Not much choice here, accept the default, or it won't boot. You will be assimilated ;-).
3. A well rounded installation, consisting of the base stuff, plus some productivity, network, and development tools
Slackware:
Select the following disk series:
A
AP
F
D
N
X
XAP
RedHat:
To the default selections, add:
X applications
Development tools
4. The entire distribution, sometimes called the "let's see how much this sucker can take" installation.
Slackware:
Select the top option, "complete installation"
RedHat:
Select the "Everything" option.
A couple of suggestions concerning the everything install:
Below the dialog box where you chose "Everything", there will be another box with the phrase "Choose individual packages." Select it.
You will then be taken to another dialog box listing the categories of all the software that will be installed on the system. Scroll down to Documentation.
For some reason RedHat wants to install the How-To's and things in every format known to man, and in every language spoken by man.
Choose the text format and html format of the documents. The one exception to this is if for whatever reason, you would find it useful to have these documents in another language, in which case you should select the appropriate language desired as well. When you are finished, select done. This will save you a significant amount of disk space.
Common to both of the distributions, the following tasks are ones you need to perform regardless of which distribution you use:
Slackware:
Toward the end of the installation process, you will be asked to configure your new Linux system. I strongly recommend making both a lilo bootdisk, and a default, or vmlinuz bootdisk for your new machine, and choosing NO to the install LILO option.
RedHat:
Toward the end of the installation, you will be asked if you want to make a boot disk. Answer yes. Make several.
If prompted to configure either X windows, or your networking, answer no. If you are forced to do either of these things for X, accept the defaults. For networking, if asked for a network address, use 127.0.0.1, or choose the "loopback" option if available. We will be configuring these things in the next installment.
While there are times when it will be useful to be logged into your system as root, most of the time, you will want to be logged in to your own account on the machine.
There are many reasons for this, not the least of which is that when logged in as yourself, just about the worst thing you can do is screw up your own account.
However, when logged in as root, most of the safeguards built into the system go away. You can do anything, even things you should not do. Like hose the entire filesystem. This is both the strength, and the weakness of the superuser account.
Treat it like a loaded gun. Don't pull it out unless you mean to use it. If you mean to use it make sure you have a clear target and put it right back in the holster as soon as you're done.
Now that I hope I've properly scared you, here's what you need to do:
Login as root. Then create a user account for yourself:
adduser rjenkinsYou will be asked a series of questions. You can safely press enter to accept the defaults for these things.
Now you need to password protect the root account and your user account. Logged in as root, use the passwd command to do this for both the root or superuser account, and your personal account.
passwd rootAnd then your user account:
passwd rjenkinsA short comment on password selection and security. Good password discipline is very important, whether you are connected to a network or not. Briefly, here are a few guidelines:
Choose something you can easily remember, say kibble.
Now, add a punctuation mark and a number to it, say ?kibble4.
Finally, for best security, a neat trick is to take the word you can remember easily, in this case kibble, and for each letter in the word, move up one row on the keyboard, and over either to the left or the right.
So for ?kibble4 if we move up and to the left, we get: ?u8ggi34.
If we go up and to the right we get: ?o9hhp44.
This is easy to remember, and will defeat all but the most sophisticated password cracking programs.
The first thing you will want to do is learn how to navigate your system. You will find a wealth of documentation in the /usr/doc directory. In particular, look at the /usr/doc/how-to directory, and check out the installation and user's guide.
If you purchased your CD bundled with a book, make use of it. There should be enough information there, or in the doc directory to get you started.
While the editors and document tools available will vary from distribution to distribution, every distribution should have vi available. You will probably either learn to love or hate it. There does not seem to be any middle ground, but I suggest you at least learn to use it, since it will allow you to plunk down at any Unix machine and use it.
Much abbreviated, here's a short list of relevant commands:
To open a file:
vi filename
To insert text in a file:
Press the i key to enter insert mode, then enter your text.
To write your changes to a file:
Press the escape <Esc> key, then :w <:enter>
To close a file:
Press the escape <Esc> key, then :q <enter>
An even better option is to use the Midnight Commander, if it is available on your system. Simply enter mc.
It looks and acts a lot like the N*rton Commander, and makes an easy transition for anyone who has used that program, or is familiar with the DOSSHELL.
Well, that's about it for now, Congratulations! See, that wasn't so hard now was it? In the next installment, we'll configure the X windowing system and your networking setup.
Software Manufacturers:
RedHat Linux: http://www.redhat.com/
Slackware: http://www.cdrom.com/
Third Party Distributors:
http://www.cheapbytes.com
http://www.linuxmall.com
http://www.infomagic.com/
http://www.cdrom.com
Local User Groups:
Most areas have several local computer-oriented publications available.
Have a look for a local user group in your area. There are also list of
user groups by area at
http://www.ssc.com/glue/groups/