
- •About the Author
- •Credits
- •How This Book Is Organized
- •Part I: Linux Basics
- •Part II: Installation
- •Part III: Configuration
- •Part IV: Administration
- •Part V: Maintaining the Linux System
- •How Each Chapter Is Structured
- •How to Use This Book
- •Conventions Used in This Book
- •What is Linux?
- •The origin of UNIX
- •Who started Linux?
- •Understanding Open Source
- •Understanding Closed Source
- •Understanding Artistic License
- •Is Freeware really free?
- •Is Shareware never free?
- •A comparison and contrast of licensing methods
- •The Growth of Linux
- •Linux on a Personal Computer
- •Graphical installation
- •Hardware detection
- •Graphical user interface
- •Linux limitations on the PC
- •Linux succeeds on the PC
- •Linux on workstations
- •Linux on servers
- •Summary
- •Assessment Questions
- •Scenarios
- •Answers to Chapter Questions
- •Assessment Questions
- •Scenarios
- •Linux Kernel
- •Kernel versions
- •Kernel availability
- •Linux Distributions
- •Beehive
- •BlueCat
- •Caldera OpenLinux
- •Debian
- •Corel
- •DragonLinux
- •Elfstone
- •Gentoo
- •Hard Hat Linux
- •KRUD
- •LinuxPPC
- •Mandrake
- •Phat Linux
- •Slackware
- •StormLinux
- •SuSE
- •TurboLinux
- •Yellow Dog Linux
- •Mini and Specialty Distributions
- •Astaro
- •KYZO
- •FlightLinux
- •NetMAX
- •Packages and Packaging Solutions
- •Red Hat Package Manager
- •Debian Package Management System
- •Tarball
- •Linux Resources
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Assessment Questions
- •Scenarios
- •Linux In the Real World
- •Word Processing
- •Spreadsheets and databases
- •Web browsing
- •File transfer
- •More, more, and more applications
- •The Server and DNS
- •A Linux Web server
- •Linux e-mail server
- •File servers
- •Proxy, news, and search servers
- •FTP servers
- •Firewalls
- •Determining Linux Roles and Services
- •Comparing Linux with other operating systems
- •Hardware compatibility
- •Summary
- •Assessment Questions
- •Scenarios
- •Answers to Chapter Questions
- •Assessment Questions
- •Scenarios
- •Installing Linux
- •Final Preparations for Installation
- •Verification
- •Package selection
- •Final hardware verification
- •Pre-installation partitioning planning
- •Installing Linux
- •Text or GUI installation
- •Basic setup of Linux
- •Selecting the machine type
- •Partitioning the hard disk drive
- •Installing a boot manager
- •Creating the Boot Diskette
- •Networking
- •Additional installation information
- •Accounts and passwords
- •Additional packages to install
- •GUI installation
- •Obtaining video card information
- •Configuring the X windows system
- •Selecting the windows manager or desktop environment
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Answers to Assessment Questions
- •Scenarios
- •Alternative to the GUI Installation
- •Command Line installation
- •Install the Linux system
- •Network installations of Linux
- •Review of a Linux Installation
- •Installation media
- •Initial selections
- •Installation type or class
- •Disk partitioning and formatting
- •Installing LILO
- •Network configuration
- •User accounts
- •Authentication methods
- •Package selection and installation
- •A Dual-Boot Installation of Linux
- •Linux with Microsoft Windows
- •Linux with Microsoft Windows NT and 2000
- •Linux and Solaris
- •Linux and other operating systems
- •Installing Additional Software with gzip and tar
- •Installing Additional Software with RPM
- •Removing software with RPM
- •Upgrading software with RPM
- •Query the RPM software
- •Verify the RPM software
- •Verify the package files
- •Upgrading the Kernel
- •Upgrading a Linux Kernel
- •System Log Files
- •The Final Test of the Installation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •What is the X Window System?
- •The X Window System
- •X Client and Server communications
- •X Window Manager
- •Configuring X Window Systems
- •Custom X Window System Programs
- •Manual Configuration of the X Window System
- •Documentation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Basic Network Services
- •TCP/IP Protocol Suite
- •Connection protocols needed
- •Other network protocols
- •Configuring Basic Network Services
- •Host name
- •IP addressing
- •DHCP
- •Netmask
- •Hardware resources
- •Routing and gateways
- •PPP, SLIP and PLIP connections
- •Server Tasks with
- •IP aliases for virtual hosts
- •Apache Web Server
- •Samba File Server
- •Home directories
- •Disk shares
- •Configuring Client Services
- •SMB/CIFS
- •NIS client configuration
- •NFS client configuration
- •Configuring Internet Services
- •Web browser
- •POP and SMTP
- •TFTP
- •SNMP
- •Remote Access
- •Rlogin
- •Telnet
- •OpenSSH
- •Documentation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Adding Hardware
- •Memory
- •Swap
- •Adding a hard drive
- •Video and monitor
- •Printers
- •Configuration files
- •Setting environment variables
- •BASH
- •Documentation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Basic User and Group Administration
- •What are users and groups?
- •Creating users
- •Change user information
- •Deleting users
- •Creating groups
- •Getting Around Linux
- •Navigating Linux
- •Common file and directory commands
- •Setting File and Directory Permissions
- •Mounting and Managing File Systems
- •Mount
- •Umount
- •Mounted file systems
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Multi-User Environment
- •The creation of Virtual Consoles
- •The Linux Terminal Server Project
- •Configurations for remote systems
- •Monitoring remote connections
- •Common Shell Commands
- •Basic shell scripts
- •Caution using root access
- •Navigating the GUI interface
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Linux Runlevels
- •init
- •Shutting down Linux
- •Managing Linux Services
- •Configuring Linux Printing
- •lpd daemon
- •/etc/printcap
- •Printing management
- •Using the vi Editor
- •vi operation modes
- •Editing text files
- •Using the
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Disk and File System Management
- •Repairing Partitions
- •System Automation and Scheduling
- •cron
- •Core Dumps
- •Analyzing core dumps
- •GNU Debugger
- •Managing Networking Interfaces
- •Installing System Packages and Patches
- •Compressed archive
- •Debian Package Installer
- •Slackware Package Installation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Linux Processes
- •Core services versus non-critical services
- •Process administration
- •Process control
- •Monitoring Log Files
- •Maintaining Documentation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Linux Security
- •Securing the Environment
- •Location
- •Environment
- •System Security
- •System/user files
- •Permissions
- •Log auditing
- •Backups
- •Linux Security Best Practices
- •Network security
- •Firewall
- •System security
- •Securing a Web server
- •Securing an FTP server
- •FTP program version
- •FTP configuration files
- •Process security
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Disaster Recovery Planning
- •Types of data
- •Frequency and Scheduling
- •Storage and media types
- •Recovering data
- •Offsite storage
- •Linux Backup Tools and Commands
- •Third party tools
- •Tape devices
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Identifying the Problem
- •Methodology and Best Practices
- •Troubleshooting Resources
- •Documentation resources
- •Internet resources
- •System Log Files
- •Tools for Log Files
- •Output to another file
- •Locating files
- •Process Configuration and Management
- •Stopping, Starting, and Restarting Processes
- •Configuration Files
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Examining the Startup Process
- •Boot process steps
- •Analyzing Boot Process Errors
- •Common Boot Problems
- •Using System Status Tools
- •File System Check
- •System Resource Commands
- •Using the System Boot Disk
- •Types of boot disks
- •Creating a boot disk
- •Creating a rescue/utility disk
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Common User Problems
- •Login problems
- •File and directory permissions
- •Printing problems
- •Mail problems
- •Software Package Problems
- •Package dependencies
- •Software and version conflicts
- •Backup and Restore Errors
- •Backup hardware
- •Backup software
- •File restore errors
- •Application Failures
- •Log files
- •Process and daemon errors
- •Web server errors
- •Telnet
- •Mail services
- •Basic Networking Troubleshooting
- •Networking connectivity
- •Network hardware problems
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Mainboard Components
- •BIOS
- •System memory
- •System Resources
- •I/O addresses
- •Direct memory access
- •Laptop Considerations
- •PCMCIA
- •Linux Peripheral Configuration
- •Installing and Configuring SCSI Devices
- •SCSI definitions
- •SCSI technologies
- •SCSI cabling and termination
- •SCSI device configuration
- •Linux SCSI devices
- •ATA/IDE Devices
- •IDE drive configuration
- •Linux ATA/IDE Drive configuration
- •Linux Support for Other Devices
- •IEEE 1394 (Firewire)
- •Summary
- •Assessment Questions
- •Scenarios
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •What’s on the CD-ROM
- •System Requirements
- •Using the CD with Microsoft Windows
- •Using the CD with Linux
- •Microsoft Windows applications
- •Linux applications
- •Troubleshooting
- •Sample Exam
- •Exam Questions
- •Exam Answers
- •Taking a CompTIA Exam
- •How to register for an exam
- •What to expect at the testing center
- •Your exam results
- •If you don’t receive a passing score
- •About the Linux + Exam
- •Preparing for the Linux+ Exam
- •For More Information
- •Preamble
- •No Warranty
- •Glossary
- •Index

