1 Introduction To Linux
1 Introduction To Linux
4/4/14, 12:27 PM
Next: 2 Obtaining and Installing Up: Linux Installation and Getting Previous: Preface
1 Introduction to Linux
chap-introIntroduction to Linux Linux is quite possibly the most important free software achievement since the original Space War, or, more recently, Emacs. It has developed into an operating system for business, education, and personal productivity. Linux is no longer only for UNIX wizards who sit for hours in front of a glowing console (although we assure you that many users fall into this category). This book will help you get the most from Linux. Linux (pronounced with a short i, as in LIH-nucks) is a UNIX operating system clone which runs on a variety of platforms, especially personal computers with Intel 80386 or better processors. It supports a wide range of software, from TeX, to the X Window System, to the GNU C/C++ compiler, to TCP/IP. It's a versatile, bona de implementation of UNIX, freely distributed under the terms of the GNU General Public License (see Appendix C). Linux can turn any 80386 or better personal computer into a workstation that puts the full power of UNIX at your ngertips. Businesses install Linux on entire networks of machines, and use the operating system to manage nancial and hospital records, distributed computing environments, and telecommunications. Universities worldwide use Linux to teach courses on operating system programming and design. Computing enthusiasts everywhere use Linux at home for programming, productivity, and all-around hacking. What makes Linux so different is that it is a free implementation of UNIX. It was and still is developed cooperatively by a group of volunteers, primarily on the Internet, who exchange code, report bugs, and x problems in an open-ended environment. Anyone is welcome to join the Linux development effort. All it takes is interest in hacking a free UNIX clone, and some programming know-how. The book in your hands is your tour guide.
1 Introduction to Linux
4/4/14, 12:27 PM
Details of running Linux, including suggestions on recommended hardware conguration. Specic instructions to install various Linux distributions, including Debian, Red Hat Software, and Slackware. A brief, introductory UNIX tutorial for users with no previous UNIX experience. This tutorial should provide enough material for novices to nd their way around the system. An introduction to system administration under Linux. This covers the most important tasks that Linux administrators need to perform, like creating user accounts and managing le systems. Information on conguring more advanced features of Linux, like the X Window System, TCP/IP networking, and electronic mail and news. This book is for the personal computer user who wishes to get started with Linux. We don't assume previous UNIX experience but do expect novices to refer to other material along the way. For those unfamiliar with UNIX, a list of useful references is given in Appendix A. In general, this book is meant to be read in addition to another book on basic UNIX concepts.
1 Introduction to Linux
4/4/14, 12:27 PM
hoping I'd be able to recompile gcc under Linux someday... ``Two months for basic setup, but then only slightly longer until I had a disk driver (seriously buggy, but it happened to work on my machine) and a small le system. That was about when I made 0.01 available (around late August of 1991): it wasn't pretty, it had no oppy driver, and it couldn't do much of anything. I don't think anybody ever compiled that version. But by then I was hooked, and didn't want to stop until I could chuck out Minix.'' No announcement was ever made for Linux version 0.01. The 0.01 sources weren't even executable. They contained only the bare rudiments of the kernel source and assumed that you had access to a Minix machine to compile and experiment with them. On October 5, 1991, Linus announced the rst ``ofcial'' version of Linux, which was version 0.02. At that point, Linus was able to run bash (the GNU Bourne Again Shell) and gcc (the GNU C compiler), but not much else. Again, this was intended as a hacker's system. The primary focus was kernel development--user support, documentation, and distribution had not yet been addressed. Today, the Linux community still seems to treat these issues as secondary to ``real programming''--kernel development. As Linus wrote in comp.os.minix, ``Do you pine for the nice days of Minix-1.1, when men were men and wrote their own device drivers? Are you without a nice project and just dying to cut your teeth on an OS you can try to modify for your needs? Are you nding it frustrating when everything works on Minix? No more all-nighters to get a nifty program working? Then this post might be just for you. ``As I mentioned a month ago, I'm working on a free version of a Minix-look-alike for AT-386 computers. It has nally reached the stage where it's even usable (though may not be, depending on what you want), and I am willing to put out the sources for wider distribution. It is just version 0.02...but I've successfully run bash, gcc, gnu-make, gnu-sed, compress, etc. under it.'' After version 0.03, Linus bumped up the version number to 0.10, as more people started to work on the system. After several further revisions, Linus increased the version number to 0.95 in March, 1992, to reect his expectation that the system was ready for an ``ofcial'' release soon. (Generally, software is not assigned the version number 1.0 until it is theoretically complete or bug-free.). Almost a year and a half later, in late December of 1993, the Linux kernel was still at version 0.99.pl14--asymptotically approaching 1.0. At the time of this writing, the current stable kernel version is 2.0 patchlevel 33, and version 2.1 is under development. Most of the major, free UNIX software packages have been ported to Linux, and commercial software is also available. More hardware is supported than in the original kernel versions. Many people have executed benchmarks on 80486 Linux systems and found them comparable with mid-range workstations from Sun Microsystems and Digital Equipment Corporation. Who would have ever guessed that this ``little'' UNIX clone would have grown up to take on the entire world of personal computing?
1 Introduction to Linux
4/4/14, 12:27 PM
this section, we'll take a nickel tour of the features of the Linux kernel. Linux is a complete multitasking, multiuser operating system, as are all other versions of UNIX. This means that many users can log into and run programs on the same machine simultaneously. The Linux system is mostly compatible with several UNIX standards (inasmuch as UNIX has standards) at the source level, including IEEE POSIX.1, UNIX System V, and Berkely System Distribution UNIX. Linux was developed with source code portability in mind, and it's easy to nd commonly used features that are shared by more than one platform. Much of the free UNIX software available on the Internet and elsewhere compiles under Linux ``right out of the box.'' In addition, all of the source code for the Linux system, including the kernel, device drivers, libraries, user programs, and development tools, is freely distributable. Other specic internal features of Linux include POSIX job control (used by shells like csh and bash), pseudoterminals ( pty devices), and support for dynamically loadable national or customized keyboard drivers. Linux supports virtual consoles that let you switch between login sessions on the same system console. Users of the screen program will nd the Linux virtual console implementation familiar. The kernel can emulate 387-FPU instructions, and systems without a math coprocessor can run programs that require oating-point math capability. Linux supports various le systems for storing data, like the ext2 le system, which was developed specically for Linux. The Xenix and UNIX System V le systems are also supported, as well as the Microsoft MS-DOS and Windows 95 VFAT le systems on a hard drive or oppy. The ISO 9660 CD-ROM le system is also supported. We'll talk more about le systems in chapters 2 and 4. Linux provides a complete implementation of TCP/IP networking software. This includes device drivers for many popular Ethernet cards, SLIP (Serial Line Internet Protocol) and PPP (Point-to-Point Protocol), which provide access to a TCP/IP network via a serial connection, PLIP (Parallel Line Internet Protocol), and NFS (Network File System). The complete range of TCP/IP clients and services is also supported, which includes FTP, telnet, NNTP, and SMTP. We'll talk more about networking in Chapter . The Linux kernel is developed to use protected-mode features of Intel 80386 and better processors. In particular, Linux uses the protected-mode, descriptor based, memory-management paradigm, and other advanced features. Anyone familiar with 80386 protected-mode programming knows that this chip was designed for multitasking systems like UNIX. Linux exploits this functionality. The kernel supports demand-paged, loaded executables. Only those segments of a program which are actually in use are read into memory from disk. Also, copy-on-write pages are shared among executables. If several instances of a program are running at once, they share physical memory, which reduces overall usage. In order to increase the amount of available memory, Linux also implements disk paging. Up to one gigabyte of swap space may be allocated on disk (upt to 8 partitions of 128 megabytes each). When the system requires more physical memory, it swaps inactive pages to disk, letting you run larger applications and support more users. However, swapping data to disk is no substitute for physical RAM, which is much faster. The Linux kernel also implements a unied memory pool for user programs and disk cache. All free memory is used by the cache, which is reduced when running large programs.
http://www.tldp.org/LDP/gs/node3.html
Page 4 of 27
1 Introduction to Linux
4/4/14, 12:27 PM
Executables use dynamically linked, shared libraries: code from a single library on disk. This is not unlike the SunOS shared library mechanism. Executable les occupy less disk space, especially those which use many library functions. There are also statically linked libraries for object debugging and maintaining ``complete'' binary les when shared libraries are not installed. The libraries are dynamically linked at run time, and the programmer can use his or her own routines in place of the standard library routines. To facilitate debugging, the kernel generates core dumps for post-mortem analysis. A core dump and an executable linked with debugging support allows a developer to determine what caused a program to crash.
1 Introduction to Linux
4/4/14, 12:27 PM
popular shell is tcsh, a version of the C Shell with advanced functionality similar to that found in bash. Other shells include zsh, a small Bourne-like shell; the Korn Shell (ksh); BSD's ash; and rc, the Plan 9 shell. If you're the only person using the system and refer to use vi and bash exclusively as your editor and shell, there's no reason to install other editors or shells. This ``do it yourself'' attitude is prevalent among Linux hackers and users.
http://www.tldp.org/LDP/gs/node3.html
Page 6 of 27
1 Introduction to Linux
4/4/14, 12:27 PM
What does a formatting language look like? In general, a formatted source le consists mostly of the text itself, with control codes to produce effects like font and margin changes, and list formatting. Consider the following text: Mr. Torvalds: We are very upset with your current plans to implement post-hypnotic suggestions in the Linux terminal driver code. We feel this way for three reasons: 1. Planting subliminal messages in the terminal driver is not only immoral, it is a waste of time; 2. It has been proven that ``post-hypnotic suggestions'' are ineffective when used upon unsuspecting UNIX hackers; 3. We have already implemented high-voltage electric shocks, as a security measure, in the code for login. We hope you will reconsider. This text might appear in the LaTeX formatting language as the following:
\begin{quote} Mr. Torvalds: We are very upset with your current plans to implement {\em post-hypnotic suggestions\/} in the {\bf Linux} terminal driver code. We feel this way for three reasons: \begin{enumerate} \item Planting subliminal messages in the kernel driver is not only immoral, it is a waste of time; \item It has been proven that ``post-hypnotic suggestions'' are ineffective when used upon unsuspecting UNIX hackers; \item We have already implemented high-voltage electric shocks, as a security measure, in the code for {\tt login}. \end{enumerate} We hope you will reconsider. \end{quote}
The author enters the text using any text editor and generates formatted output by processing the source with LaTeX. At rst glance, the typesetting language may appear to be obscure, but it's actually quite easy to understand. Using a text processing system enforces typographical standards when writing. All the enumerated lists within a document will look the same, unless the author modies the denition of an enumerated list. The goal is to allow the author to concentrate on the text, not typesetting conventions. When writing with a text editor, one generally does not think about how the printed text will appear. The writer learns to visualize the nished text's appearance from the formatting commands in the source. WYSIWYG word processors are attractive for many reasons. They provide an easy-to-use visual interface for editing documents. But this interface is limited to aspects of text layout which are accessible to the user. For example, many word processors still provide a special format language for producing complicated expressions like mathematical formulae. This is text processing, albeit on a much smaller scale.
http://www.tldp.org/LDP/gs/node3.html Page 7 of 27
1 Introduction to Linux
4/4/14, 12:27 PM
A not-so-subtle benet of text processing is that you specify exactly which format you need. In many cases, the text processing system requires a format specication. Text processing systems also allow source text to be edited with any text editor, instead of relying on format codes which are hidden beneath a word processor's opaque user interface. Further, the source text is easily converted to other formats. The tradeoff for this exibility and power is the lack of WYSIWYG formatting. Some programs let you preview the formatted document on a graphics display device before printing. The xdvi program displays a ``device independent'' le generated by the TeX system under X. Applications like xfig and gimp provide WYSIWYG graphics interfaces for drawing gures and diagrams, which are subsequently converted to text processing language for inclusion in your document. Text processors like troff were around long before WYSIWYG word processing was available. Many people still prefer their versatility and independence from a graphics environment. Many text-processing-related utilities are available. The powerful METAFONT system, which is used to design fonts for TeX, is included in the Linux port of TeX. Other programs include ispell, an interactive spelling checker and corrector; makeindex, which generates indices in LaTeX documents; and many other groff and TeXbased macro packages which format many types of technical and mathematical texts. Conversion programs that translate between TeX or groff source to a myriad of other formats are also available. A newcomer to text formatting is YODL, written by Karel Kubat. YODL is an easy-to-learn language with lters to produce various output formats, like LaTeX, SGML, and HTML.
1 Introduction to Linux
4/4/14, 12:27 PM
available, as are UNIX hacking favorites like Perl (the script language to end all script languages) and Tcl/Tk (a shell-like command processing system which has support for developing simple X Window System applications). The advanced gdb debugger can step through a program one line of source code at a time, or examine a core dump to nd the cause of a crash. The gprof proling utility provides performance statistics for your program, telling you where your program spends most of its execution time. As mentioned above, the emacs text editor provides interactive editing and compilation environments for various programming languages. Other tools include GNU make and imake, which manage compilation of large applications, and RCS, a system for source code locking and revision control. Finally, Linux supports dynamically linked, shared libraries (DLLs), which result in much smaller binaries. The common subroutine code is linked at run-time. These DLLs let you override function denitions with your own code. For example, if you wish to write your own version of the malloc() library routine, the linker will use your new routine instead of the one in the libraries.
1 Introduction to Linux
4/4/14, 12:27 PM
moves the mouse to the edge of the screen, and the desktop shifts as though the display were much larger than it really is. fvwm is greatly customizable and allows access to functions from the keyboard as well as mouse. Many Linux distributions use fvwm as the standard window manager. A version of fvwm called fvwm95-2 offers Microsoft Windows 95-like look and feel. The XFree86 distribution includes programming libraries for wily programmers who wish to develop X applications. Widget sets like Athena, Open Look, and Xaw3D are supported. All of the standard fonts, bitmaps, manual pages, and documentation are included. PEX (a programming interface for 3-dimensional graphics) is also supported. Many X application programmers use the proprietary Motif widget set for development. Several vendors sell single and multiple user licenses for binary versions of Motif. Because Motif itself is relatively expensive, not many Linux users own it. However, binaries statically linked with Motif routines can be freely distributed. If you write a program using Motif, you may provide a binary so users without the Motif libraries can use the program. A major caveat to using the X Window System is its hardware requirements. A 80386-based CPU with 4 megabytes of RAM is capable of running X, but 16 megabytes or more of physical RAM is needed for comfortable use. A faster processor is nice to have as well, but having enough physical RAM is much more important. In addition, to achieve really slick video performance, we recommend getting an accelerated video card, like a VESA Local Bus (VLB) S3 chipset card. Performance ratings in excess of 300,000 xstones have been achieved with Linux and XFree86. Using adequate hardware, you'll nd that running X and Linux is as fast, or faster, than running X on other UNIX workstations. In Chapter we discuss how to install and use X on your system.
1 Introduction to Linux
4/4/14, 12:27 PM
Linux also supports Microsoft Windows connectivity via Samba , and Macintosh connectivity with AppleTalk and LocalTalk. Support for Novell's IPX protocol is also included. The full range of mail and news readers is available for Linux, including elm, pine, rn, nn, and tin. Whatever your preference, you can congure a Linux system to send and receive electronic mail and news from all over the world. The system provides a standard UNIX socket programming interface. Virtually any program that uses TCP/IP can be ported to Linux. The Linux X server also supports TCP/IP, and applications running on other systems may use the display of your local system. In Chapter , we discuss the installation of TCP/IP software, including SLIP and PPP.
UUCP (UNIX-to-UNIX Copy) is an older mechanism to transfer les, electronic mail, and electronic news between UNIX machines. Historically, UUCP machines are connected over telephone lines via modem, but UUCP is able to transfer data over a TCP/IP network as well. If you do not have access to a TCP/IP network or a SLIP or PPP server, you can congure your system to send and receive les and electronic mail using UUCP. See Chapter for more information.
http://www.tldp.org/LDP/gs/node3.html
Page 11 of 27
1 Introduction to Linux
4/4/14, 12:27 PM
If you do not have access to a TCP/IP network or UUCP feed, Linux lets you communicate with BBS networks like FidoNet, which let you exchange electronic news and mail over a telephone line. You can nd more information on telecommunications and BBS software under Linux in Chapter .
http://www.tldp.org/LDP/gs/node3.html
1 Introduction to Linux
4/4/14, 12:27 PM
1 Introduction to Linux
4/4/14, 12:27 PM
subject to misinterpretation. We hope that this summary will help you understand the extent and goals of the GPL and its effect on Linux. A complete copy of the GPL is printed in Appendix C. Originally, Linus Torvalds released Linux under a license more restrictive than the GPL, which allowed the software to be freely distributed and modied, but prevented any money from changing hands for its distribution and use. On the other hand, the GPL allows people to sell and prot from free software, but does not allow them to restrict another's right to distribute the software in any way. First, it should be explained that free software that is covered by the GPL is not in the public domain. Public domain software by denition is not copyrighted and is literally owned by the public. Software covered by the GPL, on the other hand, is copyrighted by the author. The software is protected by standard international copyright laws, and the author is legally dened. The GPL provides for software which may be freely distributed but is not in the public domain. GPL-licensed software is also not shareware. Generally, shareware is owned and copyrighted by an author who requires users to send in money for its use. Software covered by the GPL may be distributed and used free of charge. The GPL also lets people take, modify, and distribute their own versions of the software. However, any derived works of GPL software must also be covered by the GPL. In other words, a company may not take Linux, modify it, and sell it under a restrictive license. If the software is derived from Linux, that software must be covered under the GPL also. The GPL allows free software to be distributed and used free of charge. It also lets a person or organization distribute GPL software for a fee, and even make a prot from its sale and distribution. However, a distributor of GPL software cannot take those rights away from a purchaser. If you purchase GPL software from a thirdparty source, you may distribute the software for free, and sell it yourself as well. This may sound like a contradiction. Why sell software when the GPL allows you to get it for free? Let's say that a company decided to bundle a large amount of free software on a CD-ROM and distribute it. That company would need to charge for the overhead of producing and distributing the CD-ROM, and may even decide to prot from the sales of the software. This is allowed by the GPL. Organizations that sell free software must follow certain restrictions set forth in the GPL. They cannot restrict the rights of users who purchase the software. If you buy a CD-ROM that contains GPL software, you can copy and distribute the CD-ROM free of charge, or resell it yourself. Distributors must make obvious to users that the software is covered by the GPL. Distributors must also provide, free of charge, the complete source code to the software distributed. This permits anyone who purchases GPL software to make modications to that software. Allowing a company to distribute and sell free software is a good thing. Not everyone has access to the Internet and the ability to download software for free. Many organizations sell Linux on diskette, tape, or CD-ROM via mail order, and prot from the sales. Linux developers may never see any of this prot; that is the understanding reached between the developer and the distributor when software is licensed by the GPL. In other words, Linus Torvalds knew that companies may wish to sell Linux, and that he might not see a penny of the prots. In the free software world, the important issue is not money. The goal of free software is always to develop
http://www.tldp.org/LDP/gs/node3.html Page 14 of 27
1 Introduction to Linux
4/4/14, 12:27 PM
and distribute fantastic software and allow anyone to obtain and use it. In the next section, we'll discuss how this applies to the development of Linux.
1 Introduction to Linux
4/4/14, 12:27 PM
Sufce it to say that not every bug is xed, nor is every problem ironed out between releases. As long as the revision appears to be free of critical or recurring bugs, it is considered to be stable, and the new version is released. The thrust behind Linux development is not to release perfect, bug-free code: it is to develop a free UNIX implementation. Linux is for the developers, more than anyone else. Anyone who has a new feature or software application generally makes it available in an alpha version--that is, a test version, for those brave users who want to hash out problems in the initial code. Because the Linux community is largely based on the Internet, alpha software is usually uploaded to one or more Linux FTP sites (see Appendix B), and a message is posted to one of the Linux Usenet newsgroups about how to obtain and test the code. Users who download and test alpha software can then mail results, bug xes, and questions to the author. After the initial bugs have been xed, the code enters a beta test stage, in which it is usually considered stable but not complete. It works, but not all of the features may be present. The software may also go directly to a nal stage, in which the software is considered complete and usable. Keep in mind that these are only conventions--not rules. Some developers may feel so condent of their software that they decide it isn't necessary to release alpha or test versions. It is always up to the developer to make these decisions. You might be amazed at how such an unstructured system of volunteers who program and debug a complete UNIX system gets anything done at all. As it turns out, this is one of the most efcient and motivated development efforts ever employed. The entire Linux kernel is written from scratch, without code from proprietary sources. It takes a huge amount of work to port all the free software under the sun to Linux. Libraries are written and ported, le systems are developed, and hardware drivers are written for many popular devices--all due to the work of volunteers. Linux software is generally released as a distribution, a set of prepackaged software which comprises an entire system. It would be difcult for most users to build a complete system from the ground up, starting with the kernel, adding utilities, and installing all of the necessary software by hand. Instead, many software distributions are available which include everything necessary to install and run a complete system. There is no single, standard distribution--there are many, and each has its own advantages and disadvantages. We describe installation of the various Linux distributions starting on page .
1 Introduction to Linux
4/4/14, 12:27 PM
Why use Linux, instead of a well known, well tested, and well documented commercial operating system? We could give you a thousand reasons. One of the most important, however, is that Linux is an excellent choice for personal UNIX computing. If you're a UNIX software developer, why use MS-DOS at home? Linux allows you to develop and test UNIX software on your PC, including database and X Window System applications. If you're a student, chances are that your university computing systems run UNIX. You can run your own UNIX system and tailor it to your needs. Installing and running Linux is also an excellent way to learn UNIX if you don't have access to other UNIX machines. But let's not lose sight. Linux isn't only for personal UNIX users. It is robust and complete enough to handle large tasks, as well as distributed computing needs. Many businesses--especially small ones--have moved their systems to Linux in lieu of other UNIX based, workstation environments. Universities have found that Linux is perfect for teaching courses in operating systems design. Large, commercial software vendors have started to realize the opportunities which a free operating system can provide.
Linux vs. MS-DOS.
It's not uncommon to run both Linux and MS-DOS on the same system. Many Linux users rely on MS-DOS for applications like word processing. Linux provides its own analogs for these applications, but you might have a good reason to run MS-DOS as well as Linux. If your dissertation is written using WordPerfect for MS-DOS, you may not be able to convert it easily to TeX or some other format. Many commercial applications for MS-DOS aren't available for Linux yet, but there's no reason that you can't use both. MS-DOS does not fully utilize the functionality of 80386 and 80486 processors. On the other hand, Linux runs completely in the processor's protected mode, and utilizes all of its features. You can directly access all of your available memory (and beyond, with virtual RAM). Linux provides a complete UNIX interface which is not available under MS-DOS. You can easily develop and port UNIX applications to Linux, but under MSDOS you are limited to a subset of UNIX functionality. Linux and MS-DOS are different entities. MS-DOS is inexpensive compared to other commercial operating systems and has a strong foothold in the personal computer world. No other operating system for the personal computer has reached the level of popularity of MS-DOS, because justifying spending $1,000 for other operating systems alone is unrealistic for many users. Linux, however, is free, and you may nally have the chance to decide for yourself. You can judge Linux vs. MS-DOS based on your expectations and needs. Linux is not for everybody. If you always wanted to run a complete UNIX system at home, without the high cost of other UNIX implementations for personal computers, Linux may be what you're looking for.
Linux vs. The Other Guys.
A number of other advanced operating systems have become popular in the PC world. Specically, IBM's OS/2 and Microsoft Windows have become popular for users upgrading from MS-DOS. Both OS/2 and Windows NT are full featured multitasking operating systems, like Linux. OS/2, Windows NT, and Linux support roughly the same user interface, networking, and security features. However, the real difference between Linux and The Other Guys is the fact that Linux is a version of UNIX, and benets from contributions of the UNIX community at large.
http://www.tldp.org/LDP/gs/node3.html Page 17 of 27
1 Introduction to Linux
4/4/14, 12:27 PM
What makes UNIX so important? Not only is it the most popular operating system for multiuser machines, it is a foundation of the free software world. Much of the free software available on the Internet is written specically for UNIX systems. There are many implementations of UNIX from many vendors. No single organization is responsible for its distribution. There is a large push in the UNIX community for standardization in the form of open systems, but no single group controls this design. Any vendor (or, as it turns out, any hacker) may develop a standard implementation of UNIX. OS/2 and Microsoft operating systems, on the other hand, are proprietary. The interface and design are controlled by a single corporation, which develops the operating system code. In one sense, this kind of organization is benecial because it sets strict standards for programming and user interface design, unlike those found even in the open systems community. Several organizations have attempted the difcult task of standardizing the UNIX programming interface. Linux, in particular, is mostly compliant with the POSIX.1 standard. As time goes by, it is expected that the Linux system will adhere to other standards, but standardization is not the primary goal of Linux development.
Linux vs. other implementations of UNIX.
Several other implementations of UNIX exist for 80386 or better personal computers. The 80386 architecture lends itself to UNIX, and vendors have taken advantage of this. Oher implementations of UNIX for the personal computer are similar to Linux. Almost all commercial versions of UNIX support roughly the same software, programming environment, and networking features. However, there are differences between Linux and commercial versions of UNIX. Linux supports a different range of hardware than commercial implementations. In general, Linux supports most well-known hardware devices, but support is still limited to hardware which the developers own. Commercial UNIX vendors tend to support more hardware at the outset, but the list of hardware devices which Linux supports is expanding continuously. We'll cover the hardware requirements for Linux in Section 1.8. Many users report that Linux is at least as stable as commercial UNIX systems. Linux is still under development, but the two-pronged release philosophy has made stable versions available without impeding development. The most important factor for many users is price. Linux software is free if you can download it from the Internet or another computer network. If you do not have Internet access, you can still purchase Linux inexpensively via mail order on diskette, tape, or CD-ROM. Of course, you may copy Linux from a friend who already has the software, or share the purchase cost with someone else. If you plan to install Linux on a large number of machines, you need only purchase a single copy of the software--Linux is not distributed with a ``single machine'' license. The value of commercial UNIX implementations should not be demeaned. In addition to the price of the software itself, one often pays for documentation, support, and quality assurance. These are very important
http://www.tldp.org/LDP/gs/node3.html Page 18 of 27
1 Introduction to Linux
4/4/14, 12:27 PM
factors for large institutions, but personal computer users may not require these benets. In any case, many businesses and universities have found that running Linux in a lab of inexpensive personal computers is preferable to running a commercial version of UNIX in a lab of workstations. Linux can provide workstation functionality on a personal computer at a fraction of the cost. Linux systems have travelled the high seas of the North Pacic, and manage telecommunications and data analysis for an oceanographic research vessel. Linux systems are used at research stations in Antarctica. Several hospitals maintain patient records on Linux systems. Other free or inexpensive implementations of UNIX are available for the 80386 and 80486. One of the best known is 386BSD, an implementation of BSD UNIX for the 80386. The 386BSD package is comparable to Linux in many ways, but which one is better depends on your needs and expectations. The only strong distinction we can make is that Linux is developed openly, and any volunteer can aid in the development process, while 386BSD is developed by a closed team of programmers. Because of this, serious philosophical and design differences exist between the two projects. The goal of Linux is to develop a complete UNIX system from scratch (and have a lot of fun in the process), and the goal of 386BSD is in part to modify the existing BSD code for use on the 80386. NetBSD is another port of the BSD NET/2 distribution to several machines, including the 80386. NetBSD has a slightly more open development structure, and is comparable to 386BSD in many respects. Another project of note is HURD, an effort by the Free Software Foundation to develop and distribute a free version of UNIX for many platforms. Contact the Free Software Foundation (the address is given in Appendix C) for more information about this project. At the time of this writing, HURD is still under development. Other inexpensive versions of UNIX exist as well, like Minix, an academic but useful UNIX clone upon which early development of Linux was based. Some of these implementations are mostly of academic interest, while others are full edged systems.
1 Introduction to Linux
4/4/14, 12:27 PM
interface. In some cases, Linux programmers have attempted to write hackish device drivers based on assumptions about the interface. In other cases, developers work with the manufacturer and try to obtain information about the device interface, with varying degrees of success. In the following sections, we attempt to summarize the hardware requirements for Linux. The Linux Hardware HOWTO (see Section 1.9) contains a more complete listing of hardware supported by Linux. Disclaimer: Much hardware support for Linux is in the development stage. Some distributions may or may not support experimental features. This section lists hardware which has been supported for some time and is known to be stable. When in doubt, consult the documentation of your Linux distribution. See Section 2.2 for more information about Linux distributions. Linux is available for many platforms in addition to Intel 80x86 systems. These include Macintosh, Amiga, Sun SparcStation, and Digital Equipment Corporation Alpha based systems. In this book, however, we focus on garden-variety Intel 80386, 80486, and Pentium processors, and clones by manufacturers like AMD, Cyrix, and IBM.
Motherboard and CPU requirements.
Linux currently supports systems with the Intel 80386, 80486, or Pentium CPU, including all variations like the 80386SX, 80486SX, 80486DX, and 80486DX2. Non-Intel clones work with Linux as well. Linux has also been ported to the DEC Alpha and the Apple PowerMac. If you have an 80386 or 80486SX, you may also wish to use a math coprocessor, although one isn't required. The Linux kernel can perform FPU emulation if the machine doesn't have a coprocessor. All standard FPU couplings are supported, including IIT, Cyrix FasMath, and Intel. Most common PC motherboards are based on the PCI bus but also offer ISA slots. This conguration is supported by Linux, as are EISA and VESA-bus systems. IBM's MicroChannel (MCA) bus, found on most IBM PS/2 systems, is signicantly different, and support has been recently added.
Memory requirements.
Linux requires very little memory, compared to other advanced operating systems. You should have 4 megabytes of RAM at the very least, and 16 megabytes is strongly recommended. The more memory you have, the faster the system will run. Some distributions require more RAM for installation. Linux supports the full 32-bit address range of the processor. In other words, it uses all of your RAM automatically. Linux will run with only 4 megabytes of RAM, including bells and whistles like the X Window System and emacs. However, having more memory is almost as important as having a faster processor. For general use, 16 megabytes is enough, and 32 megabytes, or more, may be needed for systems with a heavy user load. Most Linux users allocate a portion of their hard drive as swap space, which is used as virtual RAM. Even if your machine has more than 16 megabytes of physical RAM, you may wish to use swap space. It is no
http://www.tldp.org/LDP/gs/node3.html Page 20 of 27
1 Introduction to Linux
4/4/14, 12:27 PM
replacement for physical RAM, but it can let your system run larger applications by swapping inactive portions of code to disk. The amount of swap space that you should allocate depends on several factors; we'll come back to this question in Chapter 2.
Hard drive controller requirements.
It is possible to run Linux from a oppy diskette, or, for some distributions, a live le system on CD-ROM, but for good performance you need hard disk space. Linux can co-exist with other operating systems--it only needs one or more disk partitions. Linux supports all IDE and EIDE controllers as well as older MFM and RLL controllers. Most, but not all, ESDI controllers are supported. The general rule for non-SCSI hard drive and oppy controllers is that if you can access the drive from MS-DOS or another operating system, you should be able to access it from Linux. Linux also supports a number of popular SCSI drive controllers. This includes most Adaptec and Buslogic cards as well as cards based on the NCR chip sets.
Hard drive space requirements.
Of course, to install Linux, you need to have some amount of free space on your hard drive. Linux will support more than one hard drive on the same machine; you can allocate space for Linux across multiple drives if necessary. How much hard drive space depends on your needs and the software you're installing. Linux is relatively small, as UNIX implementations go. You could run a system in 20 megabytes of disk space. However, for expansion and larger packages like X, you need more space. If you plan to let more than one person use the machine, you need to allocate storage for their les. Realistic space requirements range from 200 megabytes to one gigabyte or more. Also, you will likely want to allocate disk space as virtual RAM. We will discuss installing and using swap space in Chapter 2. Each Linux distribution comes with literature to help you gauge the precise amount of storage required for your software conguration. Look at the information which comes with your distribution or the appropriate installation section in Chapter 2.
Monitor and video adaptor requirements.
Linux supports standard Hercules, CGA, EGA, VGA, IBM monochrome, Super VGA, and many accelerated video cards, and monitors for the default, text-based interface. In general, if the video card and monitor work under an operating system like MS-DOS, the combination should work ne under Linux. However, original IBM CGA cards suffer from ``snow'' under Linux, which is not pleasant to view. Graphical environments like X have video hardware requirements of their own. Rather than list them here, we relegate that discussion to Section 5.1. Popular video cards are supported and new card support is added regularly.
http://www.tldp.org/LDP/gs/node3.html
Page 21 of 27
1 Introduction to Linux
4/4/14, 12:27 PM
Miscellaneous hardware.
You may also have devices like a CD-ROM drive, mouse, or sound card, and may be interested in whether or not this hardware is supported by Linux.
Mice and other pointing devices.
Typically, a mouse is used only in graphical environments like X. However, several Linux applications that are not associated with a graphical environment also use mice. Linux supports standard serial mice like Logitech, MM series, Mouseman, Microsoft (2-button), and Mouse Systems (3-button). Linux also supports Microsoft, Logitech, and ATIXL bus mice, and the PS/2 mouse interface. Pointing devices that emulate mice, like trackballs and touchpads, should work also.
CD-ROM drives.
Many common CD-ROM drives attach to standard IDE controllers. Another common interface for CD-ROM is SCSI. SCSI support includes multiple logical units per device so you can use CD-ROM ``jukeboxes.'' Additionally, a few proprietary interfaces, like the NEC CDR-74, Sony CDU-541 and CDU-31a, Texel DM3024, and Mitsumi are supported. Linux supports the standard ISO 9660 le system for CD-ROMs, and the High Sierra le system extensions.
Tape drives.
Any SCSI tape drive, including quarter inch, DAT, and 8MM are supported, if the SCSI controller is supported. Devices that connect to the oppy controller like oppy tape drives are supported as well, as are some other interfaces, like QIC-02.
Printers.
Linux supports the complete range of parallel printers. If MS-DOS or some other operating system can access your printer from the parallel port, Linux should be able to access it, too. Linux printer software includes the UNIX standard lp and lpr software. This software allows you to print remotely via a network, if you have one. Linux also includes software that allows most printers to handle PostScript les.
Modems.
As with printer support, Linux supports the full range of serial modems, both internal and external. A great deal of telecommunications software is available for Linux, including Kermit, pcomm, minicom, and seyon. If your modem is accessible from another operating system on the same machine, you should be able to access it from Linux with no difculty.
Ethernet cards.
http://www.tldp.org/LDP/gs/node3.html Page 22 of 27
1 Introduction to Linux
4/4/14, 12:27 PM
Many popular Ethernet cards and LAN adaptors are supported by Linux. Linux also supports some FDDI, frame relay, and token ring cards, and all Arcnet cards. A list of supported network cards is included in the kernel source of your distribution.
1 Introduction to Linux
4/4/14, 12:27 PM
If you do not have Usenet, there are mail-to-news gateways available for many (if not all) of the newsgroups
http://www.tldp.org/LDP/gs/node3.html Page 24 of 27
1 Introduction to Linux
4/4/14, 12:27 PM
below.
http://www.tldp.org/LDP/gs/node3.html
Page 25 of 27
1 Introduction to Linux
4/4/14, 12:27 PM
This list is by no means complete. New groups are created when a need for a subdivision of discussion is advisable, and there are linux groups in other hierarchies as well.
Include a line with the word help in the body of the message, and a message will be returned to you which describes how to subscribe and unsubscribe to various mailing lists. The word lists on a line by itself will retrieve the names of mailing lists which are accessible through the majordomo.vger.rutgers.edu server. There are several special-purpose mailing lists for Linux as well. The best way to nd out about these is to watch the Linux Usenet newsgroups for announcements, as well as to read the list of publicly-available mailing lists, which is posted to the Usenet news.answers group.
1 Introduction to Linux
4/4/14, 12:27 PM
sources of information are listed in Section 1.9 and Appendix A. These documents are laboriously written for people who need help with the Linux system, like you. As mentioned above, books written for UNIX are applicable to Linux, and you should use them, too. If you have access to Usenet news, or any of the Linux-related mailing lists, be sure to read the information there before posting. Often, solutions to common problems that are not easy to nd in the documentation are well-covered in newsgroups and mailing lists. If you only post to these groups but don't read them, you are asking for trouble. Learn to appreciate self-reliance. You asked for it by running Linux in the rst place. Remember, Linux is all about hacking and xing problems. It is not a commercial operating system, nor does it try to be one. Hacking won't kill you. In fact, it will be enlightening to investigate and solve problems yourself--you may even one day call yourself a Linux guru. Learn to appreciate the full value of hacking the system and xing problems yourself. You shouldn't expect to run a complete, homebrew Linux system without some handiwork. Remain calm. Nothing is earned by taking an axe--or worse, a powerful electromagnet--to your Linux box. A large punching bag or a long walk is a good way to relieve occasional stress attacks. As Linux matures and distributions become more reliable, we hope this problem will disappear. However, even commercial UNIX implementations can be tricky. When all else fails, sit back, take a few deep breaths, and return to the problem when you feel relaxed. Your mind and conscience will be clearer. Refrain from posting spuriously. Many people make the mistake of posting or mailing messages pleading for help prematurely. When encountering a problem, do not rush immediately to the nearest terminal and post a message to one of the Linux Usenet groups. First try to resolve the problem yourself, and be absolutely certain what the problem is. Does your system not respond when switched on? Perhaps it is unplugged. When you post for help, make it worthwhile. Remember that people who read your post are not necessarily there to help you. Therefore, it is important to remain as polite, terse, and informative as possible. How does one accomplish this? First, you should include as much relevant information about your system and your problem as possible. Posting the simple request, ``I cannot seem to get e-mail to work'' will probably get you nowhere unless you include information about your system, what software you're using, what you have attempted to do so far, and what the results were. When you include technical information, it is also a good idea to include general information about the version of your software (the Linux kernel version, for example), as well as a brief summary of your hardware conguration. But don't overdo it--your monitor type and brand is probably irrelevant if you're trying to congure network software.
Next: 2 Obtaining and Installing Up: Linux Installation and Getting Previous: Preface Clarica Grove Wed Mar 4 10:46:42 PST 1998
http://www.tldp.org/LDP/gs/node3.html
Page 27 of 27