Tải bản đầy đủ (.pdf) (830 trang)

Giáo trình hệ điều hành AIX tập 1

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (7.21 MB, 830 trang )

AIX 6 Basics


(Course code AN10)
Instructor Guide
ERC 1.0
IBM certified course material

V5.4
cover
Front cover
Instructor Guide
February 2010 edition
The information contained in this document has not been submitted to any formal IBM test and is distributed on an “as is” basis without
any warranty either express or implied. The use of this information or the implementation of any of these techniques is a customer
responsibility and depends on the customer’s ability to evaluate and integrate them into the customer’s operational environment. While
each item may have been reviewed by IBM for accuracy in a specific situation, there is no guarantee that the same or similar results will
result elsewhere. Customers attempting to adapt these techniques to their own environments do so at their own risk.
© Copyright International Business Machines Corporation 2010.
This document may not be reproduced in whole or in part without the prior written permission of IBM.
Note to U.S. Government Users — Documentation related to restricted rights — Use, duplication or disclosure is subject to restrictions
set forth in GSA ADP Schedule Contract with IBM Corp.
Trademarks
The reader should recognize that the following terms, which appear in the content of this
training document, are official trademarks of IBM or other companies:
IBM® is a registered trademark of International Business Machines Corporation.
The following are trademarks of International Business Machines Corporation in the United
States, or other countries, or both:
PS/2® is a trademark or registered trademark of Lenovo in the United States, other
countries, or both.
Adobe is either a registered trademark or a trademark of Adobe Systems Incorporated in