Chapter 2 Linux Kernel and Distributions |
31 |
Kernel availability
1.10 Identify where to obtain software and resources
The availability of the kernel is clearly protected by the GNU GPL licensing method, and this protection allows users to download the Linux kernel in all of its various forms from the Internet. You can download the kernel from several locations, but all kernel releases are kept at www.kernel.org and include a brief or detailed description of the release. Customized kernels are available from the creators of various Linux distributions, but Linus Torvalds, who created the Linux kernel, has customarily released the most updated version of the kernel.
Linux Distributions
1.7 Identify strengths and weaknesses of different distributions and their packaging solutions (e.g., tar ball vs. RPM/DEB)
1.10 Identify where to obtain software and resources
Because of the Open Source nature of the Linux kernel, which allows anyone to modify or enhance the base kernel with other software, Linux is available in a wide variety of distributions.
A Linux distribution is a collection of software packages, utilities, and tools, and is based on the version of a Linux kernel. Distributions are often created with a specific purpose in mind, such as an embedded Web server or a special network server for an ISP. Most are general-purpose distributions, meaning that they come with a wide variety of software packages, tools, and applications that can be installed by the end user, resulting in ultimate flexibility.
Each distribution comes with its own characteristics and special tools, created by the distribution company to increase the value of their version of Linux. Most of these distributions can be obtained for free (in keeping with the GPL license) but many companies also sell commercial distributions. Most Linux vendors center their business on a service support model for their distribution.
The following sections list the most popular types of Linux distributions available.
Beehive
The goal of Beehive Linux is to provide a fast, simple, and secure i686 optimized Linux distribution. The distribution is small — approximately 250MB — and installs at about 120MB. Therefore, this distribution has the benefit of being able to quickly configure a new system without having to install the added modules for older

