Library of Congress Cataloging-in-Publication Data
Linux desk reference / by Scott Hawkins.-- 2nd.
1. Linux. 2. Operating systems (Computers) I. Title.
QA76.76.O63 H386 2001
Cover design director:
Series interior design and composition:
Alexis R. Heydt
© 2002 by Prentice Hall PTR
Upper Saddle River, New Jersey 07458
Prentice Hall books are widely used by corporations and government agencies for training, marketing, and resale.
The publisher offers discounts on this book when ordered in bulk quantities. For more information, contact Corporate Sales Department, Phone: 800-382-3419; FAX: 201-236-7141; E-mail: firstname.lastname@example.org
Or write: Prentice Hall PTR, Corporate Sales Dept., One Lake Street, Upper Saddle River, NJ 07458.
All product names mentioned herein are the trademarks or registered trademarks of their respective owners.
All rights reserved. No part of this book may be reproduced, in any form or by any means, without permission in writing from the publisher.
Printed in the United States of America
10 9 8 7 6 5 4 3 2 1
Pearson Education LTD.
Pearson Education Australia PTY, Limited
Pearson Education Singapore, Pte. Ltd.
Pearson Education North Asia Ltd.
Pearson Education Canada, Ltd.
Pearson Educación de Mexico, S.A. de C.V.
Pearson Education Malaysia, Pte. Ltd.
Pearson Education, Upper Saddle River, New Jersey
I would like to dedicate this book to my grandmothers, Emma Louise Hawkins and Viola Knoll
First and foremost, let me thank my illustrator, Shannea Maggio, who turned my more or less illegible ball-point napkin sketches into human readable drawings and later married me. My editor, Mark Taub, came up with the original idea for the book and has been relentlessly supportive throughout the first and second editions. My former editor, Miles Williams, was an invaluable consultant during the first edition. My production editor, Laura Burgess, and my compositor, Gail Cocker-Bogusz, displayed technical fortitude nearly unheard of in English majors, wading through 600+ pages of dense techno-babble to turn out a beautifully formatted final product. My reviewer, Zonker Brockmeier, provided excellent feedback and notes. Also, in no particular order, Robert Oakman, Manton Matthews, Jerahd Hollis, and Joe Morris have been invaluable references. Last but not least, let me mention my idiot dogs: Puppy Dog, the Mighty Bebos, Igor, Renfield, and (most recently) the nine nuggets, who served as footrests during the creation of this manuscript and (for the most part) refrained from doing terrible things to my reference books and network infrastructure.
I hope you get a lot of use out of this book. Since I first got started with Unix in 1986, I've spent a ton of cash buying reference books. I've always been a bibliophile, and computer books have the advantage of being tax deductible, so I've amassed quite a collection. It always annoys me when I get home and the glitzy, well-packaged, 400-page document-o-rama I just shelled out $50 for turns out to contain only 5 pages of actual information or, worse, to be full of information but so poorly organized that it's more trouble than it's worth to find what I need. I've got a shelf full of them, which I will sell cheap.
What I've tried to do here is incorporate the best features from my collection. I know what I like—a good index, thorough technical coverage, relevant examples, and concise explanations (in English). Also, in the process of writing this book I've become almost supernaturally attuned to the subject of computer reference books—you can whisper "Linux in a Nutshell" from 30 feet away across a crowded room and my ears will perk up like a retriever on point. The number one complaint I hear about reference books is "not enough examples." I'm not unsympathetic; thinking up, configuring, and testing all the examples for this book slowed the writing process down to a crawl. But, as my editor pointed out, I'm not doing this for my health. So you will find that for every command in this book there is an accompanying example.
To some extent, Linux commands tend to come in clusters. For example, there are a dozen or so that handle filesystems, another half dozen for fiddling with disks, a whole slew that do things with files, and so forth. Sometimes the command clusters follow a naming convention, as in the case of the "remote" commands (rlogin, rsh, etc.); other times they do not. It occurred to me that it wouldn't be entirely wrong to group the Linux commands into clusters (one for users, another for disks, etc.) and then treat the clusters as data structures. Technically, a data structure consists of two things:
· a specification for how data will be stored
· a specification of methods by which the data will be accessed
That's not a perfect description of how the chapters are arranged, but it isn't bad either. At the beginning of each chapter there is a high-level discussion of what purpose each "data structure" serves, how that service is accomplished, and the jargon that has sprung up around it. This provides background for the detailed description of commands that follows. Hopefully, this will provide enough information for newcomers to get started and perhaps be of some value for experienced users as well.
Of course, as you can tell from a quick glance through the contents, the main thrust of this book is information on actual user commands. I have collected what I believe to be a fairly thorough subset of the most useful Linux commands, together with their options and some suggestions for use. Information on configuration and use of the various subsystems (e.g., NIS, Samba, Networking) is also included, either explicitly or as part of the examples.