the United States, and/or other countries.
Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the
United States, other countries, or both.
Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other
countries, or both.
UNIX® is a registered trademark of The Open Group in the United States and other
countries.
Linux® is a registered trademark of Linus Torvalds in the United States, other countries, or
both.
Other company, product, or service names may be trademarks or service marks of others.
AIX® AIX 5L™ Common User Access®
MVS™ OS/2® pSeries®
System p™ System p5™ 400®
Instructor Guide
V5.4
TOC
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
©Copyright IBM Corp. 2010 Contents iii
Contents
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Instructor course overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Course description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Agenda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Unit 1. Introduction to AIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1
Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
AIX Operating System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
Working on an AIX System (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6
Working on an AIX System (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9
Activity: Fill in the Blanks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12

The Shell: User Interface to AIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14
Useful AIX Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-17
AIX Graphical User Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-19
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-22
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-24
Unit 2. Using the System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1
Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Logging In and Out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
Passwords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
Command Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9
Command Format Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12
The date and cal Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14
The clear, echo, and banner Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16
Activity: Questions and Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-18
The who and finger Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-20
Sending Mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-23
Receiving Mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-26
The write and wall Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-29
talk with Another User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-32
mesg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-34
Keyboard Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-36
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-38
Exercise: Using The System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-40
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-42
Unit 3. AIX 6.1 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1
Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
man Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
man Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6
Instructor Guide
Course materials may not be reproduced in whole or in part

without the prior written permission of IBM.
iv AIX 6 Basics ©Copyright IBM Corp. 2010
man -k: Working with a Keyword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-8
Viewing AIX 6.1 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-10
Accessing the Documents from a Web Browser . . . . . . . . . . . . . . . . . . . . . . . . . .3-12
AIX 6.1 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-14
Search AIX 6.1 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-17
Search Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-19
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-21
Exercise: AIX 6.1 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-23
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-25
Unit 4. Files and Directories. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-1
Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-2
A File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-4
File Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-6
Directory Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-9
AIX File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-12
Hierarchical Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-14
Path Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-18
Where Am I? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-20
Listing Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-22
Long Listing of Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-24
Change Current Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-28
Activity: Q + A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-30
Creating Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-32
Removing Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-34
Working with Multiple Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-36
Displaying Directory Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-38
AIX File Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-40
touch Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-42

Checkpoint (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-44
Checkpoint (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-46
Exercise: Files and Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-48
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-50
Unit 5. Using Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-1
Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-2
Copying Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-4
cp Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-6
Moving and Renaming Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-9
mv Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-11
Listing File Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-13
Displaying Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-15
wc Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-17
Activity: Working with the wc Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-19
Linking Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-22
Linking Files (cont.) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-24
Removing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-26
Printing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-28
Instructor Guide
V5.4
TOC
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
©Copyright IBM Corp. 2010 Contents v
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-31
Exercise: Using Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-33
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-35
Unit 6. File Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1
Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2
Long Listing of Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4

File Protection/Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-7
Changing Permissions (Symbolic Notation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-9
Changing Permissions (Octal Notation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-12
Default File Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-15
umask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-17
Activity: Personal Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-20
Function/Permissions Required . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-23
Checkpoint (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-25
Checkpoint (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-27
Checkpoint (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-29
Exercise: File Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-31
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-33
Unit 7. The vi Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1
Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
Introduction to the vi Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4
Starting vi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-7
Adding Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-9
Exiting the Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-11
Cursor Movement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-13
Deleting Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-16
Search for a Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-18
Activity: vi Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-20
Changing Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-22
Cut, Copy, and Paste . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-25
vi - Executing AIX Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-28
vi Options . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-31
Command Line Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-34
vi Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-37
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-39
Exercise: vi Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-41

Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-43
Unit 8. Shell Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1
Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
The Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4
Metacharacters and Wildcards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6
File Name Substitution (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8
File Name Substitution (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-10
The Standard Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-13
File Descriptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-15
Instructor Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
vi AIX 6 Basics ©Copyright IBM Corp. 2010
Input Redirection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-17
Output Redirection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-19
Creating a File with cat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-21
Activity: Review Shell Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-23
Error Redirection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-25
Combined Redirection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-28
Pipes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-31
Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-33
Split Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-35
Command Grouping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-37
Line Continuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-39
Checkpoint (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-41
Checkpoint (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-43
Exercise: Shell Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-45
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-47
Unit 9. Using Shell Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-1
Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-2

Shell Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-4
Listing Variable Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-6
Setting and Referencing Shell Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-8
Shell Variables Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-10
Command Substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-12
Quoting Metacharacters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-14
Command Line Parsing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-16
Checkpoint (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-18
Checkpoint (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-20
Exercise: Using Shell Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-22
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-24
Unit 10. Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-1
Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-2
What Is a Process? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-4
Login Process Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-6
Process Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-8
Parents and Children . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-11
Variables and Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-14
Activity: Exporting Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-16
What Is a Shell Script? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-21
Invoking Shell Scripts (1 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-23
Invoking Shell Scripts (2 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-25
Invoking Shell Scripts (3 of 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-27
Exit Codes from Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-29
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-31
Activity: Shell Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-33
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-36
Instructor Guide
V5.4
TOC

Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
©Copyright IBM Corp. 2010 Contents vii
Unit 11. Controlling Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-1
Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-2
Monitoring Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-4
Controlling Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-6
Terminating Processes (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-9
Terminating Processes (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-11
Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-14
Running Long Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-17
Job Control in the Korn Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-20
Job Control Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-23
Daemons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-25
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-27
Exercise: Controlling Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-29
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-31
Unit 12. Customizing the User Environment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-1
Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-2
Login Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-4
Sample /etc/environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-7
Sample /etc/profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-9
Environment Variables (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-11
Sample .profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-13
Environment Variables (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-15
Sample .kshrc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-18
ksh Features - Aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-20
ksh Features - Using Aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-23
ksh Features - History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-25
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-27

Exercise: Customizing the User Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-29
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-31
Unit 13. AIX Utilities, Part I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-1
Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-2
find . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-4
Sample Directory Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-7
Using find . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-9
Executing Commands with find . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-11
Interactive Command Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-13
Additional Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-15
The Shell versus find . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-17
find Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-19
AIX Utilities (1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-21
grep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-23
grep Sample Data Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-25
Basic grep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-27
grep with Regular Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-29
grep Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-32
grep Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-34
Instructor Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
viii AIX 6 Basics ©Copyright IBM Corp. 2010
Other grep Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-36
Activity: grep Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-39
sort Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-42
sort Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-44
head and tail Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-46
telnet: Login to Remote Hosts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-49
ftp: Transfers Files Between Hosts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-51

ftp Subcommands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-53
rexec, rsh: Non-interactive Remote Execution . . . . . . . . . . . . . . . . . . . . . . . . . . .13-55
Secure Shell Utilities (OpenSSH) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-58
tar: Backup and Restore Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-61
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-63
Exercise: AIX Utilities (2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-65
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13-67
Unit 14. AIX Utilities, Part II . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-1
Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-2
xargs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-4
xargs Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-7
xargs, find, and grep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-9
The -links Option with find . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-12
alias and find . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-14
which, whereis, and whence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-16
file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-19
Exercise: AIX Utilities (3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-22
diff (Differential File Comparator) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-24
Comparing Two Files Using diff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-26
Comparing Two Files Using cmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-29
Comparing Directories Using dircmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-31
compress, uncompress, and zcat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-34
Displaying Non-Printable Characters in Files . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-37
Non-Printable Characters in Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-39
Assigning Unique File Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-41
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-43
Exercise: AIX Utilities (4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-45
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-47
Unit 15. Additional Shell Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-1
Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-2

Important Shell Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-4
Positional Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-6
The expr Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-8
expr Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-11
Conditional Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-13
test Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-15
if Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-17
Activity: Writing Shell Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-20
read Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15-23
Instructor Guide
V5.4
TOC
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
©Copyright IBM Corp. 2010 Contents ix
for Loop Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-25
while Loop Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-27
Command Search Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-29
Sample .profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-31
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-34
Exercise: Additional Shell Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-36
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-38
Unit 16. The AIX Graphical User Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-1
Unit Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-2
The X Window System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-4
What is AIXwindows? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-7
An X Window Network Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-9
The Client/Server Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-12
X Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-14
The X Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-17

Starting AIXwindows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-19
Stopping X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-22
An AIXwindows Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-24
The aixterm Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-26
Running a Client on Another System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-29
The xhost Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-32
The xauth Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-35
Common Desktop Environment (CDE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-38
The Components of the CDE Desktop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-41
The Login Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-43
$HOME/.dtprofile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-45
Front Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-48
Front Panel - Subpanels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-51
Front Panel - Further Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-54
The Style Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-56
The File Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-58
The Application Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-60
The Personal Applications Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-62
The Terminal Emulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-64
The Help System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-66
Checkpoint Questions (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-68
Checkpoint Questions (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-70
Exercise: Using AIXwindows and CDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-72
Unit Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-74
Instructor Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
x AIX 6 Basics ©Copyright IBM Corp. 2010
Appendix A. Checkpoint solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1
Appendix B. Command Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-1

Appendix C. Customizing AIXwindows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-1
Appendix D. CDE User Customization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-1
Glossary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X-1
Instructor Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
© Copyright IBM Corp. 2010 Trademarks xi
V5.4
TMK
Trademarks
The reader should recognize that the following terms, which appear in the content of this
training document, are official trademarks of IBM or other companies:
IBM® is a registered trademark of International Business Machines Corporation.
The following are trademarks of International Business Machines Corporation in the United
States, or other countries, or both:
PS/2® is a trademark or registered trademark of Lenovo in the United States, other
countries, or both.
Adobe is either a registered trademark or a trademark of Adobe Systems Incorporated in
the United States, and/or other countries.
Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the
United States, other countries, or both.
Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other
countries, or both.
UNIX® is a registered trademark of The Open Group in the United States and other
countries.
Linux® is a registered trademark of Linus Torvalds in the United States, other countries, or
both.
Other company, product, or service names may be trademarks or service marks of others.
AIX® AIX 5L™ Common User Access®
MVS™ OS/2® pSeries®

System p™ System p5™ 400®
Instructor Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
xii AIX 6 Basics © Copyright IBM Corp. 2010
Instructor Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
© Copyright IBM Corp. 2010 Instructor course overview xiii
V5.4
pref
Instructor course overview
This course has been designed from a user's perspective. The
students are not required to have any prior knowledge of AIX or any
other UNIX-based system.
The course sessions have been designed in a logical order to enable
the novice user to identify the major components of AIX. Then, the
students are introduced to the operating system by logging in and out
of the system and carrying out a few basic operations. The hierarchical
tree structure is explained in detail, and all the functions that can be
carried out on files and directories. The concept of a shell is introduced
and the operations that are supported through it. The one editor that is
covered is vi, this being the one that is available on most UNIX
platforms. The concept of users owning jobs and thus processes is
introduced, including the environment in which processes execute.
Finally, to pull together all the ideas from the previous units, a few
useful tools are introduced which help users customize their
environments and write very simple shell scripts, which is the main
objective of the course.
The course objectives and content are listed in this section. Ensure

that you cover both at the start of the course to set the correct
expectations right from the start.
Also note that all your students will have different levels of experience
with the operating system and also different capacities in learning. So,
it is very important to identify the level of your audience at the
beginning and only introduce additional information/discussion items
where relevant. The discussion items provided can usually be used to
challenge the more experienced students.
The main teaching aid that is provided with the course is the course
visuals. However, feel free to demonstrate any of the concepts
covered on demonstration workstations or in any other way, if you feel
that by doing so you will aid the learning process of the students.
Finally, remember that this course has been designed for users of the
operating system. System administrative concepts should not be
covered because they are outside the scope of this course. For
students who are interested in administrative tasks, encourage them
to attend the System Administration and the Advanced System
Administration courses. The System Administration course covers
how a system can be set up from a new installation, whereas the
emphasis for the advanced course is more on problem determination.
Instructor Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
xiv AIX 6 Basics © Copyright IBM Corp. 2010
Instructor Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
© Copyright IBM Corp. 2010 Course description xv
V5.4
pref

Course description
AIX 6 Basics
Duration: 4 days
Purpose
This course enables students to perform everyday tasks using the AIX
operating system.
Audience
This course is suitable for anyone who requires basic AIX user skills.
This course is also a prerequisite for students who plan to attend the
AIX System Administration courses.
Prerequisites
Students attending this course should be familiar with basic
information technology (IT) concepts and the role of an operating
system.
Objectives
After completing this course, you should be able to:
• Log in to an AIX system and set a user password
• Use AIX online documentation
• Manage AIX files and directories
• Describe the purpose of the shell
• Use the vi editor
• Execute common AIX commands and manage AIX processes
• Customize the working environment
• Use common AIX utilities
• Write simple shell scripts
• Use the AIXWindows environment
• Use the Common Desktop Environment
Instructor Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

xvi AIX 6 Basics © Copyright IBM Corp. 2010
Contents
• Introduction to AIX
• Using the System
• AIX 6.1 Documentation
• Files and Directories
• Using Files
• File Permissions
• The vi Editor
• Shell Basics
• Using Shell Variables
• Processes
• Customizing the User Environment
• AIX Utilities, Part I
• AIX Utilities, Part II
• Additional Shell Features
• The AIX Graphical User Interface
Curriculum relationship
This course is the first course in the AIX curriculum and is a
prerequisite for all the training paths.
Instructor Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
© Copyright IBM Corp. 2010 Agenda xvii
V5.4
pref
Agenda
Day 1
(00:20) Welcome
(00:30) Unit 1 - Introduction to AIX

(00:45) Unit 2 - Using the System
(00:30) Exercise 1 - Using the System
(00:45) Unit 3 - AIX Documentation
(00:45) Exercise 2 - AIX Documentation
(01:15) Unit 4 - Files and Directories
(00:30) Exercise 3 - Files and Directories
(00:40) Unit 5 - Using Files
(00:45) Exercise 4 - Using Files
Day 2
(01:00) Unit 6 - File Permissions
(00:45) Exercise 5 - File Permissions
(00:45) Unit 7 - The vi Editor
(00:45) Exercise 6 - The vi Editor
(01:00) Unit 8 - Shell Basics
(00:45) Exercise 7 - Shell Basics
(00:40) Unit 9 - Using Shell Variables
(00:45) Exercise 8 - Using Shell Variables
Day 3
(00:50) Unit 10 - Processes
(00:45) Unit 11 - Controlling Processes
(00:45) Exercise 9 - Controlling Processes
(00:30) Unit 12 - Customizing the User Environment
(00:30) Exercise 10 - Customizing the User Environment
(00:25) Unit 13 - AIX Utilities, Part I
(00:30) Exercise 11 - AIX Utilities (1)
(00:30) Unit 13 - AIX Utilities, Part I (Continued)
(00:45) Exercise 12 - AIX Utilities (2)
(00:25) Unit 14 - AIX Utilities, Part II
(00:30) Exercise 13 - AIX Utilities (3)
Instructor Guide

Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
xviii AIX 6 Basics © Copyright IBM Corp. 2010
Day 4
(00:25) Unit 14 - AIX Utilities, Part II (Continued)
(00:35) Exercise 14 - AIX Utilities (4)
(00:45) Unit 15 - Additional Shell Features
(01:00) Exercise 15 - Additional Shell Features
(01:30) Unit 16 - The AIX Graphical User Interface
Instructor Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
© Copyright IBM Corp. 2010 Agenda xix
V5.4
pref
Text highlighting
The following text highlighting conventions are used throughout this book:
Bold Identifies file names, file paths, directories, user names, and
principals.
Italics Identifies links to Web sites, publication titles, and is used
where the word or phrase is meant to stand out from the
surrounding text.
Monospace Identifies attributes, variables, file listings, SMIT menus, code
examples of text similar to what you might see displayed,
examples of portions of program code similar to what you might
write as a programmer, and messages from the system.
Monospace bold Identifies commands, daemons, menu paths, and what the user
would enter in examples of commands and SMIT menus.
<text> The text between the < and > symbols identifies information the
user must supply. The text may be normal highlighting, bold or

monospace, or monospace bold depending on the context.
Instructor Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
xx AIX 6 Basics © Copyright IBM Corp. 2010
Instructor Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
© Copyright IBM Corp. 2010 Unit 1. Introduction to AIX 1-1
V5.4
Uempty
Unit 1. Introduction to AIX
Estimated time
00:30
What this unit is about
This unit is an introduction to the course AIX 6 Basics.
What you should be able to do
After completing this unit, students should be able to:
• Describe the major components of an AIX system
• Describe the major topics in this course
• Explain the value of these topics when working in an AIX
environment
How you will check your progress
Accountability:
• Student activity
• Checkpoint questions
Instructor Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
1-2 AIX 6 Basics © Copyright IBM Corp. 2010

Figure 1-1. Unit Objectives AN101.0
Notes:
© Copyright IBM Corporation 2010
Unit Objectives
After completing this unit, you should be able to:
Ɣ Describe the major components of an AIX system
Ɣ Describe the major topics in this course
Ɣ Provide the value of these topics when working in an AIX
environment
Instructor Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
© Copyright IBM Corp. 2010 Unit 1. Introduction to AIX 1-3
V5.4
Uempty
Instructor notes:
Purpose — Explain what students will learn in this unit.
Details —
Additional information — None.
Transition statement — Let's start with a high-level view of the AIX operating system.
Instructor Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
1-4 AIX 6 Basics © Copyright IBM Corp. 2010
Figure 1-2. AIX Operating System AN101.0
Notes:
The AIX Kernel
A computer consists of many hardware devices that the users of a computer system
want to use. For example, they want to print documents or they want to play a game
from a CD-ROM.

To control these hardware devices and to share them between multiple users, an
operating system must be loaded during the system startup. In the case of the AIX
operating system, there is one special program which interfaces directly to the
hardware devices: the AIX Kernel. The Kernel controls the access to the devices.
On the other hand, the users start different programs, for example, a program that prints
a document or removes a file. These programs that run in AIX processes are also
controlled by the AIX Kernel.
To say it simply: The AIX Kernel is the heart of your operating system.
© Copyright IBM Corporation 2010
AIX Kernel
Interface to hardware
Manages processes
Process 1
Process 2
Process 3
Process 4

User fred
User sarah
AIX Operating System
Instructor Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
© Copyright IBM Corp. 2010 Unit 1. Introduction to AIX 1-5
V5.4
Uempty
Instructor notes:
Purpose — Describe the role of an operating system and the AIX Kernel.
Details — Give an easy introduction. Keep things simple and explain as described in the
notes.

Additional information —
Transition statement — Let's introduce what students will learn in this course.

×