- •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 10 Linux Terminals and Shells 345
Caution using root access
4.7 Perform administrative tasks while logged in as root, or by using the su command (e.g., understand commands that are dangerous to the system)
Root access is required to perform most Linux administrative tasks. However, the powers of root access are unlimited and can permanently damage the system if performed incorrectly. Therefore, the common and “best practice” method for providing root access in Linux or UNIX is to log in as a user and then use the su (switch user) command to change to the root user, perform the required task, and then exit root privilege.
You can use the su (switch user) command to move from any user login to another. If a user name is not given, the su command defaults to change to the root user. This command asks for the root password and provides all the necessary abilities. Notice that the prompt changes from a $ for users to # for the root user.
Even when performing routine tasks with root access, use due care to ensure that the system is backed up and user files are protected.
Navigating the GUI interface
4.17 Manage and navigate the Graphical User Interface (e.g., menus, xterm)
Most Linux tasks can be performed in the X Window System, which requires you to be able to navigate the GUI interface. Today, most distributions use the GNOME or KDE desktop environment and provide many tools necessary for performing extensive management of the Linux system. Each distribution also provides its own tools to perform administrative tasks. The basic navigation of the system requires the use of a terminal session, which provides access to the command line in the GUI. Most instances of the GUI allow the right mouse button to provide a menu that allows you to select a terminal, or by using the standard GUI menus to select a terminal. This is typically called an “xterm”, to denote a terminal within an X Windows session.
The neutrality of the Linux+ exam limits the questions on navigating the GUI interface, so be prepared for only very general questions about GUI interfaces.
346 Part IV Administration
Summary
This chapter explains many of the basics of Linux system navigation, including the use of terminals, virtual consoles, shell navigation, and remote access. For the exam, keep these points in mind:
Multi-user environments
•Virtual Consoles (or VCs)
•Serial Terminals
•Ethernet Terminals and the Linux Terminal Server Project
Shell, scripts, and scheduling
•BASH
•Creating scripts
•Cron and crontab to schedule tasks
Administration and navigation
•Root access
•GUI navigation
Chapter 10 Study Guide 347
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 keystroke is normally used to move from one virtual console to another virtual console?
A.<Ctrl> <Tab>
B.<Alt> <Fx>, where x is the console number
C.<Alt> <Tab>
D.<Ctrl> <Fx>, where x is the console number
2.How many virtual consoles does Linux normally support?
A.32
B.48
C.63
D.256
3.What can you use to provide a simple way to utilize low-cost workstations as either graphicalor text-based terminals in a Linux environment?
A.Virtual Consoles
B.Samba Server
C.DHCP Server
D.Terminal server
4.When creating terminals with a diskless or Ethernet client, how does the client receive the kernel from the server?
A.tftp
B.ftp
C.DHCP
D.bootp
348 Chapter 10 Study Guide
5.Which file can be modified to allow Linux to provide more than the default number of virtual consoles?
A./etc/rc.d/init.d/syslog
B./etc/inetd.conf
C./etc/inittab
D./tftpboot/lts/ltsroot/etc/lts.conf
6.What services are used to provide IP addresses for clients on a terminal server system? (Choose all that apply.)
A.bootp
B.DNS
C.DHCP
D.NFS
7.What additional package may be used to help support the creation of terminals for the LTSP system?
A.lts_core
B.Etherboot
C.XDM
D.syslogd
8.What program may be used to monitor connections to a Linux system?
A.tracert
B.nbstat
C.ipconfig
D.netstat
9.BASH has incorporated useful features from what other shells? (Choose all that apply.)
A.ksh
B.tcsh
C.z-shell
D.csh
Chapter 10 Study Guide 349
10.Where is the bash executable usually stored?
A./.bashrc
B./.bash_profile
C./bin/bash
D./etc/bash
11.What daemon is used to schedule automated tasks on a Linux system?
A.crontab
B.cron
C.cron.d
D.crontab.d
12.Which of the following indicates that the file is a shell script?
A.#!/bin/sh
B.#script
C.!!/bin/bash
D.* script *
13.What command may be used to move from one login to another without logging out?
A.vi
B.su
C.chmod
D.chuser
14.What provides access to other command line interfaces in a Linux system?
A.<Alt> <Fx> where x is the number of the virtual console
B.Command Prompt
C.Only logging out to a command line
D.Terminal
350 Chapter 10 Study Guide
15.What is the Linux Terminal Server Project package name?
A.ltsp_initialize
B.ltsp
C.lts_core
D.mknbi-linux
16.What command is used to install the package lts_core-2.XX-XX.i386.rpm?
A.rpm -i lts_core-2.XX-XX.i386.rpm
B.rpm -I lts_core-2.XX-XX.i386.rpm
C.rpm -e lts_core-2.XX-XX.i386.rpm
D.rpm -u lts_core-2.XX-XX.i386.rpm
17.Which of the following lines in the inittab file will create a virtual terminal that may not be a local connection to the Linux system?
A.S2:3:respawn:/sbin/uugetty ttyS2 M19200
B.2:2345:respawn:/sbin/getty tty2 VC linux
C.# S2:3:respawn:/sbin/uugetty ttyS2 M19200
D.# 2:2345:respawn:/sbin/getty tty2 VC linux
18.Which file does the lts_core package create that may add in the starting of the DHCP service?
A./etc/bootptab
B./etc/dhcpd.conf.example
C./etc/dhcpd.conf
D./etc/dhcp/dhcpd.leases
19.What should be installed on any network using LTSP service to prevent vulnerability to unauthorized outside access?
A.XDM
B.firewall
C.router
D.portmapper