
- •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

378 Chapter 11 Study Guide
Answers to Chapter Questions
Chapter Pre-test
1.The tar command, which stands for tape archive, archives several files into one single file for easier storage on disk or tape.
2.Runlevel 0 indicates a halted system that is shutdown.
3.If you don’t shut down your Linux system properly with the shutdown or init commands, you risk causing damage to your hard drive data because the file systems aren’t properly unmounted before shutdown.
4.The process that runs the print spooler is lpd.
5.Startup scripts are located in /etc/rc.d or /etc/init.d.
6.“S” stands for a start script, which will start a process, and “K” stands for kill script, which will kill a process.
7.To enter command mode in the vi editor, hit Escape.
8.The Graphical User Interface (GUI) will run in runlevel 5.
9.To print from the command line, use the lpr command.
10.With the tar command, use tar -xvf [filename].
Assessment Questions
1.C. In the /etc/inittab file, the default runlevel is probably set to 0, which tells it to shutdown right after the system has started. For review, see the “Linux Runlevels” section.
2.B. The correct command is shutdown -h 100 to perform this action. For review, see the “Shutting down Linux” section.
3.A. This script is a startup script for the system’s networking processes. For review, see the “Startup scripts” section.
4.D. Runlevel 5 is used to boot up a full multiuser system and to automatically start X-windows. For review, see the “Linux Runlevels” section.
5.B. The Line Printing Daemon (lpd) controls the print spooling process, and is started automatically at boot time. For review, see the “Printing management” section.
6.C. The correct location is the /etc/inittab file. For review, see the “Linux Runlevels” section.
7.A. The correct command is :wq used in command mode. For review, see the “Using the vi Editor” section.
8.D. The tar command doesn’t compress data. To compress data, use the gzip or compress command. For review, see the “Using the tar command” section.

Chapter 11 Study Guide 379
9.B. The halt command will shut down a Linux system without rebooting. For review, see the “Shutting down Linux” section.
10.A. init 1 will bring the system to single-user mode. For review, see the “Linux Runlevels” section.
11.C. The correct command to check the printer queue status is lpq. For review, see the “Printing management” section.
12.B. The reload command will tell the system to stop the service, reload the configuration file, and restart the service. For review, see the “Managing Linux Services” section.
13.A. The file that contains specific printer configuration information is /etc/printcap. For review, see the “Printing management” section.
14.D. The command to reboot a Linux system is reboot. For review, see the “Shutting down Linux” section.
15.D. To insert text in the vi editor, you must be in insert mode. For review, see the “Using the vi Editor” section.
16.C. Because the service is currently not running, use the start command. For review, see the “Managing Linux Services” section.
17.A. To extract files from an archive, use the -x argument in the tar command. For review, see the “Using the tar command” section.
18.A. init runlevel 6 is used to shut down and reboot the system. For review, see the “Linux Runlevels” section.
19.B. The correct location for the startup scripts for runlevel 5 is /etc/rc.d/rc5.d. For review, see the “Linux Runlevels” section.
20.D. The correct command to quit without saving in the vi editor is :q! in the command mode. For review, see the “Using the vi Editor” section.
Scenarios
1.Because the DNS process (named) is already running, it may be in a locked state. Use the following commands to change into the startup script directory for the process, and then restart the service.
cd /etc/rc.d/init.d
./named restart
If you encounter no other problems, such as with the configuration file, the service should recover.
2.To change the default runlevel, edit the configuration file for init, which is /etc/inittab.
Use the vi editor to edit the file using the following command: vi /etc/inittab

380 Chapter 11 Study Guide
Use the cursor keys to jump down to the line that reads:
id:5:initdefault:
Position the cursor over the number 5, and hit the x key to delete the character. Press the letter i to enter insert mode, and type the number 3.
The new entry should look like the following:
id:3:initdefault:
Now enter command mode by pressing Escape, and then use the following command to save the file:
:wq
Now reboot the system, and it should boot up into runlevel 3, without the X windows.

Maintaining the
Linux System
System maintenance is another common task for the Linux administrator. Some of your specific duties that
are necessary in maintaining a Linux system include creating and managing local storage devices and file systems, verifying user and root cron jobs, and identifying core dumps.
This part covers these topics, but also details how to run and interpret ifconfig; how to download and install patches and updates; how to identify, execute, and kill processes; and finally, how to monitor system log files. I also cover how to perform and verify backups and restores, along with how to perform and verify security best practices, how to set daemon and process permissions, and how to properly document work that is performed on a system. System maintenance is not only good to know in the real world but also for the Linux+ exam. Fourteen percent for the exam will focus of System Maintenance.
P A R T
V
In This Part
Chapter 12
Linux Disk and
System Management
Chapter 13
Process Management
Chapter 14
Linux Security
Chapter 15
Backing Up Your
Linux System


Linux Disk and |
C H A P T E R |
12 |
System
Management |
|
|
EXAM OBJECTIVES
5.1 Create and manage local storage devices and file systems (e.g., fsck, fdisk, mkfs)
5.2 Verify user and root cron jobs and understand the function of cron
5.3 Identify core dumps and remove or forward as appropriate
5.4 Run and interpret ifconfig
5.5 Download and install patches and updates (e.g., packages, tgz)

384 Part V Maintaining the Linux System
CHAPTER PRE-TEST
1.What is the function of cron?
2.What kind of file has a tar.gz extension?
3.What kinds of information can the ifconfig command show you?
4.After creating a partition, what command do you use to make a file system?
5.Why should core dumps be analyzed?
6.What is the purpose of a program patch?
7.How does the at function differ from cron?
8.How can the fsck command help fix disk errors?
9.What is the best time to perform system updates and upgrades?
10.What is the purpose of the fdisk command?
Answers to these questions can be found at the end of the chapter.