32 Part I Linux Basics
hardware that must be removed from the kernel in order to achieve optimal performance. This timesaving benefit is intended for the experienced user. Because Beehive Linux doesn’t include support for any hardware other than i686 CPUs, the kernel installs already optimized for the speed of this processor. The lack of support for other features on older machines, such as built-in menus and GUIs, allows the experienced user to get a Linux workstation or server up quickly and provides the optimized performance and security that this distribution is attempting. The primary drawback of Beehive Linux is the limited support for new Linux users. Because Beehive Linux is intended for the experienced user, there is no easy-to- follow installation or Windows-like environment. Beehive Linux is available at www.beehive.nu/.
BlueCat
BlueCat Linux is a Linux distribution that is enhanced to meet the requirements of embedded device developers. BlueCat includes enhancements for LynuxWorks’ cross-development and embedding tools, and is royalty-free. LynuxWorks is a founding member of the real-time operating systems (RTOS) industry, creating its first product in the late 1980s for the NASA-funded space station program. With the introduction of its Linux strategy, it is now a leader in the embedded Linux market. Here are more details about BlueCat Linux:
Allows the development of embedded devices without the cost of using a nonopen source tool.
Matches the requirements of embedded small devices to large-scale multi-CPU systems.
Supports the ARM (7 with MMU, 7 with SOC, 9), Intel x86, MIPS R3000 and R4000, Motorola PowerPC, PowerQUICC, StrongARM and Super-H architectures with an embedded target of Intel IA-32, Motorola PowerPC, PowerQUICC II, or compatible processors.
This distribution is an example of the niche market for Linux and is available at www.lynuxworks.com/.
Caldera OpenLinux
OpenLinux was designed by Caldera for corporate commercial use. The OpenLinux distribution includes all the GNU software packages, as well as many other wellknown software and system packages. It is POSIX (Portable Operating System Interface for Computer Environments) compliant (as is Linux, but not all distributions of Linux), so it adheres to the ANSI (American National Standards Institute) standard for UNIX. Although OpenLinux is distributed free of charge, Caldera provides support for an additional fee. Caldera’s support ranges from the eDesktop package to the eServer package. The eDesktop was designed for basic workstation

