Top Banner
© 2002 ComputerPREP, Inc. All rights reserved. Linux+ Linux+
219
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

© 2002 ComputerPREP, Inc. All rights reserved.

Linux+Linux+

Page 2: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

© 2002 ComputerPREP, Inc. All rights reserved.

Lesson 1:Linux Characteristics

and Features

Page 3: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Objectives

• List common Linux functions and services• Identify basic concepts, terms, and function of

system components• Identify common distributions• Describe the functions and features of a Linux

solution• Understand the GNU Public License• Differentiate between the GPL and additional

licensing schemes

Page 4: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

What Is Linux?

• Linux and UNIX• Kernels

Page 5: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

LinuxCharacteristics

• The shell, applications, and daemons• Linux is multiuser• Linux is multitasking• Linux is weakly integrated• UNIX/Linux is command-line oriented• Linux and stability• Network support

Page 6: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Common LinuxFeatures and Roles

• Clients• Servers• Additional features and roles• Using "free" software

Page 7: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

CommonLinux Distributions

• Distributions versus vendors• Custom kernels and specialized platforms• Strengths and weaknesses of various distributions

Page 8: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Open SourceLicensing

• GNU Public License• Copyright versus "copyleft"• Common open source licensing schemes

Page 9: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Summary

List common Linux functions and services Identify basic concepts, terms, and function of

system components Identify common distributions Describe the functions and features of a Linux

solution Understand the GNU Public License Differentiate between the GPL and additional

licensing schemes

Page 10: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

© 2002 ComputerPREP, Inc. All rights reserved.

Lesson 2:Preparing

for Installation

Page 11: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Objectives

• Identify the role of the system and determine software according to customer requirements

• Validate that system hardware is supported by the Linux operating system

• Identify hardware and installation issues with mobile system hardware

• Ensure that system hardware is configured correctly before installation

Page 12: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Planning the Implementation

• Identifying the system role• Common software packaging options• Evaluating support requirements• Determining software requirements

Page 13: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

ValidatingHardware Requirements

• Common hardware terms• System cards and peripherals

Page 14: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

System BIOSand the CMOS

• Basic Input/Output System (BIOS)• Complementary Metal Oxide Semiconductor

(CMOS)

Page 15: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Standard IRQAssignments

• System timer• Keyboard controller• Real-time clock• COM1 / COM2 / COM3• LPT1 / LPT2• PS/2 mouse port (motherboard)

Page 16: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

ISAand PCI

• Expansion slots• Industry Standard Architecture (ISA)• Peripheral Component Interconnect (PCI)• Local bus architecture

– Accelerated Graphics Port (AGP)

Page 17: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Plug-and-PlayDevice Configuration

• Requires– System BIOS that supports plug-and-play– Plug-and-play-compliant operating system– Plug-and-play device (such as a modern PCI

card)

Page 18: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

PeripheralConnectors and Cables

• PS/2-style connectors• Parallel ports• Serial ports• USB ports• IEEE 1394 (FireWire and i.Link)• Infrared Developers Association (IrDA)

Page 19: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Small ComputerSystems Interface (SCSI)

• SCSI types• Drivers, maximum device numbers, and logical

numbering• SCSI termination

– Active Passive

Page 20: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Monitors andVideo Cards

• Monitor terms• Resolution• Color depth• Video RAM

Page 21: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

MobileSystem Hardware

• Personal Computer Memory Card Industry Association (PCMCIA)

• Hot swapping and system BIOS

Page 22: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Documentingthe Server

• Linux server documentation items• Additional considerations

Page 23: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

ObtainingLinux Information

• Software and hardware manuals• HOWTO documents• Web sites• Linux User Group meetings• Info and man pages

Page 24: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Summary

Identify the role of the system and determine software according to customer requirements

Validate that system hardware is supported by the Linux operating system

Identify hardware and installation issues with mobile system hardware

Ensure that system hardware is configured correctly before installation

Page 25: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

© 2002 ComputerPREP, Inc. All rights reserved.

Lesson 3:Installing Linux

