1. Trang chủ
  2. » Giáo Dục - Đào Tạo

solaris 8 system administrator

454 299 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Solaris 8 System Administrator
Tác giả Darrell L. Ambro
Trường học The Coriolis Group, LLC.
Chuyên ngành System Administration / Information Technology
Thể loại exam cram
Năm xuất bản 2001
Định dạng
Số trang 454
Dung lượng 2,22 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

In this Introduction, I talk about Sun’s certification program in general and how the Exam Cram series can help you prepare for the Solaris 8 certification exams.. Exam Cram books help y

Trang 2

Preface

Build the confidence you need to pass the exam

The Exam Cram Method of study focuses on exactly what you need to get certified now

· Specially designed and written to help you pass the Sun Certified System Administrator for Solaris 8, Part 1 (310-011) and Part 2 (310-012) exam

· Features test-taking strategies and time-saving study tips

· Contains a special Cram Sheet with tips, acronyms, and memory joggers not offered anywhere else

In This Book You'll Learn How To:

· Install and maintain Solaris 8

· Boot and shut down a system

· Set up user accounts

· Manage hard disks

· Create and mount file systems

· Perform backups and restores

· View and control processes

· use remote connection capabilities

· Administer NFS

· Use automount and CacheFS

· Configure naming services

· Set up role-based access control

· Configure syslog

· Use JumpStart automatic installation

Brought to you by ownSky!

Trang 3

Table of Contents

Solaris 8 System Administrator Exam Cram .....................3Introduction ...................................6Self-Assessment ............................... 13

Part I Exam 310-011

Chapter 1 -Solaris 8 Certification Exams .................... 19

Chapter 3 -Installing and Maintaining Solaris 8 ..................49Chapter 4 -Booting and Shutting Down the System ................76Chapter 5 -System Security and File Permissions ................ 96Chapter 6 -The User Environment ...................... 120Chapter 7 -Controlling Processes ...................... 148Chapter 8 -Disk Administration ........................164Chapter 9 -File System Administration .................... 188

Part II Exam 310-012

Chapter 13-The Solaris Network Environment ................. 268Chapter 14-Syslog and Auditing Utilities ....................287Chapter 15-Advanced Disk Management ................... 300Chapter 16-Pseudo File Systems and Swap Space ...............312Chapter 17-Role-Based Access Control (RBAC) ................323Chapter 18-Network File System .......................339

Chapter 20-Solaris Management Console and Solstice AdminSuite ........378Chapter 21-Over-the-Network Installation and JumpStart ............ 387

Cram Sheet .................................429Glossary .................................. 423

Trang 4

Solaris 8 System Administrator Exam Cram

Darrell L Ambro

Copyright © 2001 The Coriolis Group, LLC All rights reserved

This book may not be duplicated in any way without the express written consent of the

publisher, except in the form of brief excerpts or quotations for the purposes of review The information contained herein is for the personal use of the reader and may not be

incorporated in any commercial programs, other books, databases, or any kind of software without written consent of the publisher Making copies of this book or any portion for any purpose other than your own is a violation of United States copyright laws

Limits of Liability and Disclaimer of Warranty

The author and publisher of this book have used their best efforts in preparing the book and the programs contained in it These efforts include the development, research, and testing of the theories and programs to determine their effectiveness The author and publisher make

no warranty of any kind, expressed or implied, with regard to these programs or the

documentation contained in this book

The author and publisher shall not be liable in the event of incidental or consequential

damages in connection with, or arising out of, the furnishing, performance, or use of the

programs, associated instructions, and/or claims of productivity gains

Trademarks

Trademarked names appear throughout this book Rather than list the names and entities that own the trademarks or insert a trademark symbol with each mention of the trademarked name, the publisher states that it is using the names for editorial purposes only and to the benefit of the trademark owner, with no intention of infringing upon that trademark

The Coriolis Group, LLC

Trang 5

Includes index

ISBN 1-57610-921-6

1 Electronic data processing personnel Certification 2 Operating

systems (Computers) Certification Study guides 3 Solaris (Computer

file) I Title II Series

QA76.3.A526 2001

005.4'4769 dc21 2001042168

Printed in the United States of America

10 9 8 7 6 5 4 3 2 1

President and CEO: Roland Elgey

Publisher: Steve Sayre

Associate Publisher: Katherine R Hartlove

Acquisitions Editor: Sharon Linsenbach

Director of Marketing: Susan Hughes

Project Editor: Dan Young

Technical Reviewer: Sheldon Barry

Production Coordinator: Thomas Riker

Cover Designer: Laura Wellander

Layout Designer: April Nielsen

Look for these other books from The Coriolis Group:

Java 2 Exam Cram, Second Edition

For my parents, my brother and his family, my wife and kids

And in memory of Alfred Chabarek (1920-2000)

About the Author

Darrell L Ambro is a Distinguished Member of Technical Staff with Lucent Technologies He

has been with Lucent and its predecessors for 24 years and has been using various forms of Unix since 1977

During his career, Darrell has been involved in a variety of projects supporting both military and civilian organizations of the U.S Government These projects involved Local Area

Network (LAN) design, operation, implementation and troubleshooting, application

development and systems integration, system security and intrusion detection, database design, system administration, system test, proposal development, acceptance test/sales

Trang 6

support, software maintenance and tier 2 support Recently Darrell has become involved in supporting Lucent’s corporate computer infrastructure

In addition to being a Sun Certified System Administrator for Solaris 2.6, Solaris 7 and Solaris

8, Darrell is also a Sun Certified Network Administrator for Solaris 8, a Novell Certified

NetWare Engineer (CNE) and a Microsoft Certified System Engineer (MCSE)

Darrell is a third degree black belt in Tae Kwon Do under the training of Grand Master Seung Gyoo Dong of Richmond, VA

Acknowledgements

Thanks to Sharon Linsenbach, Dan Young, Tiffany Taylor, Sheldon Barry, Thomas Riker, April Nielsen, and Jesse Dunn at The Coriolis Group who provided guidance and assistance

in the development and production of my second book

My wife, Lilli and my kids, Shane and Eva, for giving me the time to get it done I love you

My food chain at Lucent Technologies, Dennis Stinehelfer, Mark Decker and Chris Thomas for not objecting to me taking vacation on short notice This allowed me to keep up with the writing schedule for this book

My co-workers and friends for providing encouragement

Brought to you by ownSky!

Trang 7

Introduction

Overview

Welcome to Solaris 8 System Administrator Exam Cram This book will help you get ready to

take—and pass—the two exams required to obtain the Sun Certified System Administrator for Solaris 87 certification In this Introduction, I talk about Sun’s certification program in general and

how the Exam Cram series can help you prepare for the Solaris 8 certification exams

Exam Cram books help you understand and appreciate the subjects and materials you need to

pass Solaris certification exams The books are aimed strictly at test preparation and review They

do not teach you everything you need to know about a topic Instead, I present and dissect the questions and problems that you’re likely to encounter on a test

Nevertheless, to completely prepare yourself for any Solaris test, I recommend that you begin by taking the Self-Assessment included in this book immediately following this Introduction This tool will help you evaluate your knowledge base against the requirements for a Solaris 8 System Administrator under both ideal and real circumstances

