Baixe Linux Bible 9th Edition e outras Notas de estudo em PDF para Informática, somente na Docsity!
Linux
BIBLE
Ninth Edition
Christopher Negus
As always, I dedicate this book to my wife, Sheree.
Credits
Project Editor Martin V. Minner
Technical Editor Richard Blum
Production Manager Kathleen Wisor
Copy Editor Gwenette Gaddis
Manager of Content Development & Assembly Mary Beth Wakefield
Marketing Director David Mayhew
Marketing Manager Carrie Sherrill
Professional Technology & Strategy Director Barry Pruett
Business Manager Amy Knies
Associate Publisher Jim Minatel
Project Coordinator, Cover Brent Savage
Proofreader Amy Schneider
Indexer John Sleeva
Cover Designer Wiley
xi
S
ince I was hired by Red Hat Inc. more than six years ago, I have been exposed to many of the best Linux developers, testers, support professionals and instructors in the world. Since I can’t thank everyone individually, I instead salute the culture of cooperation and excellence that serves to improve my own Linux skills every day.
I don’t speak well of Red Hat because I work there; I work at Red Hat because it lives up to the ideals of open source software in ways that match my own beliefs. There are a few people at Red Hat I would like to acknowledge particularly. Discussions with Victor Costea, Andrew Blum, and other Red Hat instructors have helped me adapt my ways of thinking about how people learn Linux. I’m able to work across a wide range of technologies because of the great support I get from my supervisor, Adam Strong, and my senior manager, Sam Knuth, who both point me toward cool projects but never hold me back.
In this edition, particular help came from Ryan Sawhill Aroha, who helped me simplify my writing on encryption technology. For the new content I wrote in this book on Linux cloud technologies, I’d like to thank members of OpenStack, Docker, and RHEV teams, who help me learn cutting-edge cloud technology every day.
As for the people at Wiley, thanks for letting me continue to develop and improve this book over the years. Marty Minner has helped keep me on task through a demanding schedule. Mary Beth Wakefield and Ken Brown have been there to remind me at the times I forgot it was a demanding schedule. Thanks to Richard Blum for his reliably thorough job of tech editing. Thanks to Margot Maley Hutchison from Waterside Productions for contracting the book for me with Wiley and always looking out for my best interests.
Finally, thanks to my wife, Sheree, for sharing her life with me and doing such a great job raising Seth and Caleb.
Acknowledgments
xv
Acknowledgments....................................................... xi
xvii
xviii
- Part I: Getting Started Introduction xxxiii
- Chapter 1: Starting with Linux
- Chapter 2: Creating the Perfect Linux Desktop
- Part II: Becoming a Linux Power User
- Chapter 3: Using the Shell
- Chapter 4: Moving around the Filesystem
- Chapter 5: Working with Text Files
- Chapter 6: Managing Running Processes .......................................................................
- Chapter 7: Writing Simple Shell Scripts.........................................................................
- Part III: Becoming a Linux System Administrator
- Chapter 8: Learning System Administration .................................................................
- Chapter 9: Installing Linux .........................................................................................
- Chapter 10: Getting and Managing Software ................................................................
- Chapter 11: Managing User Accounts ...........................................................................
- Chapter 12: Managing Disks and Filesystems ................................................................
- Part IV: Becoming a Linux Server Administrator
- Chapter 13: Understanding Server Administration ........................................................
- Chapter 14: Administering Networking ........................................................................
- Chapter 15: Starting and Stopping Services..................................................................
- Chapter 16: Configuring a Print Server.........................................................................
- Chapter 17: Configuring a Web Server ..........................................................................
- Chapter 18: Configuring an FTP Server .........................................................................
- Chapter 19: Configuring a Windows File Sharing (Samba) Server ....................................
- Chapter 20: Configuring an NFS File Server ..................................................................
- Chapter 21: Troubleshooting Linux
- Part V: Learning Linux Security Techniques
- Chapter 22: Understanding Basic Linux Security ..........................................................
- Chapter 23: Understanding Advanced Linux Security ....................................................
- Chapter 24: Enhancing Linux Security with SELinux ....................................................
- Chapter 25: Securing Linux on a Network.....................................................................
- Part VI: Extending Linux into the Cloud xiv
- Chapter 26: Using Linux for Cloud Computing...............................................................
- Chapter 27: Deploying Linux to the Cloud
- Part VII: Appendixes.
- Appendix A: Media.....................................................................................................
- Appendix B: Exercise Answers.....................................................................................
- Index ........................................................................................................................
- Part I: Getting Started Introduction......................................................... xxxiii
- Chapter 1: Starting with Linux
- Understanding What Linux Is
- Understanding How Linux Differs from Other Operating Systems
- Exploring Linux History
- Free-flowing UNIX culture at Bell Labs
- Commercialized UNIX
- Berkeley Software Distribution arrives
- UNIX Laboratory and commercialization
- GNU transitions UNIX to freedom .................................................................
- BSD loses some steam
- Linus builds the missing piece
- OSI open source defi nition
- Understanding How Linux Distributions Emerged
- Choosing a Red Hat distribution
- Using Red Hat Enterprise Linux
- Using Fedora......................................................................................
- Choosing Ubuntu or another Debian distribution
- Finding Professional Opportunities with Linux Today
- Understanding how companies make money with Linux
- Becoming Red Hat certified
- RHCSA topics
- RHCE topics
- Summary............................................................................................................
- Chapter 2: Creating the Perfect Linux Desktop
- Understanding Linux Desktop Technology
- Live image Starting with the Fedora GNOME Desktop
- Using the GNOME 3 Desktop
- After the computer boots up
- Navigating with the mouse
- Navigating with the keyboard Contents
- Setting up the GNOME 3 desktop ...................................................................
- Extending the GNOME 3 desktop
- Using GNOME shell extensions
- Using the GNOME Tweak Tool...............................................................
- Starting with desktop applications
- Managing files and folders with Nautilus
- Installing and managing additional software
- Playing music with Rhythmbox
- Stopping the GNOME 3 desktop
- Using the GNOME 2 Desktop
- Using the Metacity window manager
- Changing GNOME’s appearance
- Using the GNOME panels..............................................................................
- Using the Applications and System menus
- Adding an applet
- Adding another panel
- Adding an application launcher
- Adding a drawer
- Changing panel properties
- Adding 3D effects with AIGLX
- Summary............................................................................................................
- Exercises .............................................................................................................
- Part II: Becoming a Linux Power User
- Chapter 3: Using the Shell
- About Shells and Terminal Windows
- Using the shell prompt
- Using a terminal window
- Using virtual consoles
- Choosing Your Shell.............................................................................................
- Running Commands
- Understanding command syntax..................................................................
- Locating commands .....................................................................................
- Recalling Commands Using Command History.........................................................
- Command-line editing
- Command-line completion
- Command-line recall
- Connecting and Expanding Commands..................................................................
- Piping between commands
- Sequential commands
- Background commands
- Expanding commands
- Expanding arithmetic expressions Contents
- Expanding variables
- Using Shell Variables
- Creating and using aliases...........................................................................
- Exiting the shell.........................................................................................
- Creating Your Shell Environment
- Configuring your shell
- Setting your prompt
- Adding environment variables
- Getting Information about Commands
- Summary............................................................................................................
- Exercises
- Chapter 4: Moving around the Filesystem
- Using Basic Filesystem Commands .......................................................................
- Using Metacharacters and Operators ....................................................................
- Using file-matching metacharacters ............................................................
- Using file-redirection metacharacters .........................................................
- Using brace expansion characters ...............................................................
- Listing Files and Directories ...............................................................................
- Understanding File Permissions and Ownership ....................................................
- Changing permissions with chmod (numbers)
- Changing permissions with chmod (letters)
- Setting default file permission with umask .................................................
- Changing file ownership.............................................................................
- Moving, Copying, and Removing Files
- Summary...........................................................................................................
- Exercises ...........................................................................................................
- Chapter 5: Working with Text Files
- Editing Files with vim and vi
- Starting with vi
- Adding text
- Moving around in the text .................................................................
- Deleting, copying, and changing text .................................................
- Pasting (putting) text .......................................................................
- Repeating commands ........................................................................
- Exiting vi .........................................................................................
- Skipping around in the file ........................................................................
- Searching for text .....................................................................................
- Using ex mode...........................................................................................
- Learning more about vi and vim .................................................................
- Finding Files......................................................................................................
- Using locate to fi nd files by name ...............................................................
- Searching for files with fi nd ....................................................................... Contents
- Finding files by name ........................................................................
- Finding files by size ..........................................................................
- Finding files by user..........................................................................
- Finding files by permission ................................................................
- Finding files by date and time ...........................................................
- Using ‘not’ and ‘or’ when fi nding files .................................................
- Finding files and executing commands ...............................................
- Searching in files with grep........................................................................
- Summary...........................................................................................................
- Exercises ...........................................................................................................
- Chapter 6: Managing Running Processes
- Understanding Processes ....................................................................................
- Listing Processes ...............................................................................................
- Listing processes with ps ...........................................................................
- Listing and changing processes with top .....................................................
- Listing processes with System Monitor ........................................................
- Managing Background and Foreground Processes ..................................................
- Starting background processes ...................................................................
- Using foreground and background commands ..............................................
- Killing and Renicing Processes ............................................................................
- Killing processes with kill and killall ..........................................................
- Using kill to signal processes by PID
- Using killall to signal processes by name ............................................
- Setting processor priority with nice and renice ...........................................
- Limiting Processes with cgroups..........................................................................
- Summary...........................................................................................................
- Exercises
- Chapter 7: Writing Simple Shell Scripts
- Understanding Shell Scripts ................................................................................
- Executing and debugging shell scripts ........................................................
- Understanding shell variables ....................................................................
- Special shell positional parameters .....................................................
- Reading in parameters ......................................................................
- Parameter expansion in bash .............................................................
- Performing arithmetic in shell scripts .........................................................
- Using programming constructs in shell scripts.............................................
- The “if…then” statements .................................................................
- The case command ............................................................................
- The “for…do” loop ............................................................................
- The “while…do” and “until…do” loops ...............................................
- Trying some useful text manipulation programs ..........................................
- The general regular expression parser .................................................