Chapter 2 Linux Kernel and Distributions |
33 |
installations and the eServer includes software packages, such as DHCP, DNS, FTP, and mail for the server environment. Caldera is also a major UNIX system provider with SCO OpenServer UNIX — the world’s best selling UNIX server operating system — and UnixWare 7, which Caldera uses to provide unified UNIX with Linux solutions. Caldera provides excellent support for the registered user but limited support for the non-registered user. OpenLinux is available at www.caldera.com/.
Debian
Debian was created by a group of volunteer programmers. It is an entirely noncommercial project but does provide support for commercial products in the distribution. Corel and Sun currently maintain software associations with Debian. Although Debian uses the Linux kernel, it is known as Debian GNU/Linux because it distributes GNU software with its distribution (as do all Linux distributions). The Debian distribution is fairly easy to install and configure but is usually preferred by more experienced Linux users because Debian is entirely noncommercial and support is limited; as a result, some new Linux users will avoid it altogether. The Debian distributions can provide support for Alpha, ARM, Intel, Macintosh 68k, PowerPC, and Sparc Platforms, and is available at www.debian.org/.
Corel
Corel Linux was designed specifically for the desktop computer. Corel is a Debianbased distribution with a four-step graphical installer that requires very little user interaction — thus making it one of the easiest distributions to install for the novice. This distribution features a customized KDE drag-and-drop environment, including an easy-to-use browser style file manager. Corel Linux is very easy to install on non-customized hardware and provides very good support on the average desktop. The Corel Linux distribution also provides easy support for a dual boot PC. Because Corel Linux is a very customized distribution designed for easy installation and use, it has pushed away some traditional Linux users. The ability to provide this ease of installation does not allow much user interaction or intervention, and therefore prevents some users from installing Corel Linux on customized hardware. The customized desktop has also caused some advanced users to dislike the Corel Linux distribution. Corel specializes in the novice Linux user and coexistence with another operating system for the novice Linux user and is available at http://linux.corel.com/.
DragonLinux
DragonLinux was created to run on top of versions of Microsoft Windows or any version of DOS. This is a complete Linux operating system that specializes in the beginning user, who will enjoy the quick install and the software’s ability to co-exist with the existing desktop environment, which may also be beneficial to the experienced user. DragonLinux does not require you to repartition your hard drive. The

34 Part I Linux Basics
main advantage provided by DragonLinux is that most Linux distributions can coexist with Microsoft products — but the products do require their own separate partition. The benefits of DragonLinux, however, are also its disadvantages. Because it installs on top of Windows or DOS, it uses the file structure of the host operating system. Therefore, users don’t benefit from enhanced Linux file systems, such as the Reiser file system, or the added stability of a UNIX-like system. DragonLinux is available at www.dragonlinux.net/.
Elfstone
Elfstone Linux was not designed to dual-boot or share disk partitions with other operating systems. Elfstone is perhaps the most Unix-like of all commercial distributions, and therefore provides excellent support for engineers, network administrators, and programmers. Elfstone Linux provides an interface that is a Motif/Athena hybrid to provide a fast and intuitive interface. Because it isn’t designed as a dualboot system, Elfstone Linux is a drawback for anyone who is not dedicated to running only Linux. The Elfstone Linux distribution is available at www.elflinux.com/linux.html.
Gentoo
Gentoo Linux considers itself to be a meta-distribution or Linux technology engine. It supports advanced features including dependencies, “fake” installs, package management, unmerging, virtual packages, and more. The tools let you install only the packages that you need to run your system. For example, if you don’t select GNOME, then none of the modules will include GNOME support. But if you do select GNOME support, then all the modules will be installed. This helps to control the installation of useless packages and therefore prevents the bloat that other systems experience. Although the Gentoo system is very advanced, it is slow to develop and has yet to be adopted by other distributions, and is therefore less attractive to users. The Gentoo distribution is available at www.gentoo.org/.
Hard Hat Linux
Hard Hat Linux is the leading Linux distribution for embedded applications. It is designed to provide the scalability, dependability, and performance that is required by embedded systems. Hard Hat supports the x86, PowerPC, StrongARM, MIPS, SH, and SPARC platforms. Hard Hat Linux is best known for being selected as IBM’s, PowerPC-based set-top box controller chips Linux port. Therefore, Hard Hat Linux is not intended for the common user, but rather for those creating, modifying, and supporting the embedded systems. More information on Hard Hat Linux can be found at www.mvista.com/.