Based on what you learn from that exercise, you might decide to begin your studies with some classroom training or by reading one of the many system administration guides available from Sun and third-party vendors I also strongly recommend that you install, configure, and fool around with Solaris 8 and other software that you’ll be tested on, because nothing beats hands-on experience and familiarity when it comes to understanding the questions you’re likely to encounter on a

certification test Book learning is essential, but hands-on experience is the best teacher of all!

The Sun Certified System Administrator for Solaris

Trang 8

process, system security and file permissions, account administration, disk and file system management, backup, and recovery

· Sun Certified System Administrator for the Solaris 8 Operating Environment, Part 2 (Exam 310-012)—The second exam (Part 2) covers advanced topics and several add-on software

packages that are used to enhance system administration capabilities Knowledge tested includes the Solaris 8 network environment and network clients; device administration; virtual disk management systems; Network File System (NFS), along with automounting and caching; naming services such as DNS, NIS, and NIS+; along with automated installation using JumpStart

To become a certified system administrator, an individual must pass both exams You must pass Part 1 exam before you can take the Part 2 exam This order is preferred anyway, since the knowledge tested builds from the first exam to the second

It’s not uncommon for the entire process to take a year or so, and many individuals find that they

must take a test more than once to pass The primary goal of the Exam Cram series is to make it

possible, given proper study and preparation, to pass both of the exams on the first try

Because certification is associated with a particular version of the Solaris operating system, there

is no requirement to ever recertify However, once a Solaris version becomes obsolete, being certified on that version will have very little value It would be in your best interest to work on the certification for the next version of Solaris

In the past, Sun has used the certification requirements and test objectives from the previous version as a starting point for the next version Therefore, once certified on a version of Solaris, you should be very familiar with most of the test objectives for certification in the next version of Solaris I estimate that about 25 percent of the test objectives changed between Solaris 7 and Solaris 8

The best place to keep tabs on Sun’s certification program is on the Sun Web site The current URL for Sun’s System Administrator program is at

http://suned.sun.com/US/certification/sysadmin.html Sun’s certification Web site changes

frequently, so if this URL doesn’t work, try using the Search tool on Sun’s site (www.sun.com)

with either “certification” or the quoted phrase “certified system administrator” as the search string This will help you find the latest and most accurate information about the company’s certification programs

Taking a Certification Exam

Alas, testing is not free You’ll be charged $150 for each test you take, whether you pass or fail In

Trang 9

First, you must purchase an examination voucher from Sun Educational Services In the U.S., they can be contacted at 1-800-422-8020 This requires the use of a credit card The voucher can be used for up to one year from the date of purchase

Next, contact Sylvan Prometric to register for the exam In the U.S., their number is

1-800-795-3926 You can also use the Sylvan Web site (www.2test.com)

To schedule an exam, call at least one day in advance To cancel or reschedule an exam, you must call at least one day before the scheduled test time (or you may be charged the $150 fee) When calling Sylvan Prometric, please have the following information ready for the telesales staffer who handles your call:

· Your name, organization, mailing address, and social security number

· The name of the exam you want to take

· The number of the Sun voucher (This information may not be needed, because the Sylvan Prometric staffer may already have it.)

An appointment confirmation will be sent to you by mail if you register more than five days before

an exam, or will be sent by fax if less than five days before the exam A Candidate Agreement letter, which you must sign to take the examination, will also be provided

On the day of the test, try to arrive at least 15 minutes before the scheduled time slot You must supply two forms of identification, one of which must be a photo ID

All exams are completely closed book In fact, you will not be permitted to take anything with you into the testing area I suggest that you review the most critical information about the test you’re

taking just before the test (Exam Cram books provide a brief reference—The Cram Sheet, located

inside the front of this book—that lists the essential information from the book in distilled form.) You will have some time to compose yourself, to mentally review this critical information, and even

to take a sample orientation exam before you begin the real thing I suggest you take the

orientation test before taking your first exam; they’re all more or less identical in layout, behavior, and controls, so you probably won’t need to do this more than once

When you complete a Solaris 8 certification exam, the testing software will tell you whether you’ve passed or failed Results are broken into several topical areas Whether you pass or fail, I suggest you ask for—and keep—the detailed report that the test administrator prints for you You can use the report to help you prepare for another go-round, if necessary, and even if you pass, the report shows areas you may need to review to keep your edge If you need to retake an exam, you’ll have to call Sylvan Prometric, schedule a new test date, and pay another $150

Tracking Certification Status

Trang 10

Sun maintains a database that indicates the exams you have passed and your corresponding test

scores This database is accessible at www.galton.com/~sun After you pass both exams, you’ll

be certified as a System Administrator for Solaris 8 Official certification normally takes anywhere from four to six weeks (generally within 30 days), so don’t expect to get your certificate overnight Once certified, you will receive a package with a Welcome Kit that contains a number of elements:

· A System Administrator for Solaris 8 certificate, suitable for framing

· A logo sheet, which includes camera-ready artwork, for use on letterhead, business cards, etc

· A Sun Certified System Administrator lapel pin

Many people believe that the benefits of certification go well beyond the perks that Sun provides to newly anointed members of this elite group I am starting to see more job listings that request or require applicants to have a Solaris certification, and many individuals who complete the program can qualify for increases in pay and/or responsibility As an official recognition of hard work and broad knowledge, Solaris certification is a badge of honor in many IT organizations

How to Prepare for an Exam

At a minimum, preparing for Solaris 8 exams requires that you obtain and study the following materials:

· The Solaris 8 documentation in printed form, on CD-ROM as delivered with Solaris 7

(AnswerBook2), or on the Web at docs.sun.com

· The exam test objectives and sample questions on the Sun certification page

