Home Page Icon
Home Page
Table of Contents for
LPI Linux Certification in a Nutshell
Close
LPI Linux Certification in a Nutshell
by James Stanger, Jeff Dean, Nicolai Langfeldt, Bruno Gomes Pessanha, Steven Pritch
LPI Linux Certification in a Nutshell, 2nd Edition
LPI Linux Certification in a Nutshell
Preface
The Linux Professional Institute
Audience for This Book
Organization
Book Chapters
Conventions Used in This Book
Using Code Examples
Safari Enabled
How to Contact Us
Acknowledgments
I. General Linux Exam 101
1. LPI Exams
1.1. Exam 101 Overview
2. Exam 101 Study Guide
2.1. Exam Preparation
3. Hardware and Architecture (Topic 1.101)
3.1. Objective 1: Configure Fundamental BIOS Settings
3.1.1. BIOS
3.1.1.1. Date and time
3.1.1.2. Disks and boot devices
3.1.2. Resource Assignments
3.1.3. 1024-Cylinder Limit
3.2. Objective 3: Configure Modems and Sound Cards
3.2.1. Modems
3.2.1.1. Modem types
3.2.1.2. Modem hardware resources
3.2.2. Sound Devices
3.3. Objective 4: Set Up Non-IDE Devices
3.3.1. SCSI
3.3.1.1. SCSI types
3.3.2. SCSI IDs
3.3.2.1. SCSI logical unit numbers
3.3.2.2. Linux SCSI disk device files
3.3.2.3. Termination
3.3.2.4. SCSI controllers on PCs
3.4. Objective 5: Set Up Different PC Expansion Cards
3.4.1. Plug and Play
3.4.1.1. Using the /proc filesystem
3.5. Objective 6: Configure Communications Devices
3.6. Objective 7: Configure USB Devices
3.6.1. USB Topology
3.6.2. USB Controllers
3.6.3. USB Devices
3.6.4. USB Drivers
3.6.5. USB Hotplug
4. Linux Installation and Package Management (Topic 1.102)
4.1. Objective 1: Design a Hard Disk Layout
4.1.1. System Considerations
4.1.1.1. Limited disk space
4.1.1.2. Larger systems
4.1.1.3. System role
4.1.1.4. Backup
4.1.2. Swap Space
4.1.3. General Guidelines
4.2. Objective 2: Install a Boot Manager
4.2.1. LILO
4.2.1.1. The boot loader
4.2.1.2. The LILO map installer and its configuration file
4.2.1.3. LILO locations
4.2.2. GRUB
4.2.2.1. GRUB device naming
4.2.2.2. Installing GRUB
4.2.2.3. Booting GRUB
4.2.2.4. The GRUB configuration file
4.3. Objective 3: Make and Install Programs from Source
4.3.1. Getting Open Source and Free Software
4.3.1.1. What's a tarball?
4.3.1.2. Opening a tarball
4.3.2. Compiling Open Source Software
4.3.2.1. configure
4.3.2.2. make
4.3.2.3. Installing the compiled software
4.3.2.4. Example:Compiling bash
4.4. Objective 4: Manage Shared Libraries
4.4.1. Shared Library Dependencies
4.4.2. Linking Shared Libraries
4.5. Objective 5: Use Debian Package Management
4.5.1. Debian Package Management Overview
4.5.2. Managing Debian Packages
4.6. Objective 6: Use Red Hat Package Manager (RPM)
4.6.1. RPM Overview
4.6.2. Running rpm
5. GNU and Unix Commands (Topic 1.103)
5.1. Objective 1: Work on the Command Line
5.1.1. The Interactive Shell
5.1.1.1. Shell variable basics
5.1.1.2. Entering commands at the command prompt
5.1.1.3. Entering commands not in the PATH
5.1.1.4. Entering multiple-line commands interactively
5.1.1.5. Entering command sequences
5.1.2. Command History and Editing
5.1.2.1. Command substitution
5.1.2.2. Applying commands recursively through a directory tree
5.2. Objective 2: Process Text Streams Using Filters
5.4. Objective 3: Perform Basic File Management
5.4.1. Filesystem Objects
5.4.1.1. Directories and files
5.4.1.2. Inodes
5.4.1.3. File and directory management commands
5.4.2. File-Naming Wildcards
5.5. Objective 4: Use Streams, Pipes, and Redirects
5.5.1. Standard I/O and Default File Descriptors
5.5.2. Pipes
5.5.3. Redirection
5.5.4. Using the tee Command
5.6. Objective 5: Create, Monitor, and Kill Processes
5.6.1. Processes
5.6.2. Process Monitoring
5.6.3. Signaling Active Processes
5.6.4. Terminating Processes
5.6.5. Shell Job Control
5.7. Objective 6: Modify Process Execution Priorities
5.7.1. nice
5.8. Objective 7: Search Text Files Using Regular Expressions
5.8.1. Regular Expression Syntax
5.8.1.1. Examples
5.8.2. Using sed
5.8.2.1. Commands
5.8.3. Examples
5.8.3.1. Anchors
5.8.3.2. Groups and ranges
5.8.3.3. Modifiers
5.8.3.4. Basic regular expression patterns
5.8.3.5. Using regular expressions as addresses in sed
5.9. Objective 8: Perform Basic File Editing Operations Using vi
5.9.1. Invoking vi
5.9.2. vi Basics
6. Devices, Linux Filesystems, and the Filesystem Hierarchy Standard (Topic 1.104)
6.1. Objective 1: Create Partitions and Filesystems
6.1.1. Disk Drives Under Linux
6.1.1.1. Hard disk devices
6.1.1.2. Disk partitions
6.1.1.3. The root filesystem and mount points
6.1.1.4. Managing partitions
6.1.1.5. Creating filesystems
6.1.1.6. Creating swap partitions
6.2. Objective 2: Maintain the Integrity of Filesystems
6.2.1. Monitoring Free Disk Space and Inodes
6.2.2. Monitoring Disk Usage
6.2.3. Modifying a Filesystem
6.2.4. Checking and Repairing Filesystems
6.3. Objective 3: Control Filesystem Mounting and Unmounting
6.3.1. Managing the Filesystem Table
6.3.2. Mounting Filesystems
6.3.3. Unmounting Filesystems
6.4. Objective 4: Set and View Disk Quotas
6.4.1. Quota Limits
6.4.2. Quota Commands
6.4.3. Enabling Quotas
6.5. Objective 5: Use File Permissions to Control Access to Files
6.5.1. Linux Access Control
6.5.1.1. The mode bits
6.5.1.2. The mode string
6.5.2. Setting Access Modes
6.5.2.1. New files
6.5.2.2. Changing access modes
6.6. Setting Up a Workgroup Directory
6.7. Objective 6: Manage File Ownership
6.8. Objective 7: Create and Change Hard and Symbolic Links
6.8.1. Why Links?
6.8.1.1. Preserving links
6.8.1.2. Finding links to a file
6.9. Objective 8: Find System Files and Place Files in the Correct Location
6.9.1. Data Types
6.9.2. The root Filesystem
6.9.2.1. The /usr filesystem
6.9.2.2. The /var filesystem
6.9.2.3. Linux annex
6.9.2.4. Where's that binary?
6.9.3. Locating Files
7. The X Window System (Topic 1.1.10)
7.1. An Overview of X
7.2. Objective 1: Install and Configure X11
7.2.1. Selecting and Configuring an X Server
7.2.1.1. Supported video hardware
7.2.1.2. Installing XFree86
7.2.1.3. Configuring an X server and the XF86Config file
7.2.2. X Fonts
7.2.2.1. Installing fonts
7.2.2.2. The X font server
7.2.3. Controlling X Applications with .Xresources
7.3. Objective 2: Set Up a Display Manager
7.3.1. Configuring xdm
7.3.1.1. Running xdm manually
7.3.1.2. Running xdm automatically
7.3.1.3. Basic xdm customization
7.3.2. X Terminals
7.3.2.1. xdm for X terminals
7.4. Objective 4: Install and Customize a Window Manager Environment
7.4.1. Starting X and a Default Window Manager
7.4.1.1. The XFree86 start up process
7.4.2. xterm et al.
7.4.3. X Libraries
7.4.4. Remote X Clients
7.4.4.1. Examples
7.4.5. X Security
7.4.5.1. Host access control
7.4.5.2. MIT-MAGIC-COOKIE-1 Authentication
8. Exam 101 Review Questions and Exercises
8.1. Hardware and Architecture (Topic 1.101)
8.1.1. Review questions
8.1.2. Exercises
8.2. Linux Installation and Package Management (Topic 1.102)
8.2.1. Review Questions
8.2.2. Exercises
8.3. GNU and Unix Commands (Topic 1.103)
8.3.1. Review Questions
8.3.2. Exercises
8.4. Devices, Linux Filesystems, and the Filesystem Hierarchy Standard (Topic 1.104)
8.4.1. Review Questions
8.4.2. Exercises
8.5. The X Window System (Topic 1.110)
8.5.1. Review Questions
8.5.2. Exercises
9. Exam 101 Practice Test
9.1. Questions
9.2. Answers
10. Exam 101 Highlighter's Index
10.1. Hardware and Architecture
10.1.1. Objective 1: Configure Fundamental BIOS Settings
10.1.1.1. PC BIOS
10.1.1.2. Resource assignments
10.1.1.3. 1024-cylinder limit
10.1.2. Objective 3: Configure Modems and Sound Cards
10.1.2.1. Modems
10.1.2.2. Sound devices
10.1.3. Objective 4: Set Up Non-IDE Devices
10.1.3.1. SCSI
10.1.4. Objective 5: Set Up PC Different Expansion Cards
10.1.4.1. /proc
10.1.4.2. Commands
10.1.5. Objective 6: Configure Communication Devices
10.1.5.1. Concepts
10.1.5.2. Commands
10.1.6. Objective 7: Configure USB Devices
10.1.6.1. Host Controllers
10.1.6.2. Devices
10.1.6.3. Drivers
10.1.6.4. Commands
10.2. Linux Installation and Package Management
10.2.1. Objective 1: Design a Hard Disk Layout
10.2.1.1. Guidelines
10.2.2. Objective 2: Install a Boot Manager
10.2.2.1. LILO
10.2.2.2. GRUB
10.2.3. Objective 3: Make and Install Programs from Source
10.2.3.1. Source Files
10.2.3.2. make
10.2.4. Objective 4: Manage Shared Libraries
10.2.4.1. Concepts
10.2.4.2. Commands
10.2.5. Objective 5: Use Debian Package Management
10.2.5.1. Commands
10.2.6. Objective 6: Use Red Hat Package Manager (RPM)
10.2.6.1. Concepts
10.3. GNU and Unix Commands
10.3.1. Objective 1: Work Effectively on the Command Line
10.3.1.1. The interactive shell and shell variables
10.3.1.2. Entering commands
10.3.1.3. Command history, editing, and substitution
10.3.1.4. Recursive execution
10.3.2. Objective 2: Process Text Streams Using Filters
10.3.2.1. The Commands
10.3.2.2. The stream editor, sed
10.3.3. Objective 3: Perform Basic File Management
10.3.3.1. Concepts
10.3.3.2. File and directory management commands
10.3.3.3. File-naming wildcards
10.3.4. Objective 4: Use Unix Streams, Pipes, and Redirects
10.3.4.1. Concepts
10.3.4.2. Standard I/O
10.3.4.3. Pipes and redirection
10.3.5. Objective 5: Create, Monitor, and Kill Processes
10.3.5.1. Concepts
10.3.5.2. Monitoring commands
10.3.5.3. Signaling processes
10.3.5.4. Shell job control
10.3.6. Objective 6: Modify Process Execution Priorities
10.3.6.1. Concepts
10.3.6.2. Commands
10.3.7. Objective 7: Search Text Files Using Regular Expressions
10.3.7.1. Concepts
10.3.7.2. Position anchors
10.3.7.3. Character sets
10.3.7.4. Modifiers
10.3.8. Objective 8: Using vi
10.3.8.1. Subcommands
10.4. Devices, Linux Filesystems, and the Filesystem Hierarchy Standard
10.4.1. Objective 1: Create Partitions and Filesystems
10.4.1.1. Disk drives and partitions
10.4.1.2. The root filesystem and mount points
10.4.1.3. Partition and filesystem management commands
10.4.2. Objective 2: Maintain the Integrity of Filesystems
10.4.2.1. Filesystem Commands
10.4.3. Objective 3: Control Filesystem Mounting and Unmounting
10.4.3.1. Managing the filesystem table
10.4.3.2. Mounting and unmounting
10.4.3.3. Filesystem types
10.4.4. Objective 4: Managing Disk Quota
10.4.4.1. Quota Types
10.4.4.2. Commands
10.4.5. Objective 5: Use File Permissions to Control Access to Files
10.4.5.1. Access control
10.4.5.2. Setting access modes
10.4.6. Objective 6: Manage File Ownership
10.4.6.1. Concepts
10.4.6.2. Commands
10.4.7. Objective 7: Create and Change Hard and Symbolic Links
10.4.7.1. Concepts
10.4.7.2. ln
10.4.8. Objective 8: Find System Files and Place Files in the Correct Location
10.4.8.1. File Hierarchy Standard (FHS)
10.4.8.2. The directory hierarchy
10.4.8.3. Locating files
10.5. The X Window System
10.5.1. Objective 1: Install and Configure X11
10.5.1.1. Selecting and configuring an X server
10.5.1.2. X fonts
10.5.1.3. .Xresources
10.5.2. Objective 2: Setup A Display Manager
10.5.2.1. xdm
10.5.2.2. X terminals
10.5.3. Objective 4: Install and Customize a Window Manager Environment
10.5.3.1. Concepts
10.5.3.2. Window managers
10.5.3.3. xterm
10.5.3.4. X libraries
10.5.3.5. Remote X clients
II. General Linux Exam 102
11. Exam 102 Overview
12. Exam 102 Study Guide
12.1. Exam Preparation
13. Kernel (Topic 1.105)
13.1. Objective 1: Manage/Query Kernel and Kernel Modules at Runtime
13.1.1. Module Files
13.1.2. Manipulating Modules
13.1.3. Configuring Modules
13.1.4. Module Dependency File
13.2. Objective 2: Reconfigure, Build, and Install a Custom Kernel and Kernel Modules
13.2.1. Kernel Background
13.2.1.1. Kernel versions
13.2.1.2. Required tools and software
13.2.2. Compiling a Custom Kernel
13.2.2.1. Creating a kernel configuration
13.2.2.2. Compiling the kernel
13.2.2.3. Installing the new kernel and configuring LILO
13.2.2.4. Examine the new modules
14. Boot, Initialization, Shutdown, and Runlevels (Topic 1.106)
14.1. Objective 1: Boot the System
14.1.1. Boot-time Kernel Parameters
14.1.2. Introduction to Kernel Module Configuration
14.1.2.1. Kernel boot-time messages
14.1.2.2. Reviewing system logs
14.2. Objective 2: Change Runlevels and Shut Down or Reboot System
14.2.1. Single-User Mode
14.2.1.1. Overview of the /etc directory tree and the init process
14.2.1.2. Setting the default runlevel
14.2.1.3. Determining your system's runlevel
14.2.2. Changing Runlevels with init and telinit
14.2.3. System Shutdown with shutdown
15. Printing (Topic 1.107)
15.1. An Overview of Printing
15.2. Objective 2: Manage Printers and Print Queues
15.2.1. Linux Printing Overview
15.2.2. Managing Print Queues
15.2.2.1. Managing print queues with lpc
15.3. Objective 3: Print Files
15.4. Objective 4: Install and Configure Local and Remote Printers
15.4.1. /etc/printcap
15.4.2. Filters
15.4.2.1. APSfilter
15.4.2.2. magicfilter
15.4.2.3. Multiple filters
15.4.3. Remote lpd and Samba Printers
16. Documentation (Topic 1.108)
16.1. Objective 1: Use and Manage Local System Documentation
16.1.1. Text Files and Paging
16.1.1.1. Paging programs
16.1.2. Manpages
16.1.2.1. Manual sections
16.1.2.2. Manpage format
16.1.2.3. man mechanics
16.1.3. Information in /usr/share/doc
16.1.4. Info Pages
16.2. Objective 2: Find Linux Documentation on the Internet
16.2.1. The Linux Documentation Project
16.2.2. Usenet Newsgroups
16.2.2.1. Newsgroup archives
16.2.2.2. Contributing to Usenet
16.2.3. Mailing Lists
16.2.4. Vendor Web Sites and Other Resources
16.3. Objective 5: Notify Users on System-related Issues
16.3.1. /etc/issue
16.3.1.1. Example
16.3.2. /etc/motd
17. Shells, Scripting, Programming, and Compiling (Topic 1.109)
17.1. Objective 1: Customize and Use the Shell Environment
17.1.1. An Overview of Shells
17.1.2. The Bash Shell
17.1.2.1. Shell and environment variables
17.1.2.2. Aliases
17.1.2.3. Functions
17.1.2.4. Configuration files
17.1.2.5. .inputrc
17.2. Objective 2: Customize or Write Simple Scripts
17.2.1. Script Files
17.2.1.1. Creating a simple bash script
17.2.1.2. Executable files
17.2.1.3. She-bang!
17.2.1.4. The shell script's environment
17.2.1.5. Location, ownership, and permissions
17.2.1.6. SUID and GUID rights
17.2.2. Basic Bash Scripts
17.2.2.1. Return values
17.2.2.2. File tests
17.2.2.3. Command substitution
17.2.2.4. Mailing from scripts
17.2.2.5. Abbreviated Bash command reference
18. Administrative Tasks (Topic 1.111)
18.1. Objective 1: Manage Users and Group Accounts and Related System Files
18.1.1. User Accounts and the Password File
18.1.2. Groups and the Group File
18.1.3. The Shadow Password and Shadow Group Systems
18.1.3.1. Group passwords and shadow groups
18.1.4. User and Group Management Commands
18.1.4.1. Additional shadow password management commands
18.2. Objective 2: Tune the User Environment and System Environment Variables
18.2.1. Systemwide Startup Scripts
18.2.2. Setting the Home Directory for New Accounts
18.3. Objective 3: Configure and Use System Log Files to Meet Administrative and Security Needs
18.3.1. Configuring syslogd
18.3.2. Log File Rotation
18.3.3. Examining Log Files
18.4. Objective 4: Automate System Administration Tasks by Scheduling Jobs to Run in the Future
18.4.1. Using cron
18.4.1.1. User crontab files
18.4.1.2. System crontab files
18.4.2. Using at
18.4.3. Controlling User Access to cron and at
18.5. Objective 5: Maintain an Effective Data Backup Strategy
18.5.1. Backup Concepts and Strategies
18.5.1.1. Backup types
18.5.1.2. Backup verification
18.5.2. Device Files
18.5.3. Using tar and mt
18.5.4. Backup Operations
18.5.4.1. What should I back up?
18.5.4.2. An example backup script
18.5.4.3. Verifying tar archives
18.5.4.4. File restoration
18.6. Objective 6: Maintain System Time
18.6.1. NTP Concepts
18.6.2. The NTP Software Package Components
19. Networking Fundamentals (Topic 1.112)
19.1. Objective 1: Fundamentals of TCP/IP
19.1.1. Addressing and Masks
19.1.2. Protocols
19.1.3. TCP/IP Services
19.1.4. TCP/IP Utilities
19.2. Objective 3: TCP/IP Configuration and Troubleshooting
19.2.1. Network Interfaces
19.2.1.1. Configuration files
19.2.1.2. Configuration commands
19.2.1.3. Common manual network interface tasks
19.2.2. DHCP
19.2.2.1. Subnets and relays
19.2.2.2. Leases
19.2.2.3. dhcpd
19.3. Objective 4: Configure Linux as a PPP Client
19.3.1. Clients and Servers
19.3.1.1. Serial ports and modems
19.3.1.2. PPP overview
19.3.1.3. Chat scripts
19.3.1.4. The PPP daemon
19.3.1.5. Manual PPP connection
19.3.1.6. Authentication protocols
19.3.1.7. PPP over ISDN
19.3.1.8. Too many variables
20. Networking Services (Topic 1.113)
20.1. Objective 1: Configure and Manage inetd, xinetd, and Related Services
20.1.1. The inetd Configuration File
20.1.2. TCP Wrappers with inetd
20.1.3. Starting and Stopping inetd Services
20.1.4. xinetd Configuration
20.1.4.1. Frequently used xinetd.conf options
20.1.4.2. Modular configuration
20.2. Objective 2: Operate and Perform Basic Configuration of Mail Transfer Agent (MTA)
20.2.1. Configuring sendmail
20.2.1.1. The smart host parameter
20.2.2. Mail Aliases
20.2.2.1. Forwarding mail from your account to another account
20.2.3. Queued Mail
20.2.4. Starting and Stopping sendmail
20.3. Objective 3: Operate and Perform Basic Configuration of Apache
20.3.1. Configuring Apache
20.3.2. Starting and Stopping Apache
20.4. Objective 4: Properly Manage the NFS and Samba Daemons
20.4.1. NFS
20.4.1.1. Exporting (sharing) local filesystems using NFS
20.4.1.2. Mounting remote NFS filesystems
20.4.1.3. Starting and stopping NFS
20.4.2. Samba and the SMB and NMB Daemons
20.4.2.1. Getting started
20.4.2.2. WINS and browsing
20.4.2.3. Using SWAT
20.5. Objective 5: Set Up and Configure Basic DNS Services
20.5.1. The Resolver
20.5.1.1. Domain registration
20.5.1.2. Using named as a local caching-only name server
20.5.1.3. DNS query utilities
20.5.1.4. BIND Version 4 versus Version 8 configuration files
20.6. Objective 7: Set Up Secure Shell (OpenSSH)
21. Security (Topic 1.114)
21.1. Objective 1: Perform Security Administration Tasks
21.1.1. TCP Wrappers
21.1.1.1. On the attack
21.1.1.2. Configuring inetd and tcpd
21.1.1.3. tcpd access control
21.1.1.4. tcpd logging
21.1.2. Finding Executable SUID Files
21.1.3. Verifying Packages
21.1.3.1. Checking installed packages
21.1.3.2. Checking packages prior to installation
21.1.4. SGID Workgroups
21.1.5. Password Management
21.2. Objective 2: Set Up Host Security
21.2.1. Shadow Passwords
21.2.2. inetd Minimalism
21.2.3. Logging and Superuser Mail
21.2.4. Watching for Security Announcements
21.3. Objective 3: Set Up User-level Security
22. Exam 102 Review Questions and Exercises
22.1. Kernel (Topic 1.105)
22.1.1. Review Questions
22.1.2. Exercises
22.2. Boot, Initialization, Shutdown, and Runlevels (Topic 1.106)
22.2.1. Review Questions
22.2.2. Exercises
22.2.2.1. Exercise 1.106-1. Boot
22.2.2.2. Exercise 1.106-2. Runlevels
22.3. Printing (Topic 1.107)
22.3.1. Review Questions
22.3.2. Exercises
22.4. Documentation (Topic 1.108)
22.4.1. Review Questions
22.4.2. Exercises
22.4.2.1. Exercise 1.108-1. man and /usr/doc
22.4.2.2. Exercise 1.108-4. Acting as a Linux helpdesk
22.5. Shells, Scripting, Programming, and Compiling (Topic 1.109)
22.5.1. Review Questions
22.5.2. Exercises
22.6. Administrative Tasks (Topic 1.111)
22.6.1. Review questions
22.6.2. Exercises
22.6.2.1. Exercise 1.111-1. User accounts
22.6.2.2. Exercise 1.111-2. User environment and variables
22.6.2.3. Exercise 1.111-3. Syslog and log files
22.6.2.4. Exercise 1.111-4. cron and at
22.6.2.5. Exercise 1.111-5. Backup
22.7. Networking Fundamentals (Topic 1.112)
22.7.1. Review Questions
22.7.2. Exercises
22.8. Networking Services (Topic 1.113)
22.8.1. Review Questions
22.8.2. Exercises
22.9. Security (Topic 1.114)
22.9.1. Review Questions
22.9.2. Exercises
23. Exam 102 Practice Test
23.1. Questions
23.2. Answers
24. Exam 102 Highlighter's Index
24.1. Kernel (Topic 1.105)
24.1.1. Objective 1: Manage/Query Kernel and Kernel Modules at Runtime
24.1.2. Objective 2: Reconfigure, Build, and Install a Custom Kernel and Kernel Modules
24.2. Boot, Initialization, Shutdown, and Runlevels (Topic 1.106)
24.2.1. Objective 1: Boot the System
24.2.1.1. LILO, the Linux loader
24.2.1.2. Kernel parameters and module configuration
24.2.1.3. Boot-time messages
24.2.2. Objective 2: Change Runlevels and Shut Down or Reboot System
24.2.2.1. Single-user mode
24.2.2.2. The /etc/rc.d directory
24.2.2.3. Default runlevel, determining runlevel, changing runlevels
24.3. Printing (Topic 1.107)
24.3.1. Objective 2: Manage Printers and Print Queues
24.3.2. Objective 3: Print Files
24.3.3. Objective 4: Install and Configure Local and Remote Printers
24.3.3.1. /etc/printcap
24.3.3.2. Filters
24.3.3.3. Remote queues and Samba printers
24.4. Documentation (Topic 1.108)
24.4.1. Objective 1: Use and Manage Local System Documentation
24.4.1.1. Text and paging
24.4.1.2. The man facility
24.4.1.3. /usr/doc
24.4.1.4. The info facility
24.4.2. Objective 2: Find Linux Documentation on the Internet
24.4.2.1. Linux Documentation Project
24.4.2.2. Other sources
24.4.3. Objective 5: Notify Users on System-related Issues
24.4.3.1. /etc/issue
24.4.3.2. /etc/issue.net
24.4.3.3. /etc/motd
24.5. Shells, Scripting, Programming, and Compiling
24.5.1. Objective 1: Customize and Use the Shell Environment
24.5.1.1. bash
24.5.2. Objective 2: Customize or Write Simple Scripts
24.5.2.1. Environment
24.6. Administrative Tasks (Topic 1.111)
24.6.1. Objective 1: Manage Users and Group Accounts and Related System Files
24.6.1.1. passwd and group
24.6.1.2. Shadow files
24.6.1.3. User and group management commands
24.6.2. Objective 2: Tune the User Environment and System Environment Variables
24.6.2.1. Configuration scripts
24.6.2.2. New account home directories
24.6.3. Objective 3: Configure and Use System Log Files to Meet Administrative and Security Needs
24.6.3.1. Syslog
24.6.3.2. Log file rotation
24.6.3.3. Examining log files
24.6.4. Objective 4: Automate System Administration Tasks by Scheduling Jobs to Run in the Future
24.6.4.1. Using cron
24.6.4.2. Using at
24.6.4.3. User access
24.6.5. Objective 5: Maintain an Effective Data Backup Strategy
24.6.6. Objective 6: Maintain System Time
24.7. Networking Fundamentals (Topic 1.112)
24.7.1. Objective 1: Fundamentals of TCP/IP
24.7.1.1. Addressing and masks
24.7.1.2. Protocols
24.7.1.3. TCP/IP services
24.7.1.4. TCP/IP utilities
24.7.2. Objective 3: TCP/IP Configuration and Troubleshooting
24.7.2.1. Network interfaces
24.7.2.2. DHCP
24.7.3. Objective 4: Configure Linux as a PPP Client
24.8. Networking Services (Topic 1.113)
24.8.1. Objective 1: Configure and Manage inetd, xinetd, and Related Services
24.8.2. Objective 2: Operate and Perform Basic Configuration of Mail Transfer Agent (MTA)
24.8.3. Objective 3: Operate and Perform Basic Configuration of Apache
24.8.4. Objective 4: Properly Manage the NFS and Samba Daemons
24.8.4.1. NFS
24.8.4.2. Samba
24.8.5. Objective 5: Set Up and Configure Basic DNS Services
24.8.5.1. The resolver
24.8.5.2. Domain registration
24.8.6. Objective 7: Set Up Secure Shell (OpenSSH)
24.9. Security (Topic 1.114)
24.9.1. Objective 1: Perform Security Administration Tasks
24.9.1.1. TCP wrappers
24.9.1.2. Finding executable SUID files
24.9.1.3. Verifying packages
24.9.1.4. SGID workgroups
24.9.1.5. The Secure Shell
24.9.2. Objective 2: Set Up Host Security
24.9.2.1. Shadow passwords
24.9.3. Objective 3: Set Up User-level Security
III. General Linux Exam 201
25. Linux Kernel
25.1. Objective 1: Kernel Components
25.1.1. Kernel Image Formats
25.1.2. Different Kernel Trees
25.1.2.1. Choosing an appropriate kernel
25.1.2.2. Hardware support
25.1.2.3. Patches
25.1.2.4. Kernel modules
25.2. Objective 2: Compiling a Kernel
25.2.1. Kernel Configuration Tools
25.2.1.1. make config
25.2.1.2. make menuconfig
25.2.1.3. make xconfig
25.2.2. Compiling and Installing a Custom Kernel
25.2.3. Using initrd
25.2.3.1. mkinitrd on Red Hat/Fedora
25.2.3.2. mkinitrd in Debian
25.2.4. Updating Your Kernel
25.3. Objective 3: Patching a Kernel
25.3.1. Applying the Patch
25.3.2. Removing a Patch
25.4. Objective 4: Customizing a Kernel
26. System Startup
26.1. Objective 1: Customizing System Startup and Boot Processes
26.1.1. /etc/inittab
26.1.2. System Initialization Scripts
26.1.2.1. System initialization
26.1.2.2. Runlevel directories
26.1.3. Customizing Runlevels
26.1.3.1. Customizing runlevels on Red Hat
26.1.4. Customizing initrd Images
26.1.4.1. initrd and /linuxrc on Debian
26.1.4.2. initrd and /linuxrc on Red Hat
26.2. Objective 2: System Recovery
26.2.1. Filesystem Damage
26.2.2. init or the System Initialization Fails
26.2.2.1. Bypassing init
26.2.2.2. Working in the shell environment
26.2.3. Booting from a Rescue CD
26.2.3.1. Restoring the bootstrap
26.2.3.2. Exploring the damaged system
26.2.3.3. Loss of key files
27. Filesystem
27.1. Objective 1: Operating the Linux Filesystem
27.1.1. Level 1 Review
27.1.2. Additional Filesystem Management Files
27.1.3. Managing Swap
27.1.4. Linux Partitioning Scheme
27.2. Objective 2: Maintaining a Linux Filesystem
27.2.1. tune2fs
27.2.2. dumpe2fs
27.2.3. debugfs
27.2.4. badblocks and e2fsck
27.2.5. fsck
27.2.6. mke2fs
27.2.7. Filesystem Resizing
27.2.8. fsck
27.2.9. Self-Monitoring, Analysis, and Reporting Technology System (SMART)
27.3. Objective 3: Creating and Configuring Filesystem Options
27.3.1. Automounting Filesystems
27.3.2. Other Filesystems
27.3.2.1. Using ext3
27.3.2.2. vfat filesystems
27.3.3. ISO9660 Filesystems
27.3.3.1. Creating ISO9660 images
27.3.3.2. Burning CD-ROMs
27.3.3.2.1. Burning with IDE CD burners
27.3.3.2.2. Using cdrecord
27.3.3.2.3. CD miscellany
27.3.4. dd
28. Hardware (Topic 2.204)
28.1. Objective 1: Configuring RAID
28.1.1. The mkraid Tools
28.1.2. How to Create RAID 1 (Mirroring)
28.2. Objective 2: Adding New Hardware
28.2.1. Reporting Your Hardware
28.3. Objective 3: Software and Kernel Configuration
28.3.1. hdparm
28.3.2. tune2fs
28.3.3. Supporting IDE CD Burners
28.3.4. Logical Volume Manager (LVM)
28.3.4.1. Initializing a disk or partition
28.3.4.2. Creating a volume group
28.3.4.3. Making a logical volume
28.3.4.4. Displaying physical volume properties
28.3.4.5. Displaying volume group properties
28.3.4.6. Displaying logical volume properties
28.3.4.7. Listing disks and volume groups
28.3.4.8. Adding disks to a volume group
28.3.4.9. Removing a disk from a volume group
28.3.4.10. Expanding a logical volume
28.3.4.11. Shrinking a logical volume
28.3.4.12. Removing a logical volume
28.3.4.13. Removing a volume group
28.3.4.14. Removing a physical volume
28.3.4.15. Starting and stopping LVM
28.3.4.16. LVM snapshots
28.3.5. Runtime Kernel Configuration
28.4. Objective 4: Configuring PCMCIA Devices
28.4.1. PCMCIA configuration files
28.4.1.1. /etc/pcmcia/config
28.4.1.2. /etc/pcmcia/config.opts
28.4.1.3. /etc/pcmcia/network.opts
28.4.1.4. /etc/pcmcia/*.opts
28.4.2. PCMCIA commands
28.4.3. PCMCIA Troubleshooting
28.4.3.1. Steps for troubleshooting PCMCIA devices
28.4.3.2. Boot problems
28.4.3.3. Common PCMCIA errors
28.4.3.4. Kernel upgrades
29. File and Service Sharing (Topic 2.209)
29.1. Objective 1: Configuring a Samba Server
29.1.1. Basic Configuration File
29.1.2. Windows Passwords
29.1.3. Acting as a PDC
29.1.4. Login Settings
29.1.5. Shares
29.1.6. Startup
29.1.7. Troubleshooting
29.2. Objective 2: Configuring an NFS Server
29.2.1. The NFS Server
29.2.2. Configuring NFS Server Exports
29.2.3. NFS Server Security
29.2.4. The NFS Client
29.2.5. NFS Tools
30. System Maintenance (Topic 2.211)
30.1. Objective 1: System Logging
30.1.1. Setting Up a syslog Server
30.1.2. Setting Up syslog Clients
30.1.3. Using the Central Logs
30.2. Objective 2: Packaging Software
30.2.1. Building RPM Packages
30.2.2. Modifying RPM Packages
30.2.3. Building Deb Packages
30.2.3.1. Signing the package
30.2.3.2. Building the package
30.2.4. Modifying Deb Packages
30.2.4.1. control
30.2.4.2. rules
30.3. Objective 3: Backup Operations
31. System Customization and Automation (Topic 2.213)
31.1. Objective 1: Automating Tasks Using Scripts
31.1.1. Scripting with Bash and Friends
31.1.1.1. Variables
31.1.1.2. Checking process status and sending alerts
31.1.1.3. Monitoring users and using awk
31.1.1.4. Detecting changes
31.1.1.5. Log munging with sed
31.1.2. Scripting with Perl
31.1.2.1. Using CPAN
31.1.2.2. Log watching with Perl
31.1.2.3. Fetching and processing web logs
31.1.2.4. Using Perl to add new disks attached to an HBA controller
31.1.2.5. Perl in adverse environments
31.1.3. Synchronizing Files Across Machines
31.1.4. Scheduled execution
31.1.4.1. cron
31.1.4.2. Using at
32. Troubleshooting (Topic 2.214)
32.1. Objective 1: Creating Recovery Disks
32.2. Objective 2: Identifying Boot Stages
32.3. Objective 3: Troubleshooting Boot Loaders
32.4. Objective 4: General Troubleshooting
32.5. Objective 5: Troubleshooting System Resources
32.5.1. Environment Variables and Shells
32.5.2. Shell Environment
32.5.3. Editors
32.5.4. Kernel Parameters
32.6. Objective 6: Troubleshooting Environment Configurations
32.6.1. Authorization Problems
32.6.2. crontab Problems
32.6.3. Init Problems
32.6.4. Logging Problems
33. LPI Exam 201 Review Questions and Exercises
33.1. Linux Kernel (Topic 2.201)
33.1.1. Review Questions
33.1.2. Answers
33.1.3. Exercise
33.2. System Startup (Topic 2.202)
33.2.1. Review Questions
33.2.2. Answers
33.2.3. Exercises
33.3. Filesystem (Topic 2.203)
33.3.1. Review Questions
33.3.2. Answers
33.3.3. Exercises
33.4. Hardware (Topic 2.204)
33.4.1. Review Questions
33.4.2. Answers
33.4.3. Exercises
33.5. File and Service Sharing (Topic 2.209)
33.5.1. Review Questions
33.5.2. Answers
33.5.3. Exercises
33.6. System Maintenance (Topic 2.211)
33.6.1. Review Questions
33.6.2. Answers
33.6.3. Exercises
33.7. System Customization and Automation (Topic 2.213)
33.7.1. Review Questions
33.7.2. Answers
33.7.3. Exercises
33.8. Troubleshooting (Topic 2.214)
33.8.1. Review Questions
33.8.2. Answers
33.8.3. Exercises
34. Exam 201 Practice Test
34.1. Questions
34.2. Answers
IV. General Linux Exam 202
35. Networking Configuration (Topic 2.205)
35.1. Objective 1: Basic Networking Configuration
35.1.1. Network Configuration Utilities, and What Lies Beneath
35.1.2. Common Network Configuration Files
35.1.2.1. The /etc/network/interfaces file
35.1.2.2. The /etc/sysconfig/network-scripts directory
35.1.3. Using ifconfig
35.1.3.1. Virtual interfaces
35.1.3.2. Other common uses for ifconfig
35.1.3.3. Examples
35.1.4. The route Command
35.1.4.1. Syntax and frequently used options
35.1.5. Common Uses
35.1.6. ARP and Related Commands
35.1.6.1. arp command syntax
35.1.6.2. Example #1
35.1.6.3. Example #2
35.1.7. The arpwatch Command
35.1.7.1. arpwatch
35.1.7.2. Sample arpwatch results
35.1.8. Dial-up Connections
35.1.8.1. Connecting with a modem
35.1.8.2. Configuration files
35.1.8.3. pon
35.1.8.4. Checking a dial-up network connection
35.1.8.5. The poff command
35.1.8.6. The wvdial command
35.1.8.7. Configuring wvdial: wvdialconf
35.1.8.8. wvdialconf examples
35.1.8.9. Sample /etc/wvdial.conf file
35.1.8.10. ISDN connections
35.1.8.11. The ipppd daemon
35.1.8.12. The isdnctrl command
35.1.8.13. Using isdnctrl
35.1.8.14. Multihomed systems
35.1.8.15. IP routing configuration
35.1.8.16. IP forwarding versus firewalling and Network Address Translation (NAT)
35.2. Objective 2: Advanced Network Configuration and Troubleshooting
35.2.1. Simple Connectivity Example: Telnet
35.2.1.1. Using tcpdump
35.2.1.2. tcpdump expressions
35.2.1.3. Example #1
35.2.1.4. Example #2
35.2.1.5. Example #3
35.2.1.6. Example #4
35.2.1.7. ethereal and tethereal
35.2.1.8. The lsof command
35.2.1.9. Example #1
35.2.1.10. Example #2
35.2.1.11. Example #3
35.2.1.12. Example #4
35.2.1.13. Example #5
35.2.1.14. The netstat command
35.2.1.15. Example #1
35.2.1.16. Example #2
35.2.1.17. Example #3
35.2.2. netcat (nc)
35.2.2.1. Example #1
35.2.2.2. Example #2
35.2.2.3. Example #3
36. Mail and News (Topic 2.206)
36.1. Objective 2: Using Sendmail
36.1.1. Sendmail Configuration
36.1.1.1. Building and editing configuration files: the m4 utility
36.1.1.2. Additional configuration files
36.1.1.2.1. Restarting Sendmail
36.1.2. Securing Sendmail
36.1.2.1. Defining a trusted network
36.1.2.2. The /etc/mail/access file
36.1.2.3. Testing Sendmail configuration
36.1.2.4. Defining accepted email domains: local-host-names and sendmail.cw
36.1.3. Delivering Email
36.1.3.1. SMTP delivery based on DNS lookup
36.1.3.1.1. SMTP delivery via a smart host
36.1.4. Manual Entries
36.1.5. Local Delivery
36.1.6. Using virtusertable
36.1.7. Checking Virtual Users
36.1.8. Email Aliases
36.1.8.1. The contents of the aliases file
36.1.8.2. Reversing virtual user accounts
36.1.8.3. The genericstable file
36.1.9. Bastion Host Sendmail Server
36.1.9.1. Locking down the server
36.1.9.2. Configuring Sendmail for a bastion host
36.1.10. Managing Mail Traffic
36.1.11. Monitoring Mail
36.1.12. Log Configuration
36.2. Objective 3: Managing Mail Traffic
36.2.1. Filtering and Sorting Techniques
36.2.1.1. Using Procmail
36.2.1.2. Procmail files
36.2.1.3. Creating recipes in Procmail
36.2.1.3.1. Sample Procmail recipes
36.2.1.4. Monitoring and troubleshooting Procmail
36.3. Objective 1: Configuring Mailing Lists
36.3.1. Configuring Majordomo
36.3.1.1. Preparing Sendmail
36.3.1.2. Installing Majordomo
36.3.1.3. Creating Majordomo lists
36.3.1.3.1. Using the create command
36.3.1.3.2. Customizing the list
36.3.2. Testing the Implementation and Monitoring Problems
36.4. Objective 4: Serving News
36.4.1. Overview
36.4.1.1. Installing INN
36.4.1.2. Configuring INN
36.4.1.3. Customizing newsgroups
36.4.1.4. Configuring downstream and upstream clients
36.4.1.5. Monitoring newsgroups
36.4.1.6. Using innwatch
36.5. Conclusion
37. DNS (Topic 2.207)
37.1. Objective 1: Basic DNS Server Configuration
37.1.1. named.conf
37.1.2. Primary DNS
37.1.3. Secondary and Tertiary DNS
37.2. Objective 2: Create and Maintain DNS Zones
37.2.1. Forward DNS Zones
37.2.2. Reverse DNS Files
37.2.3. DNS Tools
37.3. Objective 3: Securing a DNS Server
37.3.1. Dedicated Servers
37.3.2. Restricting Zone Transfers
37.3.3. Using Transaction Signatures (TSIG)
37.3.4. Recursive Queries
37.3.5. Running BIND in a chroot Jail/Reduced Privileges
38. Web Services (Apache and Squid, Topic 2.208)
38.1. Installing Apache
38.1.1. Apache Installation from Source
38.2. Configuring Apache
38.2.1. Access Control
38.2.2. Third-Party Modules
38.2.2.1. mod_php
38.2.2.2. mod_perl
38.2.2.3. mod_ssl
38.2.2.4. mod_rewrite
38.2.2.5. Apache performance tuning
38.3. Squid: History and Overview
38.3.1. http_port option
38.3.2. cache_dir option
38.3.3. cache_mem option
38.3.4. cache_access_log option
38.3.5. acl option
38.4. Squid Authentication
38.5. Squid as Web Accelerator
39. Network Client Management (Topic 2.210)
39.1. Objective 1: DHCP Configuration
39.1.1. Setting Up a DHCP Server
39.1.1.1. Configuring DHCP options
39.1.1.2. Configuring dhcpd for random IP assignment
39.1.1.3. Fixed addresses in dhcpd
39.1.1.4. bootp support
39.1.1.5. dhcpd.leases
39.1.2. Using DHCP Clients
39.1.2.1. Using pump
39.1.2.2. Using dhclient
39.1.2.3. Configuring Red Hat as a DHCP client
39.1.2.4. Configuring Debian as a DHCP client
39.1.3. DHCP Relay
39.2. Objective 2: NIS Configuration
39.2.1. NIS Master Server
39.2.2. NIS Client
39.2.2.1. compat
39.2.2.2. NIS slave server
39.2.3. NIS Maps and Tools
39.2.3.1. Map lookups and nicknames
39.2.3.2. Keeping maps up to date
39.2.3.3. Netgroups
39.2.3.4. RPC calls
39.3. Objective 3: LDAP Configuration
39.3.1. Setting Up OpenLDAP Server
39.3.2. Setting Up Client Tools
39.4. Objective 4: PAM Authentication
39.4.1. PAM Configuration
39.4.1.1. module-type
39.4.1.2. control-flag
39.4.1.3. module-path and arguments
39.4.2. LDAP Client Authentication Using PAM
39.4.2.1. Packages for LDAP and PAM
39.4.2.2. Configuring nss_ldap and nsswitch.conf
39.4.2.3. Configuring pam_ldap and /etc/pam.d files
40. System Security (Topic 2.212)
40.1. Objective 2: Configuring a Router
40.1.1. The Example Networks
40.1.2. Getting Routing Working
40.1.3. Firewall Rulesets
40.1.3.1. ipchains versus iptables
40.1.3.2. Antispoofing
40.1.4. Using ipchains
40.1.4.1. ipchains
40.1.4.2. ipmasqadm
40.1.4.3. Sample ipchains setup
40.1.5. Using iptables
40.1.5.1. The iptables command
40.1.5.2. Example netfilter configuration
40.1.6. Firewalling Miscellanea
40.1.6.1. /proc/sys/net/ipv4
40.1.6.2. Saving and reloading rulesets
40.1.6.3. NAT and security
40.1.6.4. Dynamic routing
40.2. Objective 3: Securing FTP Servers
40.3. Objective 4: Secure Shell (SSH)
40.3.1. Installation and Configuration
40.3.2. Generating and Using Keys
40.3.3. ssh-agent
40.3.4. Other ssh Tricks
40.4. Objective 5: TCP Wrappers
40.4.1. /etc/hosts.allow and /etc/hosts.deny
40.4.1.1. Specifying services
40.4.1.2. xinetd and access control
40.5. Objective 6: Security Tasks
40.5.1. Kerberos
40.5.1.1. Overview
40.5.1.2. Server installation and configuration
40.5.1.3. Client configuration
40.5.2. Security Auditing Source Code
40.5.2.1. Executing subprograms
40.5.2.2. Checking input
40.5.2.3. Buffer overflows
40.5.2.4. Unsafe temporary file creation
40.5.3. IDS
40.5.3.1. Tripwire
40.5.3.1.1. Overview of Tripwire
40.5.3.1.2. Tripwire policy file format
40.5.3.2. Snort
40.5.3.2.1. Configuring Snort
40.5.3.2.2. Understanding Snort rules
40.5.4. Miscellaneous
40.5.4.1. Scanning in general
40.5.4.2. Security alerts
40.5.4.3. Updating Linux
40.5.4.3.1. Keeping Debian up-to-date
40.5.4.3.2. Keeping Red Hat up-to-date
41. Network Troubleshooting (Topic 214)
41.1. Network Troubleshooting Essentials
41.2. Common Troubleshooting Commands
41.2.1. ping
41.2.2. telnet and netcat
41.2.3. ifconfig
41.2.4. traceroute
41.2.5. netstat and route
41.3. Hardware Problems
41.3.1. Physical Connection Issues
41.3.1.1. Cabling
41.3.1.2. Failed networking devices
41.3.2. Problems with the Interface Card
41.3.3. Reviewing Screen Output
41.3.4. Changes to the Kernel and /etc/modules
41.3.5. Checking Log Files
41.4. Network Device Configuration Files
41.4.1. The /etc/network/interfaces File
41.4.2. The /etc/sysconfig/network-scripts Directory
41.4.3. PCMCIA Card Configuration
41.4.4. The /etc/networks File
41.4.5. The /etc/nsswitch File
41.4.6. Additional Configuration Files
41.4.6.1. /etc/host.conf
41.4.6.2. /etc/modprobe.d/aliases
41.4.6.3. The /etc/hostname file
41.4.7. Application Issues
41.5. DNS Errors
41.6. Determining the Cause of Inaccessible Services
41.6.1. Using netstat
41.6.2. nmap
41.6.3. Finding Authoritative Information with lsof and strace
41.6.4. Unexpected Changes to Files and Settings
41.7. Conclusion
42. Exam 202 Review Questions and Exercises
42.1. Networking Configuration (Topic 2.205)
42.1.1. Review Questions
42.1.2. Answers
42.1.3. Exercise
42.2. Mail and News (Topic 2.206)
42.2.1. Review Questions
42.2.2. Answers
42.2.3. Exercises
42.3. DNS (Topic 2.207)
42.3.1. Review Questions
42.3.2. Answers
42.3.3. Exercises
42.4. Web Services (Topic 2.208)
42.4.1. Review Questions
42.5. Answers
42.5.1. Exercises
42.6. Network Client Management (Topic 2.210)
42.6.1. Review Questions
42.6.2. Answers
42.6.3. Exercises
42.7. System Security (Topic 2.212)
42.7.1. Review Questions
42.7.2. Answers
42.7.3. Exercises
42.8. Network Troubleshooting (Topic 2.214)
42.8.1. Review Questions
42.8.2. Answers
42.8.3. Exercises
43. Exam 202 Practice Test
43.1. Questions
43.2. Answers
Index
About the Authors
Colophon
Copyright
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Cover
Next
Next Chapter
Preface
LPI Linux Certification in a Nutshell
Steven Pritchard
Bruno Gomes Pessanha
Nicolai Langfeldt
James Stanger
Jeff Dean
Published by
O’Reilly Media
Beijing ⋅ Cambridge ⋅ Farnham ⋅ Köln ⋅ Sebastopol ⋅ Tokyo
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset