
- •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 12 Linux Disk and System Management |
399 |
Summary
This chapter details many different system administration tasks. Disk and file system management, scheduling tasks, networking, analyzing core dumps, and installing new packages and patches are all routine tasks of the Linux system administrator. For the exam, keep the following points in mind:
Disk and File Management
•fdisk: Formats disk partitions
•mkfs: Creates a file system on a partition
•fsck: File system check for fixing disk errors
Job Scheduling
•at: Can only schedule a task for one time
•cron: Can schedule recurring tasks
Core Dumps
•core: Typical name of the core file
•gdb: GNU debugger tool for debugging core files
Networking
•ifconfig -a: Used to show information on all network interfaces
•ifconfig eth0: Configures the first ethernet interface
•ifconfig lo: Configures the loopback interface
Package Upgrades and Patches
•rpm -U: Upgrades an RPM package
•rpm -i: Installs an RPM package
•tar -xvf: Extracts a tar archive, tar file has .tar extension
•tar -zxvf: Extracts and decompresses a tar archive compress with gzip
•gunzip: Unzips a compressed file with extension .gz
•gzip: Compresses a file
•configure, make, make install to compile and install source code binaries
•Upgrade after work hours to avoid affecting users

400 Chapter 12 Study Guide
STUDY GUIDE
The Study Guide section provides you with the opportunity to test your knowledge about the Linux+ exam objectives that are covered in this chapter. The Assessment Questions provide practice for the real exam, and the Scenarios provide practice with real situations. If you get any questions wrong, use the answers to determine the part of the chapter that you should review before continuing.
Assessment Questions
1.What command do you use to format a partition with a file system?
A.fdisk
B.fsmake
C.format
D.mkfs
2.On a Linux Web server, the Apache http server keeps crashing unexpectedly. What can the Linux administrator check to stop the crashes?
A.process kill log
B.core file
C./var/log/dmesg
D.root cron file
3.An administrator wants to create the local loopback network interface on her Linux system. Which command will correctly perform the task?
A.ifconfig lo
B.ifconfig -loopback
C.ifconfig -a
D.ifconfig 255.255.255.255
4.Which of the following cron commands will create a cron job that will run at 5:00 a.m. every Sunday?
A.* 5 * * S /etc/cron.weekly
B./etc/cron.sunday
C.* 5 * * 0 /etc/cron.weekly
D.5 0 * * S /etc/cron.weekly

Chapter 12 Study Guide 401
5.What kind of file is stored with an extension of tar.gz?
A.Backup files
B.Temporary files
C.A special compression executable
D.A file that has been tar and gzipped
6.What command should be used to set a network interface to the IP address, 192.168.1.5, with a subnet mask of 255.255.255.0?
A.ifconfig eth0 192.168.1.5 netmask 255.255.255.0
B.ifconfig lo 192.168.1.5 netmask 255.255.255.0
C.ifconfig eth1 192.168.1.5 broadcast 255.255.255.0
D.ifconfig -a 192.168.1.5 255.255.255.0
7.Which option in fdisk will display the partition table?
A.s (show partition table)
B.p (print partition table)
C.fdisk partition
D.t (tables)
8.What command can you use to view and debug an application’s core file?
A.cron
B.debug
C.vi
D.gdb
9.To create a recurring scheduled task, which Linux scheduling tool should you use to perform the task?
A.cron
B.at
C.timer
D.gdb
10.To upgrade an RPM package, which is the proper command to use?
A.rpm -upgrade
B.rpm -i
C.rpm -U
D.rpm -upg

402 Chapter 12 Study Guide
11.What command can you use to enable an ethernet network interface that has already been configured?
A.ifconfig eth0 on
B.ifconfig eth0 up
C.ifconfig eth0 down
D.ifconfig eth0 start
12.What is the proper command to open and decompress a file with a tar.gz extension?
A.tar -zxvf filename
B.gzip -txvf filename
C.uncompress filename
D.gunzip -txvf filename
13.A core dump file contains this message, “Program terminated with signal 11, segmentation fault.” What does this message indicate?
A.The program is a kernel system process
B.Signal 11 means the program is still running, but had an error
C.The program halted because of a memory segment fault
D.Nothing, this is informational only
14.What command runs fdisk on the first ATA/IDE hard drive?
A.fdisk /dev/hda
B.fdisk /dev/sda1
C.fdisk hda1
D.fdisk /dev/hda2
15.An application is creating several, very large core dump files. What should the administrator do if he has no intention of debugging these files?
A.Copy them to gdb
B.Delete the core files
C.Move them to the root partition
D.Change the name of the file, so that new core files can be created

Chapter 12 Study Guide 403
16.What is the best reason to upgrade a package or application on your Linux system?
A.Updated security
B.Less program bugs
C.More program functionality
D.All of the above
17.When checking the partition information on your hard drive with fdisk, you notice that one of the partitions is formatted as “Linux Swap,” and is approximately 128MB in size. What is the purpose of this partition?
A.Special disk area for the Linux Swap file
B.Overflow area in case the main partition runs out of space
C.Virtual memory that is not used
D.Holds temp files and deleted items
18.What sort of kernel error can cause a Linux system to crash and write a memory core dump?
A.Cron daemon error
B.Corrupt swap file
C.Kernel panic
D.Web server error
19.An administrator needs to create a second network interface with an IP address of 192.168.1.10, a subnet mask of 255.255.255.0, and a broadcast address of 192.168.1.254. What command will accomplish this task?
A.ifconfig eth1 192.168.1.10 netmask 255.255.255.0 broadcast 192.168.1.254
B.ifconfig lo 192.168.1.10
C.ipconfig eth0 192.168.1.10 netmask 255.255.255.0 bc=254
D.ifconfig eth0 192.168.1.10 netmask 255.0.0.0 broadcast 192.168.1.254
20.What command should you use to set up a job to run at 11:59 p.m. today?
A.cron 59 11 * * *
B.at 23:59
C.cron 11:59pm
D.at 11:59am