Beginning the Linux Command Line - Sander van Vugt.pdf
(
3042 KB
)
Pobierz
Beginning the
Linux Command Line
Sander van Vugt
Beginning the Linux Command Line
Copyright © 2009 by Sander van Vugt
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any information storage or retrieval
system, without the prior written permission of the copyright owner and the publisher.
ISBN-13 (pbk): 978-1-4302-1889-0
ISBN-13 (electronic): 978-1-4302-1890-6
Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1
Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence
of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark
owner, with no intention of infringement of the trademark.
Lead Editor: Michelle Lowman
Technical Reviewer: Mary Ann C. Tan
Editorial Board: Clay Andres, Steve Anglin, Mark Beckner, Ewan Buckingham, Tony Campbell,
Gary Cornell, Jonathan Gennick, Michelle Lowman, Matthew Moodie, Jeffrey Pepper,
Frank Pohlmann, Ben Renow-Clarke, Dominic Shakeshaft, Matt Wade, Tom Welsh
Project Manager: Beth Christmas
Copy Editor: Ami Knox
Associate Production Director: Kari Brooks-Copony
Production Editor: Elizabeth Berry
Compositor: Linda Weidemann, Wolf Creek Publishing Services
Proofreader: Nancy Sixsmith
Indexer: Brenda Miller, Odessa&Cie
Artist: April Milne
Cover Designer: Kurt Krames
Manufacturing Director: Tom Debolski
Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor,
New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail
, or
visit
.
For information on translations, please contact Apress directly at 2855 Telegraph Avenue, Suite 600,
Berkeley, CA 94705. Phone 510-549-5930, fax 510-549-5939, e-mail
, or visit
.
Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use.
eBook versions and licenses are also available for most titles. For more information, reference our Special
Bulk Sales–eBook Licensing web page at
.
The information in this book is distributed on an “as is” basis, without warranty. Although every pre-
caution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any
liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly
or indirectly by the information contained in this work.
Contents at a Glance
About the Author
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
About the Technical Reviewer
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Introduction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
CHAPTER 1
CHAPTER 2
CHAPTER 3
CHAPTER 4
CHAPTER 5
CHAPTER 6
CHAPTER 7
CHAPTER 8
CHAPTER 9
CHAPTER 10
CHAPTER 11
CHAPTER 12
CHAPTER 13
CHAPTER 14
APPENDIX
Starting Linux Command-Line Administration
. . . . . . . . . . . . . . . . . . . . . 1
Performing Essential Command-Line Tasks
. . . . . . . . . . . . . . . . . . . . . . 27
Administering the Linux File System
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Working with Text Files
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Managing Partitions and Logical Volumes
. . . . . . . . . . . . . . . . . . . . . . . 91
Managing Users and Groups
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Managing Permissions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Managing Software
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Process and System Management
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
System Logging
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Configuring the Network
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Configuring a File Server
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Working with the Kernel
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
Introduction to Bash Shell Scripting
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
Installing Linux
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
INDEX
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
iii
Contents
About the Author
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
About the Technical Reviewer
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Introduction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
CHAPTER 1
Starting Linux Command-Line Administration
. . . . . . . . . . . . . 1
Linux Distributions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Linux History
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Open Source
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
The First Distributions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Linux Turning Mainstream
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Logging In and Out
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Different Login Interfaces
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Working with a User Account
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Command-Line Basics
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
The Command Interpreter
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Commands, Options, and Arguments
. . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Piping and Redirection
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Piping
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Redirection
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Getting Help
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Using man to Get Help
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Using the --help Option
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Getting Information on Installed Packages
. . . . . . . . . . . . . . . . . . . . . 20
Working with the Shell
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Using the Shell to Best Effect
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Managing Bash with Key Sequences
. . . . . . . . . . . . . . . . . . . . . . . . . . 25
Summary
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
v
Plik z chomika:
jonedave3
Inne pliki z tego folderu:
B-29 Superfortress vs Ki-44 - Donald Nijboer.epub
(25672 KB)
B-17 Flying Fortress Units of t - William Hess.epub
(18102 KB)
B00XANZZ4A_EBOK_nodrm.azw3
(31349 KB)
B.R. Bhagwat - Mahabharata.azw3
(20673 KB)
B A Paris - Behind Closed Doors_nodrm.epub
(2167 KB)
Inne foldery tego chomika:
@other-lang
@packed
0
1
2-1
Zgłoś jeśli
naruszono regulamin