(http://suned.sun.com/US/certification/solaris/sysadmin.html) Also see the Test

Objectives section of Chapter 1 A table is included that provides a chapter to test objective cross-reference

· This Exam Cram book It’s the first and last thing you should read before taking the exam

In addition, you’ll probably find any or all of the following materials useful in your quest for Solaris 8 system administration expertise:

· Hands-on Experience—Obtain a copy of Solaris 8 from the www.sun.com Web site As you

work through the book, try the commands and explore the details Experience is the best way

to learn and remember the details that you’ll need to know to pass the exams The Solaris 8 operating system can be downloaded for free or obtained on CD-ROM for the cost of media and shipping

· Classroom Training—Sun offers classroom and computer-based training that you will find

useful to help you prepare for the exam But a word of warning: These classes are fairly

Trang 11

form of learning to help you “brush up” on your Solaris knowledge The tests are closely tied

to the classroom training provided by Sun, so I would suggest taking the classes to get the Solaris-specific (and classroom-specific) terminology under your belt

· Other Publications—You’ll find direct references to other publications and resources in this

book, and there’s no shortage of materials available about Solaris; however, many are not written specifically for Solaris 8 For that reason, I have not referenced a large number of these publications To help you sift through some of the publications out there, I end each chapter with a “Need To Know More?” section that provides pointers to more complete and exhaustive resources covering the chapter’s subject matter This section tells you where to look for further details

These required and recommended materials represent a nonpareil collection of sources and resources for Solaris 8 System Administrator topics and software In the section that follows, I explain how this book works and give you some good reasons why this book should also be on your required and recommended materials list

About This Book

Each topical Exam Cram chapter follows a regular structure, along with graphical cues about

especially important or useful material Here’s the structure of a typical chapter:

· Opening Hotlists—Each chapter begins with lists of the terms, tools, and techniques that you

must learn and understand before you can be fully conversant with the chapter’s subject matter I follow the hotlists with one or two introductory paragraphs to set the stage for the rest of the chapter

· Topical Coverage—After the opening hotlists, each chapter covers a series of topics related to

the chapter’s subject Throughout this section, I highlight material most likely to appear on a test using a special Exam Alert layout, like this:

Exam Alert

This is what an Exam Alert looks like Normally, an Exam Alert stresses concepts, terms, software, or activities that will most likely appear in one or more certification test questions For that reason, any information found offset in Exam Alert format is worthy of unusual attentiveness on your part Indeed, most of the facts appearing in The Cram Sheet appear as Exam Alerts within the text

· Even if material isn’t flagged as an Exam Alert, all the contents of this book are associated, at least tangentially, to something test-related This book is tightly focused for quick test preparation,

Trang 12

so you’ll find that what appears in the meat of each chapter is critical knowledge

· I have also provided tips that will help build a better foundation of system administration knowledge Although the information may not be

on the exam, it is highly relevant and will help you become a better test-taker

Tip

This is how tips are formatted Keep your eyes open for these, and you’ll become a test guru in no time!

· Practice Questions—This section presents a series of mock test questions and explanations of

both correct and incorrect answers

· Details And Resources—Every chapter ends with a section titled “Need to Know More?”

This section provides direct pointers to Sun and third-party resources that offer further details

on the chapter’s subject matter In addition, this section tries to rate the quality and

thoroughness of each topic’s coverage If you find a resource you like in this collection, use it; but don’t feel compelled to use all these resources On the other hand, I recommend only resources I use on a regular basis, so none of my recommendations will be a waste of your time or money

The bulk of the book follows this chapter structure slavishly, but there are a few other elements that I would like to point out Chapters 11 and 22 include sample tests that provide a good review

of the material presented throughout the book to ensure you’re ready for the exam Chapters 12 and 23 provide answer keys to the sample tests Finally, look for The Cram Sheet, which appears

inside the front of this Exam Cram book It is a valuable tool that represents a condensed and

compiled collection of facts, figures, and tips that I think you should memorize before taking the test Because you can dump this information out of your head onto a piece of paper before

answering any exam questions, you can master this information by brute force—you need to remember it only long enough to write it down when you walk into the test room You might even want to look at it in the car or in the lobby of the testing center just before you walk in to take the test

How to Use This Book

If you’re prepping for a first-time test, I’ve structured the topics in this book to build on one another Therefore, some topics in later chapters make more sense after you’ve read earlier chapters That’s why I suggest you read this book from front to back for your initial test preparation

Trang 13

If you need to brush up on a topic or you have to bone up for a second try, use the index or table of contents to go straight to the topics and questions that you need to study Beyond the tests, I think you’ll find this book useful as a tightly focused reference to some of the most important aspects of topics associated with being a system administrator, as implemented under Solaris 8

Given all the book’s elements and its specialized focus, I’ve tried to create a tool that you can use

to prepare for—and pass—both of the Solaris 8 System Administrator examinations Please share your feedback on the book with me, especially if you have ideas about how I can improve it for future test-takers I’ll consider everything you say carefully, and I try to respond to all suggestions

You can reach me via email at solaris@unixcert.net Or you can send your questions or

comments to cipq@coriolis.com Please remember to include the title of the book in your

message

For up-to-date information on certification, online discussion forums, sample tests, content

updates, and more, visit the Certification Insider Press Web site at

www.certificationinsider.com

Thanks, and enjoy the book!

Trang 14

Sef-Assessment

I’ve included a Self-Assessment in this Exam Cram to help you evaluate your readiness to tackle

Sun Certified System Administrator for Solaris 8 certification It should also help you understand what you need to master the topic of this book—namely, Exam 310-011, “Sun Certified System Administrator for Solaris 8 Operating Environment, Part 1” and Exam 310-012, “Sun Certified System Administrator for Solaris 8 Operating Environment, Part 2” But before you tackle this Self-Assessment, let’s talk about the concerns you may face when pursuing a Solaris 8 System Administrator certification, and what an ideal candidate might look like

Solaris 8 System Administrators in the Real World

In the next section, I describe an ideal Solaris 8 System Administrator candidate, knowing full well that only a few actual candidates meet this ideal In fact, my description of that ideal candidate might seem downright scary But take heart, because, although the requirements to obtain a Solaris 8 System Administrator certification may seem pretty formidable, they are by no means impossible to meet However, you should be keenly aware that it does take time, requires some expense, and consumes a substantial effort

You can get all the real-world motivation you need from knowing that many others have gone before you You can follow in their footsteps If you’re willing to tackle the process seriously and do what it takes to obtain the necessary experience and knowledge, you can take—and pass—the

certification tests In fact, the Exam Crams and the companion Exam Preps are designed to make

it as easy as possible for you to prepare for these exams But prepare you must!

The same, of course, is true for other Solaris certifications, including:

· Solaris 8 Network Administrator, which concentrates on the networking aspects but requires only one exam The Solaris 8 System Administrator certification is a prerequisite

· Solaris 7 System Administrator, which is similar to the Solaris 8, but addresses the previous version of Solaris and requires two exams

· Solaris 7 Network Administrator, which concentrates on the networking aspects of the Solaris

7 environment and requires only one exam

The Ideal Solaris 8 System Administrator Candidate

Just to give you some idea of what an ideal Solaris 8 System Administrator candidate is like, here are some relevant statistics about the background and experience such an individual might have

Trang 15

because this world is far from ideal, and where you fall short is simply where you’ll have more work

to do The ideal candidate will have:

· Academic or professional training in Unix operating systems and more specifically the AT&T System V Release 4 (SVR4) Unix operating system on which Solaris is based

· Three-plus years of professional system administration experience, including experience installing and upgrading operating systems, performance tuning, troubleshooting problems, creating users, and managing backup and recovery scenarios

I believe that well under half of all certification candidates meet these requirements In fact, most probably meet less than half of these requirements (that is, at least when they begin the

certification process) But, because all those who have their certifications already survived this ordeal, you can survive it, too—especially if you heed what this Self-Assessment can tell you about what you already know and what you need to learn

Put Yourself to the Test

The following series of questions and observations is designed to help you figure out how much work you’ll face in pursuing Solaris certification and what kinds of resources you may consult on your quest Be absolutely honest in your answers, or you’ll end up wasting money on exams you’re not ready to take There are no right or wrong answers, only steps along the path to certification Only you can decide where you really belong in the broad spectrum of aspiring candidates

Two things should be clear from the outset, however:

· Even a modest background in computer science will be helpful

· Hands-on experience with Solaris operating system and technologies is an essential ingredient

to certification success

Educational Background

1 Have you ever taken any computer-related classes? [Yes or No]

If yes, proceed to Question 2; if no, proceed to Question 4

2 Have you taken any classes on the Unix operating system? [Yes or No]

If yes, you will probably be able to handle the discussions that relate to the Solaris

operating system and system administration If you’re rusty, brush up on the basic Unix

Trang 16

strongly recommend a good Solaris system administration book such as A Practical Guide

to Solaris by Mark Sobell (1999) Or, if this title doesn’t appeal to you, check out reviews

for other, similar titles at your favorite online bookstore However, don’t expect a long list Solaris 8 is still new in terms of available titles

3 Have you taken any networking concepts or technologies classes? [Yes or No]

If yes, you will probably be able to handle the networking terminology, concepts, and technologies (but brace yourself for frequent departures from normal usage) If you’re rusty, brush up on basic networking concepts and terminology If your answer is no, you might want to check out some titles on the Transport Communication Protocol/Internet Protocol (TCP/IP)

4 Have you done any reading on Unix or networks? [Yes or No]

If yes, review the requirements from Questions 2 and 3 If you meet those, move to the next section, “Hands-On Experience.” If you answered no, consult the recommended reading for both topics This kind of strong background will be of great help in preparing you for the Solaris exams

Hands-On Experience

Another important key to success on all of the Solaris tests is hands-on experience If I leave you with only one realization after taking this Self-Assessment, it should be that there’s no substitute for time spent installing, configuring, and using the various Solaris command and tools upon which you’ll be tested repeatedly and in depth

5 Have you installed, configured, and worked with Solaris 8? [Yes or No]

o If yes, make sure you understand basic concepts as covered in Exam 310-011

If you haven’t worked with Solaris 8, you must obtain a copy of it for either SPARC or Intel x86 compatible platforms Then, learn about the installation and administration

Trang 17

Tip

If you have the funds or your employer will pay your way, consider taking a class at a Sun training and education center

Testing Your Exam-Readiness

Whether you attend a formal class on a specific topic to get ready for an exam or use written materials to study on your own, some preparation for the Solaris certification exams is essential At

$150 a try, pass or fail, you want to do everything you can to pass on your first try That’s where studying comes in

I have included in this book several practice exam questions for each chapter and a sample test,

so if you don’t score well on the chapter questions, you can study more and then tackle the sample tests at the end of each part If you don’t earn a score of at least 66 percent on the Part I test and

70 percent on the Part II test, you’ll want to investigate the other practice test resources available via the Web (locate them using your favorite search engine)

For any given subject, consider taking a class if you’ve tackled self-study materials, taken the test, and failed anyway If you can afford the privilege, the opportunity to interact with an instructor and fellow students can make all the difference in the world For information about Sun classes, visit

the Certification Program page at http://suned.sun.com

If you can’t afford to take a class, visit the Certification Program page anyway, because it also includes free sample questions Even if you can’t afford to spend much at all, you should still invest

in some low-cost practice exams from commercial vendors, because they can help you assess

your readiness to pass a test better than any other tool Check with the www.unixcert.net Web

site for other available resources

6 Have you taken a practice exam on your chosen test subject? [Yes or No]

If yes—and you scored 66 percent or better on Part I and 70 percent or better on Part II—you’re probably ready to tackle the real thing If your score isn’t above that crucial threshold, keep at it until you break that barrier If you answered no, obtain all the free and low-budget practice tests you can find (or afford) and get to work Keep at it until you can comfortably break the passing threshold

Trang 18

Assessing Your Readiness for Exams 310-011 and 310-012

In addition to the general exam-readiness information in the previous section, other resources are available to help you prepare for the exams Two Web sites come to mind These are

www.solarisguide.com and www.solariscentral.org Also the comp newsgroups

comp.unix.solaris and comp.sys.sun.admin available via news services or via google.com

Groups at groups.google.com are good These are great places to ask questions about topics

you are having trouble understanding and get good answers, or simply to observe the questions that others ask (along with the answers, of course) The Sun Blueprints Programs at

www.sun.com/blueprints provide in-depth articles on various Solaris topics

I’d also like to recommend that you check out one or more of these books as you prepare to take the exam:

· Mulligan, John P Solaris 8 Essential Reference New Riders, 2001

· Sun Microsystems The three volume System Administration Guide for Solaris 8 (Sun Micro

Systems, 2000)

One last note: Hopefully, it makes sense to stress the importance of hands-on experience in the context of the exams As you review the material for the exams, you’ll realize that hands-on experience with Solaris 8 commands, tools, and utilities is invaluable

Onward, through the Fog!

Once you’ve assessed your readiness, undertaken the right background studies, obtained the hands-on experience that will help you understand the products and technologies at work, and reviewed the many sources of information to help you prepare for a test, you’ll be ready to take a round of practice tests When your scores come back positive enough to get you through the exam, you’re ready to go after the real thing If you follow my assessment regime, you’ll not only know what you need to study, but when you’re ready to make a test date at Sylvan Good luck!

Trang 19

Part I: Exam 310-011

Chapter 1: Solaris 8 Certification Exams

Chapter 2: System Concepts

Chapter 3: Installing and Maintaining Solaris 8

Chapter 4: Booting and Shutting Down the System

Chapter 5: System Security and File Permissions

Chapter 6: The User Environment

Chapter 7: Controlling Processes

Chapter 8: Disk Administration

Chapter 9: File System Administration

Chapter 10: System Basics

Chapter 11: Sample Test I

Chapter 12: Answer Key 1

Trang 20

Chapter 1: Solaris 8 Certification Exams

Terms you’ll need to understand:

· Multiple-choice question formats

· Radio button

· Checkbox

· Exhibit

· Drag and drop

· Fill in the blank (free choice)

· Careful reading

· Process of elimination

Techniques you’ll need to master:

· Assessing your exam-readiness

· Preparing to take a certification exam

· Practicing (to make perfect)

· Making the best use of the testing software

· Budgeting your time

· Saving the hardest questions until last

· Guessing (as a last resort)

As experiences go, test-taking is not something that most people anticipate eagerly, no matter how well they’re prepared In most cases, familiarity helps ameliorate test anxiety In plain English, this means that you probably won’t be as nervous when you take your fourth or fifth certification exam as you will be when you take your first one

Whether it’s your first test or your tenth, understanding the exam-taking particulars (how much time to spend on questions, the setting you’ll be in, and so on) and the testing software will help you concentrate on the material rather than on the environment Likewise, mastering a few basic test-taking skills should help you recognize—and perhaps even outfox—some of the tricks and gotchas you’re bound to find in some of the test questions

In this chapter, I’ll explain the testing environment and software, as well as describe some proven test-taking strategies that you should be able to use to your advantage

Assessing Exam-Readiness

Trang 21

Before you take any Solaris exam, I strongly recommend that you read through and take the Self-Assessment included with this book (it appears just before this chapter) This will help you compare your knowledge base to the requirements for obtaining the Solaris 8 System

Administrator certification and will help you identify parts of your background or experience that might be in need of improvement, enhancement, or further learning If you get the right set of basics under your belt, obtaining Solaris certification will be that much easier

Once you’ve gone through the Self-Assessment, you can remedy those topical areas where your background or experience might not measure up to that of an ideal certification candidate But you can also tackle subject matter for individual tests at the same time, so you can continue making progress while you’re catching up in some areas

Once you’ve worked through this Exam Cram, have read the supplementary materials, and have

taken the practice tests in Chapters 11 and 22, you’ll have a pretty clear idea of when you should

be ready to take the real exam Although I strongly recommend that you keep practicing until your scores top the 66 percent mark on Part I and the 70 percent mark on Part II, 71 and 75 percent, respectively, would be a good goal to give yourself some margin for error in a real exam situation (where stress will play more of a role than when you practice) Once you hit that point, you should

be ready to go But if you get through the practice exam in this book without attaining that score, you should keep taking practice tests and studying the materials until you get there You’ll find more information about other practice test vendors in the Self-Assessment along with even more pointers on how to study and prepare But now, on to the exam itself!

The Test Objectives

The test objectives for both exams are posted on Sun’s Web site at

http://suned.sun.com/US/certification/solaris/sysadmin.html Tables 1.1 and 1.2 provide a

quick chapter to test objective cross-reference

Table 1.1: Chapter to Exam 310-011 (Part I) Test Objectives

9 File Systems Files and Directories, Backup, and

Trang 22

Table 1.1: Chapter to Exam 310-011 (Part I) Test Objectives

Recovery

10 Basic Command Syntax, Editor, Remote Connection

Table 1.2: Chapter to Exam 310-012 (Part II) Test Objectives

13 Client Server Relationship and Solaris Network

Environment

16 Solaris Pseudo File Systems and Swap Space

17 Role-Based Access Control (RBAC)

20 Solaris Management Console and Solstice

AdminSuite

21 JumpStart — Automatic Installation

The Testing Situation

When you arrive at the Sylvan Prometric Testing Center where you scheduled your test, you’ll need to sign in with a test coordinator He or she will ask you to produce two forms of identification, one of which must be a photo ID Once you’ve signed in and your time slot arrives, you’ll be asked leave any books, bags, or other items you brought with you, and you’ll be escorted into a closed room Typically, that room will be furnished with anywhere from one to half a dozen computers, and each workstation will be separated from the others by dividers designed to keep you from seeing what’s happening on someone else’s computer

You’ll be furnished with a pen or pencil and a blank sheet of paper or, in some cases, an erasable plastic sheet and an erasable felt-tip pen You’re allowed to write down any information you want

on this sheet, and you can write stuff on both sides of the page I suggest that you memorize as much as possible of the material that appears on the Cram Sheet (inside the front of this book) and then write that information down on the blank sheet as soon as you sit down in front of the test machine You can refer to the sheet any time you like during the test, but you’ll have to surrender it when you leave the room

Trang 23

Most test rooms feature a wall with a large window This allows the test coordinator to monitor the room, to prevent test-takers from talking to one another, and to observe anything out of the ordinary that might be going on The test coordinator will have preloaded the Solaris certification exam that you’ve signed up for, and you’ll be permitted to start as soon as you’re seated in front of the machine

Each Solaris certification exam permits you to take up to 90 minutes to complete the test (the test itself will tell you, and it maintains an on-screen counter/clock so that you can check the time remaining whenever you like) Part I consists of 57 questions and Part II consists of 61 questions, randomly selected from a pool of questions

Tip

The passing score varies per exam For Exam 310-011, the passing score is 66 percent, and for Exam 310-012, the passing score is 70 percent

All Solaris certification exams are computer - generated and use a multiple-choice, drag-and-drop

or fill-in-the-blank format Although this might sound easy, the questions are constructed not just to check your mastery of basic Solaris system administration, but also require you to evaluate one or more sets of circumstances or requirements Often, you’ll be asked to give more than one answer

to a question; likewise, you might be asked to select the best or most effective solution to a problem from a range of choices, all of which technically are correct The tests are quite an adventure, and they involve real thinking This book will show you what to expect and how to deal with the problems, puzzles, and predicaments that you’re likely to find on the exams

Test Layout and Design

A typical test question is depicted in Question 1 It’s a multiple-choice question that requires you to select a single correct answer Following the question is a brief summary of each potential answer and why it was either right or wrong

Trang 24

programs phase locates and loads boot programs, and then the kernel initialization phase loads the kernel Therefore, answers d and e are incorrect Only then can the init phase occur to initialize the operating system services

This sample question corresponds closely to those you’ll see on Solaris certification exams To select the correct answer during the test, you would position the cursor over the radio button next

to answer a and click the mouse to select that particular choice The only difference between the questions on the certification exams and questions such as this one is that the real questions are not immediately followed by the answers

The following is a question for which one or more answers are possible This type of question provides checkboxes rather than radio buttons for marking all the appropriate selections

Answers a and d are correct Answers b and c do not exist

For this type of question, one or more answers must be selected to answer the question correctly For Question 2, you would have to position the cursor over the checkboxes next to items a and d and click on both to obtain credit for a correct answer

These two types of questions can appear in many forms and constitute the foundation on which most of the Solaris certification exam questions rest More complex questions might include so-called exhibits, which are usually tables or data-content layouts of one form or another You ’ll

be expected to use the information displayed in the exhibit to guide your answer to the question Other questions involving exhibits might use charts or diagrams to help document a workplace scenario that you’ll be asked to troubleshoot or configure Paying careful attention to such exhibits

is the key to success—be prepared to toggle between the picture and the question as you work Often, both are complex enough that you might not be able to remember all of either one

The drag-and-drop questions are new to the Solaris exams They provide a table consisting of two columns of data, such as technical terms and their definitions All of the terms have to be

positioned (using the mouse) in front of their respective definition to be correct To drag a term, position the mouse over the term and depress the left mouse button Then move the mouse to

Trang 25

drag the term to the appropriate location Release the mouse button to drop the term in front of its definition

The remaining questions are fill in the blank This involves entering the name of a command, file name, command-line argument, or Solaris-related terminology A typical fill-in-the-blank question

is shown in Question 3 This question provides a box in which to enter the answer

Question 3

Enter the full pathname to the file used to modify the configuration of the kernel

The correct answer is /etc/system

Be sure to read this type of question very carefully Without having any answers in front of you, there is nothing to jog your memory and it makes guessing almost impossible Because this

question specifically asked for the full pathname, an answer such as system, which might be

considered technically correct, will be marked as wrong Try to be as specific as possible

Using the Test Software Effectively

A well-known test-taking principle is to read over the entire test from start to finish first, but to answer only those questions that you feel absolutely sure of on the first pass On subsequent passes, you can dive into more complex questions, knowing how many such questions you have

to deal with

Fortunately, the test software makes this approach easy to implement At the bottom of each question, you’ll find a checkbox that permits you to mark that question for a later visit (Note that marking questions makes review easier, but you can return to any question by clicking the

Forward and Back buttons repeatedly until you get to the question.) As you read each question, if you answer only those you’re sure of and mark for review those that you’re not, you can keep going through a decreasing list of open questions as you knock the trickier ones off in order Tip

There’s at least one potential benefit to reading the test over completely before answering the trickier questions: Sometimes, you find information in later questions that sheds more light on earlier ones Other times, information you read in later questions might jog your memory about facts, figures, or behavior that also will help with earlier questions Either way, you’ll come out ahead if you defer those questions about which you’re not absolutely sure of the answer(s) Keep working on the questions until you’re absolutely sure of all your answers or until you know you’ll run out of time If unanswered questions remain, you’ll want to zip through them and guess

Trang 26

No answer guarantees that no credit will be given for a question, and a guess has at least a chance of being correct (Blank answers and incorrect answers are scored as equally wrong.) Tip

At the very end of your test period, you’re better off guessing than leaving questions blank or unanswered

Taking Testing Seriously

The most important advice I can give you about taking any test is this: Read each question

carefully Some questions are deliberately ambiguous, some use double negatives, and others use terminology in incredibly precise ways I’ve taken numerous practice tests and real tests myself, and in nearly every test I’ve missed at least one question because I didn’t read it closely or carefully enough

Here are some suggestions on how to deal with the tendency to jump to an answer too quickly:

· Make sure you read every word in the question If you find yourself jumping ahead

impatiently, go back and start over

· As you read, try to restate the question in your own terms If you can do this, you should be able to pick the correct answer(s) much more easily

· When returning to a question after your initial read-through, reread every word

again—otherwise, your mind can fall quickly into a rut Sometimes, seeing a question afresh after turning your attention elsewhere lets you see something that you missed, but the strong tendency is to see what you’ve seen before Try to avoid that tendency at all costs

· If you return to a question more than twice, try to articulate to yourself what you don’t

understand about the question, why the answers don’t appear to make sense, or what appears

to be missing If you chew on the subject for a while, your subconscious might provide the details that are lacking or you might notice a “trick” that will point to the right answer

Above all, try to deal with each question by thinking through what you know about being a Solaris system administrator—commands, characteristics, behaviors, facts, and figures involved By reviewing what you know (and what you’ve written down on your information sheet), you’ll often recall or understand things sufficiently to determine the answer to the question

Question-Handling Strategies

Based on the tests I’ve taken, a couple of interesting trends in the answers have become apparent For those questions that take only a single answer, usually two or three of the answers will be obviously incorrect, and two of the answers will be plausible But, of course, only one can be correct Unless the answer leaps out at you (and if it does, reread the question to look for a trick;

Trang 27

sometimes those are the ones you’re most likely to get wrong), begin the process of answering by eliminating those answers that are obviously wrong

Things to look for in the “obviously wrong” category include spurious command choices or file names, nonexistent software or command options, and terminology that you’ve never seen before

If you’ve done your homework for a test, no valid information should be completely new to you In that case, unfamiliar or bizarre terminology probably indicates a totally bogus answer As long as you’re sure what’s right, it’s easy to eliminate what’s wrong

Numerous questions assume that the default behavior of a particular Solaris command is in effect It’s essential to know and understand the default settings for the various commands If you know the defaults and understand what they mean, this knowledge will help you cut through many Gordian knots

Likewise, when dealing with questions that require multiple answers, you must know and select all the correct options to get credit This, too, qualifies as an example of why careful reading is so important

As you work your way through the test, another counter that the exam provides will come in handy: the number of questions completed and questions outstanding Budget your time by making sure that you’ve completed one-fourth of the questions one-quarter of the way through the test period Check again three-quarters of the way through For Exam 310-011 with 57 questions and Exam 310-012 with 61 questions, that’s about 20 questions after 30 minutes and 40 questions after 60 minutes (30 minutes remaining)

If you’re not through after 80 minutes, use the last 10 minutes to guess your way through the remaining questions Remember, guesses are potentially more valuable than blank answers because blanks are always wrong, but a guess might turn out to be right If you haven’t a clue

about any of the remaining questions, pick answers at random or choose all as, bs, and so on The

important thing is to submit a test for scoring that has an answer for every question

Mastering the Inner Game

In the final analysis, knowledge breeds confidence, and confidence breeds success If you study the materials in this book carefully and review all the questions at the end of each chapter, you should be aware of those areas where additional studying is required

Next, follow up by reading some or all of the materials recommended in the “Need to Know More?” section at the end of each chapter The idea is to become familiar enough with the concepts and situations that you find in the sample questions to be able to reason your way through similar situations on a real test If you know the material, you have every right to be confident that you can pass the test

Trang 28

Once you’ve worked your way through Part I, take the practice test in Chapter 11 Likewise, after studying Part II, take the practice test in Chapter 22 The tests will provide a reality check and help you identify areas that you need to study further Make sure that you follow up and review

materials related to the questions you miss before scheduling the real tests Only when you ’ve covered all the ground and feel comfortable with the whole scope of the practice tests should you take the real tests

Tip

If you take the practice test in Chapter 11 and don’t score at least 66 percent correct or don’t score at least 70 percent on the practice test in Chapter 22, you’ll want to practice further Armed with the information in this book and with the determination to augment your knowledge, you should be able to pass the certification exam But if you don’t work at it, you’ll spend the test fee more than once before you finally do pass If you prepare seriously, the exam should go flawlessly Good luck!

Additional Resources

By far, the best source of information about Solaris certification exams comes from Sun itself Because its products and technologies—and the tests that go with them—change frequently, the best place to go for exam-related information is online

If you haven’t already visited the Solaris certification pages, do so right now As I ’m writing this chapter, the certification home page resides at

http://suned.sun.com/US/certification/solaris/sysadmin.html

Note

It might not be there by the time you read this, or it might have been replaced by something new and different, because things change regularly on the Sun site Should this happen, please read the section titled “Coping with Change on the Web” later in this chapter

This Web page will point to additional information in the certification pages Here’s what to check out:

· Overview—An overview of the certification process and exams

· Supporting Courseware—Classroom courses and self-paced computer-based training offered

by Sun that cover the information listed in the exam objectives

· Exam Objectives—A detailed list of the topics that will be covered on the exams

· Sample Questions—A limited number of sample questions and answers

· Registration—Information on purchasing a Sun voucher and registering with Sylvan

Prometric to schedule the exams

· FAQs—Frequently Asked Questions; yours might get answered here

Trang 29

As you browse through them—and I strongly recommend that you do—you’ll probably find other things that I didn’t mention here that are every bit as interesting and compelling

Coping with Change on the Web

Sooner or later, all the specifics I’ve shared with you about the Solaris certification pages, and all the other Web-based resources I mention throughout the rest of this book, will go stale or be replaced by newer information In some cases, the URLs that you find here might lead you to their replacements; in other cases, the URLs will go nowhere, leaving you with the dreaded “404 File not found” error message

When that happens, please don’t give up There’s always a way to find what you want on the Web—if you’re willing to invest some time and energy To begin with, most large or complex Web sites—and Sun’s qualifies on both counts—offer a search engine As long as you can get to Sun’s

home page (and I’m sure that it will stay at www.sun.com for a long while yet), you can use this

tool to help you find what you need

The more focused you can make a search request, the more likely it is that the results will include information you can use For example, you can search for the string “training and certification” to produce a lot of data about the subject in general, but if you’re looking for the details on the Sun Certified System Administrator tests, you’ll be more likely to get there quickly if you use a search string such as this:

"Administrator" AND "certification"

Likewise, if you want to find the training and certification downloads, try a search string such as this:

"training and certification" AND "download page"

Finally, don’t be afraid to use general search tools such as www.search.com,

www.altavista.com, or www.excite.com to search for related information Even though Sun

offers information about its certification exams online, there are plenty of third-party sources of information, training, and assistance in this area that do not have to follow a party line like Sun does The bottom line is this: If you can’t find something where the book says it lives, start looking around If worse comes to worse, you can always email me! I just might have a clue My email

address is solaris@unixcert.net

Trang 30

Chapter 2: System Concepts

Terms you’ll need to understand:

· Kernel

· Shell

· File system

· Daemon

· The Solaris 8 Reference Manual

Techniques you’ll need to master:

· Distinguishing between the parts of the operating system

· Distinguishing between the three shells

· Using the man command to view online manual pages

This chapter covers some basic concepts of the Solaris 8 operating system The first section briefly summarizes the new features of Solaris 8 The second section addresses the structure and components of the operating system The next section summarizes the three shells, and the last

section provides an overview of the online reference manual This chapter covers the System Concepts test objectives

New Features of Solaris 8

The following enhancements have been added to the latest release of Solaris:

· Internet Protocol version 6 (IPv6)—The next generation of IP, which overcomes many of the

limitations associated with the current version of IP (version 4) The main advantages are a larger address space and the autoconfiguration of addresses In Solaris 8, the network

interfaces can be configured simultaneously for both IPv4 and IPv6

· Java 2 Software Development Kit (SDK)—The latest version of the Java SDK makes Solaris a

powerful platform for machine-independent software development

· Universal Disk Format (UDF) file system—Allows easy interchange of data stored on

CD-ROMs, DVDs, hard disks, and diskettes

· Graphical wizards—A couple new graphical wizards have been added to improve system

usability Most notable are the Installation Wizard and the DCHP Manager In addition, the X Server that supports X applications has been upgraded to the X11R6.4 industry standard

Trang 31

The Three Parts of the Operating System

Solaris 8, like all variations of the Unix operating system, consists of three parts: the kernel, the shell, and the file system Each of these will be discussed in the next few sections

The Kernel

The kernel is a collection of software that manages the physical and logical resources of the

computer These management services include controlling the allocation of memory and other storage devices, controlling access to peripheral devices (input/output), and controlling the

scheduling and execution of processes or tasks For the most part, these services are transparent

to the user The user issues a request to perform a task, and the kernel deals with the complexity

of the underlying hardware and allocating logical resources to accomplish the task

The physical resources are controlled by means of software modules, referred to as device drivers,

which understand how to communicate with hardware devices and control their operation

Typically, each device has a unique driver that is provided with the hardware and is identified by hardware manufacturer, model, and sometimes hardware version

The logical resources include processes and memory A process is a task or program The kernel

maintains internal data structures that define and control the processes; it also controls the

scheduling, execution, and termination of processes Other important kernel services are memory management and interprocess communication Memory management involves keeping track of available memory, allocating it to processes as needed, and reclaiming it as processes release it

or terminate Interprocess communication involves handling the cooperative communication between processes

The Solaris 8 kernel supports multiple users, each of which can be executing one or more

processes or tasks Thus, Solaris 8 is both a multiuser and a multitasking system The Solaris 8

kernel accomplishes this level of support by allowing a task to have access to system resources for a small slice of time A task is allowed to execute for one or more time slices and then is suspended to allow another task to execute This approach provides time-sharing among all active tasks and gives the appearance that all tasks are running simultaneously A task that appears to

be executing all the time (and typically provides a service on demand) is referred to as a daemon

The Shell

The shell is a software module that provides the interface between users and the kernel It accepts

user requests and submits them to the kernel It also accepts status information and data from the

Trang 32

network connection; however, input can be taken from a file, a device, or even another process In addition, output from the kernel is typically sent to the user’s terminal or network connection Likewise, this output can be redirected to a file, a device, or another process

The shell also provides a built-in programming language that can be used to automate repetitive tasks This automation includes flow control along with the ability to manipulate numeric and string data

Solaris 8 provides several different shells, each with unique strengths Some shells provide a history/recall mechanism that allows the user to reexecute a previous command by entering a few control sequences instead of reentering the command Other shells provide built-in math

manipulation

The File System

A file is a group of bytes treated as a unit for storage, retrieval, and manipulation The file system is

a collection of files stored on a disk drive in a hierarchical structure A special type of file, called a

directory, serves as a folder and is used to organize files A file system can be thought of as an

inverted tree, with the directories being the branches and the files being the leaves The name for

the top-level directory of a Unix system, root, comes from this analogy

The Unix operating system supports the file system concept by providing utilities to create, mount (make accessible), check, repair, duplicate, and back up file systems The storage space that is accessible on a Unix system usually is divided into multiple file systems This division allows easier maintenance and improves performance

The Three Most Common Shells

The Solaris 8 environment provides several shells The three most common shells are the Bourne shell (sh), the C shell (csh), and the Korn shell (ksh)

The Bourne shell was developed by Steven Bourne at AT&T Bell Laboratories and was the shell provided with the original Unix operating system The Unix operating system was designed and developed by Ken Thompson and Dennis Ritchie at Bell Labs during the 1970s The most popular version was Unix System V

Exam Alert

The Bourne shell is the default shell for the Solaris 8 operating system

The C shell was developed by Bill Joy of the University of California, Berkeley and was provided with a version of the Unix operating system that was developed at the university and referred to as Berkeley Software Distribution (BSD) Unix

Trang 33

The Korn shell was designed and developed by David G Korn at AT&T Bell Laboratories The Korn shell was derived from the Bourne shell by adding many features from the C shell along with new features of its own Table 2.1 compares the features of the three shells

Table 2.1: Features of Solaris 8 shells

Aliasing No Yes Yes Lets you assign a short, simple

name to a complex string and then

to use the name in place of the string in commands Doing so gives the appearance of being able to add custom commands to the shell

Bourne shell–

compatible

syntax

Yes No Yes Because the Korn shell is an

enhanced version of the Bourne shell, they use the same syntax The C shell was developed separately, and its syntax is based on the C programming language

Default prompt $ % $ The default prompt for both the

Bourne and the Korn shells is the dollar sign ($) character, whereas the default prompt for the C shell is the system hostname followed by the percent (%) character

History

capability

No Yes Yes The history capability of the C

and the Korn shells keeps track

of a user-defined number of previous commands Instead of reentering a command, you can copy it from the history and then execute it

No ! n fc Repeats the previous command

with few keystrokes For csh, n

is the number of the command in the history list

Trang 34

Table 2.1: Features of Solaris 8 shells

Initialization

file: login

.profile login profile Stores commands that should be

executed once, when a user logs

initialization file using the

ENV parameter

Inline editing No No Yes Allows you to edit a command that

has been entered but not yet executed Thus, you can correct typographical errors rather than retyping the entire command Either emacs or vi editing commands can be used when you’re correcting errors Logout file No logout No Stores commands that should be

executed when a user logs out Overwrite

protect

No Yes Yes Prevents files from being

accidentally overwritten; can

be set by using the noclobber

parameter

Repeat last

command

No !! No Handy shortcut for reexecuting

the last command with only a few keystrokes

Restricted

version

rsh No rksh Intended for users who need only

limited access to the Unix system Provides enhanced security by confining the user

to a single directory and preventing the redirection of shell output Be sure not to confuse the restricted Bourne

Trang 35

Table 2.1: Features of Solaris 8 shells

shell (/usr/lib/rsh) with the remote shell (/usr/bin/rsh), which is used to execute commands on a remote system The restricted version of the Korn shell is /usr/bin/rksh

Source AT&T Berkeley AT&T Both the Bourne and Korn shells

originated at AT&T Bell Labs, whereas the C shell came from the University of California at Berkeley

Exam Alert

Use of the initialization files for each shell is an important concept that is useful when you’re setting up user accounts on a Solaris 8 system Be sure that you understand their usage and associate the file names correctly with the appropriate shells

The Online Reference Manual

The Solaris 8 Reference Manual (in printed form) is a multivolume set of manuals that document

the commands, system calls, library functions, special files, and so on, that are available with the Solaris 8 operating system This format originated with the initial version of the Unix operating

system developed by AT&T Bell Labs and has been adopted as the definitive documentation for

almost every version of the Unix operating system available

For convenience, an online version of the Reference Manual is provided with the Solaris 8 system and most other versions of the Unix operating system The pages or topics of the online Reference

Manual can be viewed on the terminal/monitor screen using the man(1) command The Reference

Manual is also included in the Solaris 8 AnswerBook2 online documentation, which lets you search, display, and print Reference Manual pages using an HTML Web browser such as

Netscape Navigator The pages of the Reference Manual are referred to as man pages

The Reference Manual is divided into sections Each section addresses a related set of

commands or different aspects of the operating system Table 2.2 describes the Reference Manual sections

Table 2.2: Sections of the Solaris 8 Reference Manual

Section Description

Trang 36

Table 2.2: Sections of the Solaris 8 Reference Manual

Section Description

1 Commands available to all users Included are commands that are part

of the BSD Compatibility Package (1B), commands used to communicate between systems (1C), commands associated with the Form and Menu Language Interpreter (1F), and commands specific the SunOS system (1S)

1M Commands used for system maintenance and administration Some are

restricted to system administration login accounts (such as root)

2 Low-level operating system calls that can be used by C language

programs to access and control system resources

3 Functions available in system libraries that can be used by C

language programs to access and control system resources This section is subdivided based on library function (basic, networking, threads, curses, and so on)

4 Format of various system configuration files Also included are

descriptions of the C language data structure declarations that can

be used to access some system files via a C language program

5 Miscellaneous topics such as standards, environments, and macros

6 Any available games or demos

7 Special files associated with specific hardware, device drivers,

and components of the STREAMS I/O subsystem

9 Two kernel-level device drive specifications: the Device Driver

Interface (DDI) and the Driver/Kernel Interface (DKI) This section

is subdivided based on topic (entry points, functions, data structures, and so on)

Note that Section 8 is not used In the original AT&T Unix System V operating system, Section 8 was used to describe special system maintenance procedures For Solaris, these procedures are

described in the System Administration Guide and other guides and manuals

Typically, each section of the Reference Manual is printed as a separate volume When a man

page is referenced in text, the section number may be specified in parentheses after the name of the command This number may not be important in the online manuals, but if you are trying to locate a manual page within a stack of printed manuals more than a foot high, knowing the section

number (that is, which volume) saves a lot of time and effort Thus, man(1) indicates that the man

command is located in Section 1: “User Commands.”

Trang 37

Using the man Command

Even though both the printed Reference Manual and AnswerBook2 are available, the test

objectives for Part I include using the online man pages as a requirement The man(1) command

is used to display one or more man pages specified as command-line arguments Table 2.3 lists

the command-line arguments available with the man command

Table 2.3: Command-line arguments for the man command

name The name of a Solaris command, file, and so on, that

is described by a man page of the same name At least one name is required by all arguments except the -f,

-k, and -M arguments More than one name (separated

by spaces) can be specified

- Don’t automatically send output through the more(1)

command (which provides pagination, underlining, and

so on)

-a Display all man pages that match the specified name

(regardless of section)

-d Display debug information (search methods used,

sections searched, and so on) used to locate the name

man page

(requires pre-formatted man pages) More than one file

can be specified (separated by spaces) Note that this argument is used to locate a file referenced in the man page, not a man page (therefore, it does not require a man page name argument)

-F Force a search of all man sections for name instead

of using the windex database to locate man pages (windex is associated with preformatted man pages)

contain the specified keyword (preformatted man pages only) More than one keyword can be specified (separated by spaces) Note that this argument is used

to locate keywords in a database, not a man page (therefore, it does not require a man page name

argument)

Trang 38

Table 2.3: Command-line arguments for the man command

-l List all man pages that match the specified name

(regardless of section)

-M path Specify an alternate directory path for man page

files This argument can be used with any of the other arguments

-r Reformats the specified name man page Instead of

being displayed, the output is captured in a file for

use by subsequent man commands

(separated by spaces)

-t Typeset the specified name man page using troff(1)

If -t is used with the - argument, the output is not displayed, but instead is captured in a file for

subsequent use by the man command

the standard man page (-man) macro package

The following example shows how you can use the man command to display the man(1) man page Note that man pages longer than one screen in length use the more(1) command to display

one screen of the man page at a time:

# man man

Reformatting Page Please wait… Done

User Commands man(1)

man [ -M path ] -k keyword …

man [ -M path ] -f file …

DESCRIPTION

The man command displays information from the reference

manuals It displays complete manual pages that you select

Trang 39

by name, or one-line summaries selected either by keyword

(-k), or by the name of an associated file (-f) If no

manual page is located, man prints an error message

Source Format

Reference Manual pages are marked up with either nroff(1)

or sgml(5) (Standard Generalized Markup Language) tags

The man command recognizes the type of markup and processes

the file accordingly The various source files are kept in

separate directories depending on the type of markup

Location of Manual Pages

The online Reference Manual page directories are convention-

ally located in /usr/share/man The nroff sources are

located in the /usr/share/man/man* directories The SGML

sources are located in the /usr/share/man/sman* directories

Each directory corresponds to a section of the manual Since

The passwd topic shows the different man command-line arguments, because passwd(1) is a

command and passwd(4) is a system file The following example lists all man pages named

Note that both man pages are listed In addition, an appropriate -M command-line argument is

displayed to show the location of the man pages The default path name for man pages is

/usr/share/man

The following example displays the passwd(1) man page:

# man passwd

Reformatting Page Please wait… Done

User Commands passwd(1)

NAME

passwd - change login password and password attributes

Trang 40

passwd [ -r files ] -s [ name ]

passwd [ -r files ] [ -d | -l ] [ -f ] [ -n min ]

[ -w warn ] [ -x max ] name

passwd -r ldap [ -egh ] [ name ]

passwd -r nis [ -egh ] [ name ]

passwd -r nisplus [ -egh ] [ -D domainname ] [ name ]

passwd -r nisplus -s [ -a ]

passwd -r nisplus [ -D domainname ] -s [ name ]

passwd -r nisplus [ -l ] [ -f ] [ -n min ] [ -w warn ]

[ -x max ] [ -D domainname ] name

Note that man -s 1 passwd would have provided the same result In the absence of a specified

section, the man pages are searched by section and the first one found is printed To display the

passwd(4) man page, you must specify the section as in the following example:

# man -s 4 passwd

Reformatting Page Please wait… Done

File Formats passwd(4)

NAME

Ngày đăng: 03/06/2014, 02:08

TỪ KHÓA LIÊN QUAN

w