Get Started With Linux

Get Started With LinuxStep by step: Installing Linux on your Windows-based PC.Dan Berkes, special to PC World

Note: We first ran this feature last March, when Linux was still a bear to set up and our readers asked for a simple walkthrough to help get the job done. Much has changed since then. Many Linux distributors--Caldera, in particular--have made Linux easier to install. And the latest incarnation of the distribution we highlight here, Red Hat Linux, has made significant strides in ease of use as well. If you're ready to dive into the Linux world, here's how to put Red Hat Linux 6.1 on your PC. --Editors

Why install Linux? Because if you're looking for a fast, reliable, inexpensive operating system that can accommodate multiple users, act as an Internet server, and still support a slick, easy to use graphical interface, it fits the bill better than the alternative.

Reliability is Linux's ace in the hole. While the rumor that Linux never crashes is an exaggeration, it's close to the truth: It is very hard to crash a Linux system. Some installations have been known to run for years without a reboot.

Linux also runs on older machines that can't handle Windows; it will work beautifully, for example, on that old 486 gathering dust in the closet. And, of course, some folks are interested in Linux simply because it's not from Microsoft.

There's much to like about Linux, but getting started with it can be intimidating. For one thing, there isn't only one Linux. Several companies market their own distributions. Each has pros and cons, with their differences lying mainly in installation procedures and in the accompanying software packages. Major Linux distributions include those offered by Red Hat Software, Caldera, Slackware, SuSE, and Debian. In this article, we'll show you how to install the most popular distribution, Red Hat Linux 6.1.

Keep in mind that there are nearly as many ways to install Linux "properly" as there are Linux users. What follows is one way of doing it, so you can get up and running and see what all the fuss is about. We'll assume you're already running Windows 95 or 98, but these instructions will also be useful for installing Linux on a box with no OS.

Your Own Red Hat

There are several ways to get a copy of Red Hat Linux. You can order it directly from Red Hat Software or purchase a copy at your local computer store. You can also download Red Hat Linux for free, but doing so is a time-consuming process that can add a few wrinkles to the installation procedure, so we don't recommend it for first-timers.

Another alternative is to purchase a third-party copy online. You can get third-party copies of Red Hat Linux online for much less than you'd pay to buy it directly from Red Hat (which will cost you $80). We chose Linux System Labs. from Partition Magic As of this writing, LSL will send you its copy of the complete Red Hat 6.1 distribution for only the cost of shipping and handling. But be warned: If you buy Red Hat Linux from another vendor, you won't receive technical support from Red Hat.

The first step after acquiring the software is to set up a partition for it on your hard drive. You'll need a third-party program to shrink existing partitions and make room for the new ones. Our favorite hard disk partitioning tool is PowerQuest. from Ranish Partition Manager Its wizards guide you through the process of shrinking your Windows partition to make more room. Linux Documentation Project. is a shareware alternative, but its bare-bones interface makes it appropriate only for experienced PC users. Before you make any changes to your existing partitions, back up all of your essential files to removable media.

You'll need at least 500MB of available drive space to install Linux. Create this space by using your partitioning tool to shrink existing partitions, leaving a contiguous stretch of empty space on the drive. (This free space may be within a preexisting Extended Partition or on a completely unpartitioned portion of the drive.) Don't bother creating partitions for Linux in the empty space you create; we'll let Red Hat take care of that. After you've made some room, you're ready to move on.

Be Prepared

