Fedora®Linux® TOOLBOX

Fedora®Linux® TOOLBOX

82911ffirs.qxd:Toolbox 10/19/07 12:41 PM Page iii Fedora®Linux® TOOLBOX 1000+ Commands for Fedora, CentOS, and Red Hat® Power Users Christopher Negus François Caen Wiley Publishing, Inc. 82911ffirs.qxd:Toolbox 10/19/07 12:41 PM Page iv Fedora® Linux® Toolbox: 1000+ Commands for Fedora, CentOS, and Red Hat® Power Users Published by Wiley Publishing, Inc. 10475 Crosspoint Boulevard Indianapolis, IN 46256 www.wiley.com Copyright © 2008 by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN: 978-0-470-08291-1 Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 Library of Congress Cataloging-in-Publication Data Negus, Chris, 1957– Fedora Linux toolbox : 1000+ commands for Fedora, Centos and Red Hat power users / Christopher Negus, François Caen. p. cm. Includes index. ISBN 978-0-470-08291-1 (pbk.) 1. Linux. 2. Operating systems (Computers) I. Caen, François. II. Title. QA76.76.O63N4185 2007 005.4'32—dc22 2007039391 No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permis- sion should be addressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, or online at http://www.wiley.com/go/permissions. Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent pro- fessional person should be sought. Neither the publisher nor the author shall be liable for damages arising here- from. The fact that an organization or Website is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Website may provide or recommendations it may make. Further, readers should be aware that Internet Websites listed in this work may have changed or disappeared between when this work was written and when it is read. For general information on our other products and services please contact our Customer Care Department within the United States at (800) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002. Trademarks: Wiley and the Wiley logo are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. Red Hat and Fedora are registered trademarks of Red Hat, Inc. Linux is a registered trademark of Linus Torvalds. All other trademarks are the property of their respective owners. Wiley Publishing, Inc. is not associated with any product or vendor mentioned in this book. Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books. 82911ffirs.qxd:Toolbox 10/19/07 12:41 PM Page v As always, I dedicate my work on this book to my wife, Sheree. — Christopher Negus To my dad, for teaching me BASIC when I was little. — François Caen 82911ffirs.qxd:Toolbox 10/19/07 12:41 PM Page vi 82911ffirs.qxd:Toolbox 10/19/07 12:41 PM Page vii About the Authors Christopher Negus is the author of the best-selling Fedora and Red Hat Linux Bibles, Linux Toys, Linux Troubleshooting Bible, and Linux Bible 2007 Edition. He is a member of the Madison Linux Users Group. Prior to becoming a full-time writer, Chris served for eight years on development teams for the Unix operating system at AT&T, where Unix was created and developed. He also worked with Novell on Unix development and Caldera Linux. François Caen, through his company Turbosphere LLC, hosts and manages business application infrastructures, with 95 percent running on Linux systems. As an open source advocate, he has lectured on OSS network management and Internet services, and served as president of the Tacoma Linux User Group. François is a Red Hat Certified Engineer (RHCE). In his spare time, François enjoys managing enterprise Cisco networks. 82911ffirs.qxd:Toolbox 10/19/07 12:41 PM Page viii 82911ffirs.qxd:Toolbox 10/19/07 12:41 PM Page ix Credits Acquisitions Editor Vice President and Executive Publisher Jenny Watson Joseph B. Wikert Development Editor Project Coordinator, Cover Sara Shlaer Lynsey Osborn Technical Editor Compositor Thomas Blader Laurie Stewart, Happenstance Type-O-Rama Copy Editor Michael Koch Proofreader Kathryn Duggan Editorial Manager Mary Beth Wakefield Indexer Melanie Belkin Production Manager Tim Tate Anniversary Logo Design Richard Pacifico Vice President and Executive Group Publisher Richard Swadley 82911ffirs.qxd:Toolbox 10/19/07 12:41 PM Page x Contents at a Glance Chapter 1: Starting with Fedora Linux . .1 Chapter 2: Installing Fedora and Adding Software . .13 Chapter 3: Using the Shell . .33 Chapter 4: Working with Files . .51 Chapter 5: Manipulating Text . .71 Chapter 6: Playing with Multimedia . .89 Chapter 7: Administering File Systems . .103 Chapter 8: Backups and Removable Media . .131 Chapter 9: Checking and Managing Running Processes . .147 Chapter 10: Managing the System . .165 Chapter 11: Managing Network Connections . .187 Chapter 12: Accessing Network Resources . .209 Chapter 13: Doing Remote System Administration . .229 Chapter 14: Locking Down Security . .247 Appendix A: Using vi or Vim Editors . .263 Appendix B: Shell Special Characters and Variables . .271 Appendix C: Getting Information from /proc . .275 Index . .281 82911ftoc.qxd:Toolbox 10/18/07 4:05 PM Page xi Contents Acknowledgments xix Introduction xxi Chapter 1: Starting with Fedora Linux 1 About Fedora, Red Hat, and Linux 2 Comparing Fedora to Other Linuxes 3 Finding Fedora Resources 4 Focusing on Linux Commands 5 Finding Commands 6 Command Reference Information in Fedora 8 Summary 11 Chapter 2: Installing Fedora and Adding Software 13 Installing Fedora 13 Preparing to Install 14 Choosing Installation Options 14 Answering Installation Questions 17 Working with Software Packages 19 Using yum Software Repositories 20 Enabling Repositories for yum 21 Using the yum Command 23 Using yum Utilities 26 Managing Software with rpm 26 Using the rpm Command 27 Building RPMs from SRPMs 31 Extracting Files from RPMs 31 Summary 32 Chapter 3: Using the Shell 33 Terminal Windows and Shell Access 33 Using Terminal Windows 33 Using Virtual Terminals 35 82911ftoc.qxd:Toolbox 10/18/07 4:05 PM Page xii Contents Using the Shell 35 Using Bash History 36 Using Command Line Completion 37 Redirecting stdin and stdout 37 Using alias 40 Watching Commands 41 Watching Files 41 Acquiring Super User Power 41 Using the su Command 41 Delegating Power with sudo 42 Using Environment Variables 43 Creating Simple Shell Scripts 45 Editing and Running a Script 45 Adding Content to Your Script 45 Summary 49 Chapter 4: Working with Files 51 Understanding File Types 51 Using Regular Files 51 Using Directories 52 Using Symbolic and Hard Links 53 Using Device Files 54 Using Named Pipes and Sockets 54 Setting File/Directory Permissions 55 Changing Permissions with chmod 56 Setting the umask 58 Changing Ownership 58 Traversing the File System 59 Copying Files 60 Changing File Attributes 62 Searching for Files 63 Finding Files with locate 63 Locating Files with find 64 Using Other Commands to Find Files 66 Finding Out More About Files 66 Listing Files 67 Verifying Files 67 Summary 69 xii 82911ftoc.qxd:Toolbox 10/18/07 4:05 PM Page xiii Contents Chapter 5: Manipulating Text 71 Matching Text with Regular Expressions 71 Editing Text Files 72 Using the JOE Editor 73 Using the pico and nano Editors 76 Graphical Text Editors 78 Listing, Sorting, and Changing Text 78 Listing Text Files 79 Paging Through Text 80 Paginating Text Files with pr 80 Searching for Text with grep 81 Replacing Text with sed 83 Translating or Removing Characters with tr 84 Checking Differences Between Two Files with diff 85 Using awk and cut to Process Columns 87 Converting Text Files to Different Formats 88 Summary 88 Chapter 6: Playing with Multimedia 89 Working with Audio 89 Playing Music 89 Adjusting Audio Levels 91 Ripping CD Music 92 Encoding Music 93 Streaming Music 95 Converting Audio Files 97 Transforming Images 98 Getting Information about Images 98 Converting Images 99 Converting Images in Batches 100 Summary 102 Chapter 7: Administering File Systems 103 Understanding File System Basics 103 Creating and Managing File Systems 105 Partitioning Hard Disks 105 Working with File System Labels 109 xiii 82911ftoc.qxd:Toolbox 10/18/07 4:05 PM Page xiv Contents Formatting a File System 110 Viewing and Changing File System Attributes 111 Creating

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    334 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us