Page 26: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Objectives

• Determine the appropriate method of installation based on the environment

• Identify the necessary storage space and partition scheme for Linux implementation

• Differentiate between GUI and text-based installation methods

• Install Linux

Page 27: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Objectives (cont'd)

• Explain how to structure a command at the Linux command line

• Log on to a Linux machine and use su• Describe "root etiquette"• Confirm your Linux configuration• Explain the Linux kernel naming convention

Page 28: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Linux andHardware Compatibility

• Finding the right Hardware Compatibility List (HCL)– Red Hat– SUSE– Slackware

Page 29: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Storage Spaceand Partition Schemes

• Disk preparation• Clusters• Active partition• Logical drive• Format• Root directory

Page 30: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

DiskPartitions

Page 31: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Common LinuxPartition Schemes

• /boot/• <swap>• /

Page 32: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Linux, LILO andthe 1024 Cylinder Limit

• Cylinders versus megabytes• Assorted hard drive installation guidelines

Page 33: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Reasons forMultiple Partitions

• Facilitates troubleshooting• Increases reliability

Page 34: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

PartitionNaming Schemes

• Windows and Linux• LILO: The Linux Loader• Finding and formatting disks

Page 35: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

InstallationMedia and Types

• Media– Boot disk– CD-ROM– Network– PLIP– PCMCIA

• Installation types

Page 36: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Configuring TCP/IP

• IP addressing– Class A– Class B– Class C– Reserved

• Netmasks• Private IP addresses• Domain Name System

Page 37: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

AdditionalServices

• Kerberos• NIS• NFS• LDAP• SMB• Personal firewall

Page 38: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

LoadableKernel Modules

• Automated formatting• Security measures

– Shadow passwords– Enhanced encryption options

• Installation checklists

Page 39: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

LinuxCommands

• Can contain up to three parts– The command itself– A collection of options– An argument

Page 40: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

YourLogon Account

• Logging on and off– The root account– Root etiquette– The su –c command

• Changing your password

Page 41: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

ConfirmingInstallation

• Secure Shell (SSH)• Files and directories in the /proc directory

Page 42: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

The LinuxKernel Naming Convention

• Stable• Beta• The uname command

Page 43: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Summary

Determine the appropriate method of installation based on the environment

Identify the necessary storage space and partition scheme for Linux implementation

Differentiate between GUI and text-based installation methods

Install Linux

Page 44: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Summary (cont'd)

Explain how to structure a command at the Linux command line

Log on to a Linux machine and use su Describe "root etiquette" Confirm your Linux configuration Explain the Linux kernel naming convention

Page 45: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

© 2002 ComputerPREP, Inc. All rights reserved.

Lesson 4:Navigating the System

Page 46: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Objectives

• Describe the Linux system hierarchy• Identify file system types• Use system navigation commands• Create and delete files and directories• Assign permissions using chmod• Create hard and symbolic links• Use the find command

Page 47: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

The LinuxFile System Hierarchy

• File location names• Understanding the root directory• Hidden files

Page 48: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

LinuxFile Name Conventions

• File name completion– File name completion characters– File name matching character keys

Page 49: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Paths

• Absolute paths• Relative paths and the current working directory• Periods, double periods, and tildes

Page 50: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Working withDirectories using ls

• Listing directories• Long form listing• Changing the work directory• Creating and deleting subdirectories

Page 51: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

BasicAccess Permissions

• Permission bits• Reading permissions• Changing permissions• The umask command

Page 52: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

AdditionalAccess Control Bits

• Save text permission• SUID/SGID permissions• chattr• lsattr• The immutable bit

Page 53: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Hard andSymbolic Links

• Creating hard links• Creating symbolic links

Page 54: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

FindingFiles with find

• Predicates and meanings to find

Page 55: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Usingwhereis and locate

• whereis searches for binaries found in the known search path

• locate can be customized so that only certain files can be found

Page 56: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

MultipleCommands and xargs

• xargs modifies the output of a previously executed command so that a new command can read the output as a command-line argument

Page 57: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Summary

Describe the Linux system hierarchy Identify file system types Use system navigation commands Create and delete files and directories Assign permissions using chmod Create hard and symbolic links Use the find command

Page 58: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

© 2002 ComputerPREP, Inc. All rights reserved.

Lesson 5:Using Vi

Page 59: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Objectives

• Use vi• Differentiate between vi's command and editing

modes• Copy and paste text using vi• Open a command prompt in vi• Distinguish vi from other text-editing applications

Page 60: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Vi

• Running vi• Edit mode and command mode• Vi command structure• Quitting vi• Cursor movement• Inserting text into a file• Deleting, posting and yanking• Search and replace commands• Customizing vi and the .exrc file

Page 61: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Pico

• Pico commands– CTRL + W– CTRL + K– CTRL + U– CTRL + R– CTRL + O– CTRL + Y– CTRL + V– CTRL + T– CTRL + G– CTRL + X

Page 62: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Summary

Use vi Differentiate between vi's command and editing

modes Copy and paste text using vi Open a command prompt in vi Distinguish vi from other text-editing applications

Page 63: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

© 2002 ComputerPREP, Inc. All rights reserved.

Lesson 6:An Arsenal of

Linux Commands

Page 64: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Objectives

• Create, copy and delete files and folders• Use text-reading commands• Conduct Telnet, SSH, FTP, Web and e-mail

sessions• Set system time• Use system configuration applications

Page 65: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Copying, Movingand Deleting Files

• Copying cp• Moving (renaming) mv• Deleting rm• Deleting empty directories rmdir

Page 66: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

File Content-Listing Commands

• Using more and less• Using cat to list files• Using head and tail

Page 67: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Simple TextFile Utilities

• Simple text commands– wc– diff– tee– ispell

• Cut and paste

Page 68: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

MiscellaneousCommands

• The date command• The timetool command• Setting the time zone• The w command• The cal command• The bc command• Clear and cd• Viewing command history and executing

commands

Page 69: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Starting theX-Window System

• Runlevel• The startx command

Page 70: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

NetworkClients

• Telnet• Secure Shell (SSH)• FTP• Lynx

Page 71: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Pine

• Newsgroups• The pine command

Page 72: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Linuxconfand Netconf

• Red Hat Package Manager (RPM)• ncurses• gnome-linuxconf• Network Configurator

Page 73: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Summary

Create, copy and delete files and folders Use text-reading commands Conduct Telnet, SSH, FTP, Web and e-mail

sessions Set system time Use system configuration applications

Page 74: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

© 2002 ComputerPREP, Inc. All rights reserved.

Lesson 7:Customizing the

Linux Logon Environment

Page 75: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Objectives

• Read and change environment variables• Use virtual terminals• Customize your logon environment by modifying

files such as .bashrc• Identify the files that are responsible for

establishing a logon environment• Create command aliases• Access the online help system

Page 76: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Understanding the Understanding the Logon EnvironmentLogon Environment

• Your logon shell• Your home directory• Your environment variables• Virtual terminals

– CTRL + ALT + F2CTRL + ALT + F2

Page 77: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Modifyingthe Search Path

• Making search path changes persistent– The which command and the search path

Page 78: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Startup Files

• Initialization files• Environment initialization files• Command aliases

Page 79: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

TheLinux Manual

• Layout of the manual– Manual sections

• A typical manual page (name, synopsis, description, options, example, files, bugs)

• Xman

Page 80: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Summary

Read and change environment variables Use virtual terminals Customize your logon environment by modifying

files such as .bashrc Identify the files that are responsible for

establishing a logon environment Create command aliases Access the online help system

Page 81: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

© 2002 ComputerPREP, Inc. All rights reserved.

Lesson 8:User Management

Page 82: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Objectives

• Create and delete users• Manage groups• Modify user settings• Identify the purpose of the /etc/skel directory• Modify user permissions with chown and chgrp• Describe the gpasswd command• Identify the purpose of the sudo suite of tools

Page 83: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

UserAccounts

• Properties of an account• The password file• The shadow password file

– Enabling shadow passwords

Page 84: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

AutomatedAccount Creation

• Account creation, modification and deletion• The useradd command• The passwd command• The usermod command• The userdel command• Automated account creation using linuxconf

Page 85: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

PasswordManagement

• Password aging• Password checking• The chage command• Listing current users

Page 86: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Groups

• The /etc/group file• Managing groups

Page 87: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

System Accounts and Special User Accounts

• Accounts with names such as daemon, sys and uucp used by system processes

• Special user accounts are limited logon shells dedicated for a single purpose

Page 88: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

SUDO

• /usr/bin/sudo• /etc/sudoers• /usr/sbin/visudo• /etc/pam.d/sudo

Page 89: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Summary

Create and delete users Manage groups Modify user settings Identify the purpose of the /etc/skel directory Modify user permissions with chown and chgrp Describe the gpasswd command Identify the purpose of the sudo suite of tools

Page 90: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

© 2002 ComputerPREP, Inc. All rights reserved.

Lesson 9:Managing Packages and Shared Libraries

Page 91: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Objectives

• Compile code from source packages• Recognize common errors concerning package

dependencies• Determine the cause of package version conflicts• Describe the purpose of shared libraries• Use ldd and ldconfig to manage libraries• Identify shared library errors

Page 92: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Packagesand Shared Libraries

• Compilers• Shared libraries• Source code

Page 93: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

The TraditionalInstallation Method

• Compiling code from a tarball• Using a configure script

Page 94: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Using RPM

• Functions– RPM queries entire packages– RPM installs binaries or source files using only

one command– RPM maintains a database of installed

applications, libraries and daemons

Page 95: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

RPMNaming Scheme

Package Name Version Release Architecture Ending . . - -

ext2resize 1.0.5 2 i386 rpm

Page 96: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

RPM andthe Root Account

• Listing package contents• Listing all contents• Listing RPM descriptions• Verifying packages to learn about missing files• Querying a file from a package

Page 97: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

DeterminingPackage Origin

• Gnu Privacy Guard (GPG) signatures

Page 98: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Installing,Upgrading and Deleting

• Installing remotely• Searching for an installed RPM• Deleting an RPM• Upgrading and rebuilding an RPM• Graphical utilities

Page 99: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Maintaining the RPM Facility and Obtaining RPM Files

• rpm –initdb: Creates RPM database• rpm –rebuilddb: Rebuilds database• RPMs are available at www.rpmfind.net,

www.redhat.com, www.mandrake.com

Page 100: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

ManagingShared Libraries

• Using ldd• Identifying errors• Managing shared libraries with ldconfig

Page 101: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Summary

Compile code from source packages Recognize common errors concerning package

dependencies Determine the cause of package version conflicts Describe the purpose of shared libraries Use ldd and ldconfig to manage libraries Identify shared library errors

Page 102: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

© 2002 ComputerPREP, Inc. All rights reserved.

Lesson 10:Managing Run Levels

Page 103: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Objectives

• Describe the Linux boot process• Stop the system in an orderly manner• Use single-user mode to handle problems• Specify a run level at boot time• Identify the /etc/inittab file• Use the fsck command• Explain how startup scripts operate• Use ksysv, ntsysv and chkconfig

Page 104: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

TheBoot Process

• Run levels• Changing run levels

– Halting and rebooting the system• Single-user mode• Specifying init levels during system boot

Page 105: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

TheInit Process

• The inittab file• The fsck program

Page 106: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

The LinuxBoot Process

• Reading startup scripts• Graphical script editors

Page 107: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Summary

Describe the Linux boot process Stop the system in an orderly manner Use single-user mode to handle problems Specify a runlevel at boot time Identify the /etc/inittab file Use the fsck command Explain how startup scripts operate Use ksysv, ntsysv and chkconfig

Page 108: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

© 2002 ComputerPREP, Inc. All rights reserved.

Lesson 11:I/O Redirection,

Variables and Shell Scripts

Page 109: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Objectives

• Differentiate between standard output and standard error

• Explain I/O redirection• Use regular expressions with the shell• Work with shell variables• Search within files for patterns using grep• Program basic shell scripts using common shell

commands

Page 110: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

I/ORedirection

• I/O redirection operators• Filters• Pipelines• Redirecting standard error• Discarding standard error with /dev/null

Page 111: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Interactingwith the Shell

• Shell wildcards• Quoting and escapes

– Single and double quotation marks– The backtic character

Page 112: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Assigning and Reading Variables

• Deleting a variable• Logon environment variables

Page 113: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

ShellScripts

• What is a shell script?• Writing a shell script• Running a shell script

– The dot command

Page 114: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Subshells

• Running scripts

Page 115: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Shell Scriptsand the Search Path

• The ~/bin directory• Subshells and local variables

Page 116: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

FindingPatterns with Grep

• Grep– Searches a file or standard input for a specified

pattern

Page 117: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

UnderstandingStatements

• Conditional• Loop

Page 118: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Summary

Differentiate between standard output and standard error

Explain I/O redirection Use regular expressions with the shell Work with shell variables Search within files for patterns using grep Program basic shell scripts using common shell

commands

Page 119: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

© 2002 ComputerPREP, Inc. All rights reserved.

Lesson 12:Managing Processes and System Elements

Page 120: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Objectives

• Check system processes• Differentiate between a PID, a PPID and a child

process• Use foregrounded and backgrounded processes• Use kill, killall, ps and top• Prioritize processes using nice and renice• Sample CPU and Memory usage• Use cron to schedule processes

Page 121: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

LinuxProcesses

• Interactive processes

Page 122: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

System andNetwork Daemons

• Monitoring and managing daemon processes• Typical log files in the /var/log/ directory

– messages– boot.log– Lastlog– Maillog– Secure– httpd/

Page 123: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Process IDand Parent Process ID

• Process ownership, daemons, and supporting applications– Real and effective PID– Child processes

Page 124: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

JobControl

• Foreground processes and background processes– Foregrounding and multiple jobs

• Options for kill and killall• Using nice and renice

Page 125: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

MonitoringProcesses with ps

• Options for the ps command• Examples

Page 126: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Using pstree

• Provides a hierarchical view of the processes on the system

Page 127: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Managing Processeswith Top and Uptime

• The top program generates a continually updated list of processes, sorted according to CPU usage

• Top can also be used to kill processes

Page 128: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

AdditionalMonitoring Applications

• vmstat• gtop and ktop• xosview• gdiskfree• df• du

Page 129: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

SchedulingProcesses with Cron

• Cron job types– User-based– Systemwide

• Cron elements• The crontab command

Page 130: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Crontab Format

minutes hoursday of the

monthmonth weekday command

Page 131: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

ControllingAccess to Cron

• Formatting cron.allow and cron.deny

Page 132: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Summary

Check system processes Differentiate between a PID, a PPID and a child

process Use foregrounded and backgrounded processes Use kill, killall, ps and top Prioritize processes using nice and renice Sample CPU and Memory usage Use cron to schedule processes

Page 133: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

© 2002 ComputerPREP, Inc. All rights reserved.

Lesson 13:Managing

the Hard Drive

Page 134: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Objectives

• Identify commonly used file system formats used by Linux

• Use the /etc/fstab file• Use mount and umount to manage the file system• Mount and unmount partitions• Differentiate between /dev/ and /mnt/• Create and format new partitions

Page 135: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Common FileSystem Formats

• Ext2• Reiser• iso9660

Page 136: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

The/etc/fstab File

• Dump, fsck and fstab

Page 137: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

The/etc/mtab File

• Device naming review

Page 138: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Using themount Command

• Determining current file system status• Mounting and unmounting devices• Unmounting drives

Page 139: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Mount and Removable Media

• Unmounting removable media• The /etc/fstab file and mounting disks• Additional options to the mount command

Page 140: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Disk Partitioningand Formatting

• Replacing a faulty disk• Adding a disk due to system usage• Adding a new partition to an existing disk• Destroying information

Page 141: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Using thefdisk Command

• Using fdisk interactively• Adding a partition• Using mkfs and mke2fs

Page 142: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Fsck andFile System Integrity

• Mounted disks

Page 143: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Using thehdparm Command

• Provides information about IDE hard drives

Page 144: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Summary

Identify commonly used file system formats used by Linux

Use the /etc/fstab file Use mount and umount to manage the file system Mount and unmount partitions Differentiate between /dev/ and /mnt/ Create and format new partitions

Page 145: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

© 2002 ComputerPREP, Inc. All rights reserved.

Lesson 14:The Kernel, Modules and

Customizing the Boot Process

Page 146: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Objectives

• Identify when to recompile the kernel• Distinguish between a monolithic and a modular

kernel• Load and manage kernel modules• Describe the purpose of the /etc/modules.conf file• Customize system boot by editing lilo.conf• Pass arguments to the kernel at the LILO prompt• Reconfigure GRUB using the /boot/grub/grub.conf

file

Page 147: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Locatingthe Kernel

• Kernel types– Modular

• Modules– Monolithic

• Root kits

Page 148: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Major Kernel Responsibilities

• Process scheduling• Input/output• Virtual memory• System calls• Device drivers

Page 149: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Why Updatethe Kernel?

• Increased stability• Additional features

– RAID support• Increased security

Page 150: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

KernelModules

• Module location• Loading and listing system modules

– The modules.conf file– Linuxconf and the kernel– kernelcfg

Page 151: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Customizing the Boot Process

• Lilo• lilo.conf• Modifying lilo.conf• Additional LILO options• Troubleshooting lilo.conf

Page 152: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Using GRUB

• Re-running GRUB after editing /boot/grub/grub.conf

• Appending values at boot time

Page 153: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Summary

Identify when to recompile the kernel Distinguish between a monolithic and a modular

kernel Load and manage kernel modules Describe the purpose of the /etc/modules.conf file Customize system boot by editing lilo.conf Pass arguments to the kernel at the LILO prompt Reconfigure GRUB using the /boot/grub/grub.conf

file

Page 154: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

© 2002 ComputerPREP, Inc. All rights reserved.

Lesson 15:Networking with Linux

Page 155: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Objectives

• Identify basic networking topologies and wiring types

• List common network types• Discuss common network protocols• Configure Linux for an IP network• Use network commands• Troubleshoot connectivity• Connect to NFS and Samba servers• Describe inetd, xinetd, and TCPWrappers

Page 156: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

NetworkTopologies

• Bus• Ring• Star

Page 157: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Network Types

• Ethernet• Token ring• Tokens and beaconing

Page 158: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

NetworkConnectivity Devices

• Hub• Switch• Repeater• Bridge• Router• Gateway• MAU

Page 159: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Static IPAddressing in Linux

• ifconfig• ifup• ifdown• linuxconf• netconf• netconfig• netcfg

Page 160: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

ManualInterface Configuration

• Using dmesg to learn more about the NIC

Page 161: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

DynamicAddressing

• Configuring Linux for DHCP• Pump and DHCP

Page 162: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

TestingNetwork Connectivity

• The ping command• Address resolution and ARP

Page 163: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Understanding Ports

• The netstat command• Checking your machine's routing status with

netstat• The route command• Traceroute• Using lsof• Troubleshooting DNS

Page 164: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Connectingto Linux Daemons

• The Network File System (NFS)• The Network Information System (NIS)• Samba• The rlogin command

Page 165: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

The Internet Daemonand TCPWrappers

• The Internet daemon– inetd.conf syntax– Using xinetd– Restarting inetd and xinetd

• TCPWrappers– Syntax for hosts.allow– Syntax for hosts.deny

Page 166: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

TroubleshootingConnectivity Problems

• Permissions• Proxy servers and connectivity

Page 167: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Summary

Identify basic networking topologies and wiring types

List common network types Discuss common network protocols Configure Linux for an IP network Use network commands Troubleshoot connectivity Connect to NFS and Samba servers Describe inetd, xinetd, and TCPWrappers

Page 168: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

© 2002 ComputerPREP, Inc. All rights reserved.

Lesson 16:Linux and Dial-up Access

Page 169: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Objectives

• Configure a client workstation for remote access• Select a modem to enable dial-up access• Use setserial to determine serial port speed• Use modem and connection troubleshooting tools• Explain how to configure ISDN connections

Page 170: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Modemsand Interfaces

• ISDN• Additional types of dial-up interfaces

– SLIP– CSLIP– PLIP

• Selecting the correct modem

Page 171: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Serial Ports

• /dev/ttyS0• /dev/ttyS1• /dev/ttyS2• /dev/ttyS3

Page 172: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

UsingSetserial

• Allows you to obtain information about serial ports• Allows you to set values for serial ports

Page 173: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

PPCConfiguration

• PPC authentication types– PAP– CHAP– MS-CHAP

• Point-to-Point Protocol Over Ethernet• PPP configuration files• PPP daemon files

Page 174: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

The ModemChat Sequence

• Hayes commands

Page 175: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Activating and Listing the PPP Interface

• ifup ppp0• Kppp• Linuxconf• rp3

Page 176: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Troubleshootingthe Modem

• Troubleshooting the connection

Page 177: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

ISDNand Linux

• Telephony• Basic Rate Interface/Primary Rate Interface• Configuring ISDN in Linux

Page 178: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Summary

Configure a client workstation for remote access Select a modem to enable dial-up access Use setserial to determine serial port speed Use modem and connection troubleshooting tools Explain how to configure ISDN connections

Page 179: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

© 2002 ComputerPREP, Inc. All rights reserved.

Lesson 17:The X-WindowEnvironment

Page 180: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Objectives

• Describe the relationship between X-Window servers and window managers

• Specify background colors and fonts• Redirect X-Window sessions• Troubleshoot X-Window sessions• Reconfigure the X-Window environment using

standard applications

Page 181: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

What IsX-Window?

• Components– X-Window server– X-Window client– Font server– Window manager– Virtual desktop software

Page 182: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

NumberingX-Window Displays

• Starting X-Window clients in the background• X-Window options

– X-Window and color schemes– Geometry– The xwininfo command– Fonts– Colors– Title

Page 183: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

RemoteX-Window Sessions

• Conducting a remote X-Window session– The xhost command

Page 184: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Conducting Remote Logon Sessions with X-Window

• Remote logons and X-Window• The xdm server• The X command

Page 185: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

TroubleshootingX-Window

• The .X.err file• Killing problem X-Window applications

– The kill command– The killall command

Page 186: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

ReconfiguringX-Window

• xf86config• SuperProbe• Xconfigurator• XF86Setup• Activating the mouse wheel in Linux

Page 187: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Summary

Describe the relationship between X-Window servers and window managers

Specify background colors and fonts Redirect X-Window sessions Troubleshoot X-Window sessions Reconfigure the X-Window environment using

standard applications

Page 188: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

© 2002 ComputerPREP, Inc. All rights reserved.

Lesson 18:Printing in Linux

Page 189: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Objectives

• Add and configure printers• Manage print spools and queues• Troubleshoot common printing problems• Resolve printing problems based on user feedback

Page 190: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Linux Print Terminology

• Printer name

• Filter

• Print directory

• Print spooler directory• Print device• Printer daemon

Page 191: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

UsingPrintTool

• Automatically probes existing parallel ports• Allows you to create entries in /etc/printcap

Page 192: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Connecting toa Remote Printer

• Requires– User name and password– Protocol– Name and IP address– Name of local print spooler directory

Page 193: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

PrintingDocuments

• Applications and printing• The lpr command

Page 194: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

PrintTroubleshooting

• Finding the parallel port• Printing multiple copies• Lpq• Lprm• Lpc

Page 195: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Summary

Add and configure printers Manage print spools and queues Troubleshoot common printing problems Resolve printing problems based on user feedback

Page 196: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

© 2002 ComputerPREP, Inc. All rights reserved.

Lesson 19:Archiving and Restoring

Page 197: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Objectives

• List common backup methods and strategies• Identify common backup media• Recognize additional backup options• Use tar, compress, gzip and zip to back up files

onto tape archives• Troubleshoot backup and restore errors

Page 198: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Planning aBackup Strategy

• Determining which files to back up• Selecting a backup method• Verifying backup integrity• Planning and practicing restoration procedures

Page 199: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Selecting aBackup Method

• Full backup• Differential backup• Incremental backup• Copy• Comparing strategies

Page 200: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

CommonBackup Media

• Floppy disks• Zip disks• Writable and rewritable CD-ROMs• Tapes• Choosing local or network backup• Mass backup devices

– CD jukebox– Stackloader

Page 201: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

VerifyingBackup Integrity

• Verifying archive existence• Listing contents of archive• Verifying archive integrity• Offsite storage

Page 202: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

CommonBackup Utilities

• tar• mt• dd• dump and restore• cpio• pax

Page 203: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Archivingand Compression

• Using tar to create and extract archives• Tar options• Extracting a single file or directory• Using compress/uncompress• Using gzip/gunzip• Using zip and unzip

Page 204: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Using thebzip2 Program

• The bunzip2 command• Additional applications

Page 205: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Troubleshooting Backupand Restore Errors

• Faulty media• Unintentional erasing• Improper storage• Common restoring errors

Page 206: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Summary

List common backup methods and strategies Identify common backup media Recognize additional backup options Use tar, compress, gzip and zip to back up files

onto tape archives Troubleshoot backup and restore errors

Page 207: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

© 2002 ComputerPREP, Inc. All rights reserved.

Lesson 20:Maintaining and Troubleshooting

Linux

Page 208: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Objectives

• Describe software and hardware troubleshooting best practices

• Identify when to increase swap space• Identify boot failure messages• List options for providing fault tolerance• Fix systems with system boot disks• Read and identify core dump messages• Consider physical environment and security

Page 209: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Hardware Updating Best Practices

• Expansion boards• Kudzu and Linux hardware• Memory and peripheral upgrade procedures• Replacing and maintaining a hard disk

Page 210: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

ResourceConflicts

• Common symptoms of device conflicts• Troubleshooting tools• Troubleshooting cables• Attenuation

Page 211: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

IncreasingSwap Space

• Additional swap commands• The mkswap command• Creating a swap file

Page 212: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

FaultTolerance Options

• Hot swapping• Uninterruptible power supply (UPS)• RAID

Page 213: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Troubleshooting theLinux Boot Process

• Booting into single mode• Using Linux interactive mode• Using a boot floppy disk or the installation CD as a

rescue disk• Obtaining a copy of the boot sector and restoring

it to the hard drive• Core dumps

Page 214: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

The Linux System's Physical Environment

• Ventilation and temperature• Humidity• Water• Dust• Magnetic fields

Page 215: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

SystemSecurity Issues

• Locked doors• Password-protected screen savers• Secure removable drives and drive ports• Unused logon accounts• Shadow utilities• Monitor log files

Page 216: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Summary

Describe software and hardware troubleshooting best practices

Identify when to increase swap space Identify boot failure messages List options for providing fault tolerance Fix systems with system boot disks Read and identify core dump messages Consider physical environment and security

Page 217: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Linux+

Linux Characteristics and Features Preparing for Installation Installing Linux Navigating the System Using Vi An Arsenal of Linux Commands Customizing the Linux Logon Environment

Page 218: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Linux+

User Management Managing Packages and Shared Libraries Managing Run Levels I/O Redirection, Variables and Shell Scripts Managing Processes and System Elements Managing the Hard Drive The Kernel, Modules and Customizing the Boot

Process Networking with Linux

Page 219: © 2002 ComputerPREP, Inc. All rights reserved. Linux+

Linux+

Linux and Dial-up Access The X-Window Environment Printing in Linux Archiving and Restoring Maintaining and Troubleshooting Linux