If you purchased your copy of Red Hat Linux directly from Red Hat (or if you ordered the GPL version from Linux System Labs), the installation CD-ROM is bootable. If your PC supports bootable CDs, then you're set. If your installation CD-ROM came from another vendor, or your PC can't boot from a CD, it's time to make a boot disk.

  • Grab a freshly formatted floppy disk and pop it into that small slot on the front of your computer that's been gathering dust. Within Windows, right-click the desktop and select New, Folder from the pop-up menu. Name the new folder Bootdisk and double-click the folder to open it. (After you've installed Linux, you can delete this folder.)
  • Insert the Red Hat CD into your drive. Open My Computer, double-click the icon that represents your CD-ROM drive, and double-click the folder named Dosutils. Click and right-drag the Rawrite file in that folder to the Bootdisk folder window. Select Copy Here from the menu that appears.
  • Close the Dosutils window and open the Images folder on the CD-ROM. Copy Boot.img to the Bootdisk folder, just as you did with Rawrite.
  • Select Start, Run, type command in the box that appears, and click OK. A window appears with a DOS command prompt that reads C:\Windows\Desktop. Type cd bootdisk and press Enter.
  • Here's where you finally create a Red Hat boot disk: Type rawrite and press Enter. Type boot.img for the name of the file you wish to copy and press Enter. Finally, when prompted for a target drive, type a: (or whichever letter represents your floppy drive) and press Enter.
  • Take Inventory

    While installing Linux isn't the enormous chore it once was, it's still not the streamlined process you might wish it to be--especially because Linux cannot automatically detect all the hardware on your system. You may need to answer a lot of questions during the installation process, so you should be armed with the correct answers before you start. Get them by going to Device Manager: Right-click My Computer, select Properties, and click the Device Manager tab. You'll see a tree view of all your system's hardware. Click the Print button, select "All devices and system summary," and click OK to print a report of what's hiding inside your PC. You may not need all this information during the installation process (Red Hat Linux can detect a lot of hardware), but the printout will come in handy if you run into a snag.

    The Journey Begins

    If you made a boot floppy, insert it now. If not, insert your installation CD-ROM and restart your computer. When you get a text-based welcome screen, press Enter. Now sit back and wait for the installation program to load. You may see heaps of scary-looking text fly by, but that's just Linux starting up.

    In a few minutes, the Red Hat logo should appear on your screen. Red Hat 6.1 features a graphical installation program that you control with your mouse, similar to the Windows installation procedure. It begins by asking you which language you speak. Using the mouse, highlight your native tongue and click Next.

    The installer now wants to know which type of keyboard you're using. With rare exception, you should be able to get by with the default selection (Generic 101-key PC, U.S. English), so click Next.

    Red Hat will now probe your system to find out which kind of mouse you're using. The next screen will display its findings. Make any needed changes and move on.

    Now that you've provided the installer with basic information about your system, it's time to start the installation of your new operating system. Skip past the second welcome screen. When asked what type of installation you want to perform, choose Custom.

    Enter the Druid

    Red Hat now needs to set up its file system on your hard drive. Enter the Disk Druid--a tool that should be on your screen at this point.

    Red Hat's Disk Druid lets you determine where Linux is going to live on your hard drive.

    You'll need to create two partitions within the empty space you created earlier. The first is your root partition, where all of your files will go. The second is a swap partition that, like Windows' swap file, complements your physical RAM.

    To begin creating your root partition, click Add. Enter a single forward slash (/) for Mount Point, and check the "Grow to fill disk?" box. Select Linux Native as the partition type, and then select OK. Your new partition should expand to fill all empty space, and Disk Druid should confirm that it has.

    Click Add again to set up your swap partition. Enter nothing for Mount Point. Enter 128 for the size (less if you're hurting for disk space, but the more the better) and don't check the "Grow to fill disk?" box. Select Linux Swap as the type. Click OK.

    Disk Druid should now show the two partitions you added: a large root partition and a smaller swap partition. Select Next.

    Your new partitions need formatting. Red Hat formats the swap partition first, giving you the option to "Check for bad blocks" during the format. It's a good idea to select this option. Then Red Hat formats your root partition (listed as "/"), and again it's a good idea to check for bad blocks.

    Look LI, Look LO

    Now configure the Linux Loader, known as LILO. This tiny program runs when your computer starts up, giving you the choice of loading Windows or booting into Linux.

    First, make sure that "Create boot disk" is checked. It's a good idea to create such a disk to handle emergency situations, so have a blank disk ready.

    You'll want LILO on your Master Boot Record, so make sure that the check box next to "/dev/hda Master Boot Record (MBR)" is selected. You're probably not ready to make Linux your main operating system, so to make sure Windows boots first, check the box to the left of "Default boot image" and enter dos (if it isn't already there) for the Boot Label. Select Next to continue.

    If you need to configure a local area network, the next screen allows you to enter the information Linux will need to activate your network card. If you don't have a card or aren't using the one you have, click Next to skip this section.

    Click a yellow dot or select a location from the list so that Red Hat knows where you are in the world.

    Now Red Hat wants to know where you live, in a general sense. Scroll through the menu beneath the colorful world map to select the city nearest you (and in the same time zone), and click Next.

    At this point you need to select a root password. This is an important step. Linux is a multiuser operating system and every Linux installation needs a user called "root" to function as the system administrator. That's you, so select a secure password and don't forget it.

    The Account Configuration dialog box allows you to configure both the root account (the equivalent of an NT supervisor account) and a user account.

    The root account lets you do just about anything to your system and should be used only for administration and maintenance. For daily use, it's best to create a separate user account for yourself. Below the area where you entered your root password, enter an account name, a password (you need to enter it twice), and a descriptive name for the account--your full name is fine. Click Add to activate the account, and then Next to move on.

    The next screen, Authentication Configuration, offers several types of password services that can be used with Red Hat. The defaults are fine, so simply select Next.

    Open Your Packages

    Red Hat's Linux distribution offers more than an operating system. Its CD-ROM also contains a huge library of powerful software such as The Gimp, an image manipulation tool that rivals Photoshop, and Apache, a popular Web server.

    So you can now specify which applications you want installed. The installer preselects a number of software packages, including basic Internet applications such as an e-mail client, Telnet, FTP, and a Web browser. Among the other packages are system drivers and libraries. By default, the DOS/Windows Connectivity and Kernel Development packages are not selected, but you should select them.

    Mmm, system components! KDE is not selected by default--be sure you select it before clicking Next.

    The X Windows System gives you a graphical interface that lets you interact with your Linux system similar to the way you do with Windows. Unlike Windows, however, X Windows doesn't dictate how your on-screen environment is going to look--the Window Manager will do that. There are dozens of Window Managers available; some mimic the Windows 95/98 user interface, and one mimics the Mac. Others are like nothing you've ever seen. GNOME and KDE are both "desktop environments"--they go beyond the Window Manager to provide a host of tools and applications that make Linux just a tad friendlier for the novice.

    I'm telling you about these things now because you need to make sure that you install all the necessary X Windows packages, including GNOME and KDE. GNOME is probably selected in the menu you're staring at; you'll have to select KDE manually to get it installed.

    If you want to get into the real nitty-gritty, choose "Select individual packages"--but only if you have plenty of time to read dozens of esoteric descriptions.

    After you've selected the packages you want, click Next.

    Finishing Up and Booting

    Now it's time to set up your computer to use X Windows. The setup program will probe your system for information about your video card and monitor, displaying the results of its search for your approval, along with what it thinks should be the correct driver software. If all this information seems correct, then click "Test this Configuration" to make sure these settings work.

    If all goes well, a dialog box will appear politely inquiring if you can see it. Assuming you can, click Yes. You'll be sent back to the X Configuration screen. If you'd like X Windows to start when you boot, offering an NT-like user name and password dialog box (instead of a text-mode login prompt), check the box next to "Use Graphical Login." Select Next to continue.

    If Red Hat isn't able to determine your video settings, or if the information returned isn't correct, you'll need to select the check box next to Customize X Configuration to manually enter the settings for your graphics hardware. The report you printed with the Windows Device Manager should be helpful.

    Here's the interesting part: Red Hat will let you know about each package it installs. This takes a while--either stare intently or go have coffee.

    Red Hat will now advise you that it's finally ready to install and that an installation log will be created. Select Next and watch with glee as the software is copied to your hard disk. If your screen goes blank during this process, don't panic. That's the installer's screen saver kicking in. Press Shift and everything will return.

    After Red Hat has placed all items where they need to be, you'll create your boot disk. Insert a blank floppy and click Next.

    When the installer finishes its work, Red Hat presents a screen congratulating you on a successful installation. You're asked to remove all media from your drives and press Enter to reboot. If you booted from a CD-ROM, you'll notice a pretty obvious bug in the setup program here: Your CD-ROM drive will refuse to open until you press Enter. At any rate, eject the floppy disk (if you used one) and the CD-ROM (when you can) and let Red Hat reboot.

    After your computer restarts, you'll see a prompt on your screen that says LILO:. Your computer is waiting for you to tell it which operating system you'd like to use. If you do nothing or press Enter, Windows begins booting. To boot Linux, type linux and press Enter. If all is well, you'll see a lot of geeky text flow across your screen. You're not in Kansas (or Redmond!) anymore, but don't worry: This is how Linux starts up.

    The screen eventually clears and presents you with a login prompt. Type root or the user name for the regular-use account you created, press Enter, type the password you chose during installation (no characters--not even asterisks--will display on the screen), and press Enter. You're now logged in to your new Linux operating system.

    Going Online

    Congratulations, you're a Linux user! But you still need to take care of one last configuration chore: Telling Linux how you connect to the Internet. The easiest way to do so is with a little KDE application called Kppp. (This is why we told you earlier to install KDE as well as GNOME.)

    If you're not in an X session already, type startx to launch X Windows and GNOME. If this is your first time in an X session, the startup may take a few minutes as GNOME sets itself up for you.

    KDE's Kppp app makes getting online as easy as Windows' familiar Dial-Up Networking.

    Click the foot icon on the taskbar at the bottom of the screen, and then select KDE Menus, Internet, Kppp. When Kppp has launched, choose Setup, and when the next window appears, click the Accounts tab and select New. This pops up another window that enables you to configure your connection. Click the tab marked Dial, and enter a name for the connection (whatever you feel like calling it) and your ISP's dial-up number.

    Now click the IP Setup tab. If your ISP has given you a static IP address (meaning you use the same IP address every time you connect), choose Static. If your ISP assigns you a different address for each login, select Dynamic. Now click the DNS tab and enter your ISP's domain name and domain name server addresses. You probably don't need to muck around with the Gateway, Login Script, or Accounting Information options. Click OK and go back to Kppp's main setup screen.

    Your next step is to tell Kppp where your modem is located. Select the Device tab, and choose the location of your modem from the pull-down menu. Try the default setting first: /dev/modem. When you try to connect to your ISP, Kppp will let you know if it can't find the thing. If that happens, try the four /dev/ttyS settings (/dev/ttyS0 through /dev/ttyS3) in turn until you find the one that works.

    You're almost done. Click OK and you'll find yourself back at the main Kppp dialog box. Enter your user name and password, and then click Connect. If all goes well, you'll establish a PPP connection with your ISP.

    Linux Resources

    To further your adventures in Linux, we recommend you purchase a beginner's guide. There are dozens of such titles, but these two are particularly good: Linux for Dummies (IDG Books Worldwide, 1999), a straightforward introduction to Linux coauthored by John "Maddog" Hall, the executive director of Linux International; and Red Hat Linux Unleashed (Macmillan Publishing Company, 1999), a much larger and more comprehensive resource that is probably best suited to experienced computer users.

    You can also get lots of help on the Web. Following are some links that should get you started.

  • The granddaddy of online Linux documentation is the HOWTO documents. Especially helpful (though not exactly written for beginners) are the well-known Josh's Linux Guide
  • Red Hat Linux Users FAQ has some well-written and informative tutorials on getting started with Linux.
  • The unofficial GNOME Project contains information specific to Red Hat that you might not find elsewhere.
  • If you're interested in learning more about GNOME and KDE, visit the K Desktop Environment home page. or the LinuxWorld magazine.
  • If you're thinking of using Linux at work, check out Slashdot Aimed at professionals, the publication includes Linux news, interviews, how-to articles, and detailed technical features.
  • You can also turn to Usenet for guidance. But if you want to post a question to a Linux group, go in prepared. Linux veterans are more than willing to help, but they won't respond kindly to vague questions or those that demonstrate an unwillingness to experiment and, well, hack around. Don't post a message saying, "I can't access my CD-ROM drive! Help!" Instead, explain which distribution of Linux you're running, exactly what the problem is, when it occurs, and what you've tried. Then sit back and be amazed at the amount of help you receive. The entire comp.os.linux hierarchy is good, but for starters check out comp.os.linux.setup and comp.os.linux.help.
  • If you want to find out what's going on in the Linux community, here are two great options: Linux Today. and Linux Today. Slashdot bills itself as "news for nerds" and isn't restricted to Linux topics, but it often scoops most other Web sites when it comes to Linux happenings. Linux Today focuses entirely on Linux and is a good resource for links to Linux stories all over the Web.
  • PC World Online's Here's How department will be revisiting Linux from time to time. Let us know what you need help with by sending e-mail to online-tips@pcworld.com with your suggestions. We also welcome your comments on this article. We regret that we cannot respond to specific troubleshooting questions.

    Dan Berkes is a freelance writer based in Galena, Illinois, where he runs a small Web hosting service.

    Subscribe to the Daily Downloads Newsletter