Linux All-In-One For Dummies (Richard Blum) (Z-Library)

Author: Richard Blum

非小说

Get started with the Linux operating system. Learn how to trouble shoot, get online, and start networking, all with Linux All-in-One For Dummies 7th Edition. This all-inclusive title will cover a wide array of Linux problems, uses, and commonly asked questions, with hands on example problems, so readers can get familiar with Linux. EIGHT MINI BOOKS: Getting Started with Linux Linux Desktops Networking Administration Managing Linux Servers Security Scripting Linux Certification

📄 File Format: PDF
💾 File Size: 13.7 MB
77
Views
0
Downloads
0.00
Total Donations

📄 Text Preview (First 20 pages)

ℹ️

Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

📄 Page 1
(This page has no text content)
📄 Page 2
(This page has no text content)
📄 Page 3
Linux® A L L - I N - O N E 7th Edition by Richard Blum
📄 Page 4
Linux® All-in-One For Dummies®, 7th Edition Published by: John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030-5774, www.wiley.com Copyright © 2023 by John Wiley & Sons, Inc., Hoboken, New Jersey Published simultaneously in Canada 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 the prior written permission of the Publisher. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/ permissions. Trademarks: Wiley, For Dummies, the Dummies Man logo, Dummies.com, Making Everything Easier, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and may not be used without written permission. Linux is a registered trademark of Linus Torvalds in the US and other countries. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned in this book. LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: WHILE THE PUBLISHER AND AUTHORS HAVE USED THEIR BEST EFFORTS IN PREPARING THIS WORK, THEY 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 ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES REPRESENTATIVES, WRITTEN SALES MATERIALS OR PROMOTIONAL STATEMENTS FOR THIS WORK. THE FACT THAT AN ORGANIZATION, WEBSITE, OR PRODUCT IS REFERRED TO IN THIS WORK AS A CITATION AND/ OR POTENTIAL SOURCE OF FURTHER INFORMATION DOES NOT MEAN THAT THE PUBLISHER AND AUTHORS ENDORSE THE INFORMATION OR SERVICES THE ORGANIZATION, WEBSITE, OR PRODUCT MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE. THIS WORK IS SOLD WITH THE UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING PROFESSIONAL SERVICES. THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR YOUR SITUATION. YOU SHOULD CONSULT WITH A SPECIALIST WHERE APPROPRIATE. FURTHER, READERS SHOULD BE AWARE THAT WEBSITES LISTED IN THIS WORK MAY HAVE CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ. NEITHER THE PUBLISHER NOR AUTHORS SHALL BE LIABLE FOR ANY LOSS OF PROFIT OR ANY OTHER COMMERCIAL DAMAGES, INCLUDING BUT NOT LIMITED TO SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR OTHER DAMAGES. For general information on our other products and services, please contact our Customer Care Department within the U.S. at 877-762-2974, outside the U.S. at 317-572-3993, or fax 317-572-4002. For technical support, please visit https://hub.wiley.com/community/support/dummies. Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with standard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at http://booksupport.wiley.com. For more information about Wiley products, visit www.wiley.com. Library of Congress Control Number: 2022945629 ISBN 978-1-119-90192-1 (pbk); ISBN 978-1-119-90194-5 (ebk); ISBN 978-1-119-90193-8 (ebk)
📄 Page 5
Contents at a Glance Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Book 1: Getting Started with Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 CHAPTER 1: Introducing Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 CHAPTER 2: Installing Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 CHAPTER 3: Living in a Virtual World . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 CHAPTER 4: Trying Out Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 CHAPTER 5: Troubleshooting and Customizing Linux . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Book 2: Linux Desktops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 CHAPTER 1: The GNOME Desktop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 CHAPTER 2: The KDE Plasma Desktop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 CHAPTER 3: Other Popular Desktops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 CHAPTER 4: Linux Desktop Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 CHAPTER 5: The Linux File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 CHAPTER 6: Text Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 Book 3: Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 CHAPTER 1: Connecting to the Internet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 CHAPTER 2: Setting Up a Local Area Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 CHAPTER 3: Going Wireless . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 CHAPTER 4: Managing the Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 Book 4: Administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 CHAPTER 1: Working with the Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 CHAPTER 2: Introducing Basic System Administration . . . . . . . . . . . . . . . . . . . . . . . . 249 CHAPTER 3: Managing Users and Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 CHAPTER 4: Managing File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 Book 5: Managing Linux Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 CHAPTER 1: Hosting Internet Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 CHAPTER 2: Managing a Web Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 CHAPTER 3: Managing a Database Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349 CHAPTER 4: Working with Samba and NFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373 CHAPTER 5: Managing Mail Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
📄 Page 6
Book 6: Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401 CHAPTER 1: Introducing Linux Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403 CHAPTER 2: Securing Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419 CHAPTER 3: Vulnerability Testing and Computer Security Audits . . . . . . . . . . . . . . . 449 Book 7: Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465 CHAPTER 1: Introductory Shell Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467 CHAPTER 2: Advanced Shell Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479 CHAPTER 3: Programming in Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 Book 8: Linux Certification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513 CHAPTER 1: Studying for the Linux Professional Institute Exams . . . . . . . . . . . . . . . 515 CHAPTER 2: Studying for the CompTIA Linux+ Exam . . . . . . . . . . . . . . . . . . . . . . . . . . 529 CHAPTER 3: Other Linux Certifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539
📄 Page 7
Table of Contents v Table of Contents INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 About This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 Foolish Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2 Icons Used in This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3 Beyond the Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 Where to Go from Here . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 BOOK 1: GETTING STARTED WITH LINUX . . . . . . . . . . . . . . . . . . . . . 5 CHAPTER 1: Introducing Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 What Is Linux? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7 The Linux kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8 GNU utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 Linux user interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12 Linux Distributions: Why So Many? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16 Core Linux distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17 Specialized Linux distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18 CHAPTER 2: Installing Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Dual-Booting with Linux and Microsoft Windows . . . . . . . . . . . . . . . . .23 Installing a second hard drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24 Partitioning an existing drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24 Partitioning using Windows tools . . . . . . . . . . . . . . . . . . . . . . . . . . . .25 Partitioning using Linux tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26 Finally, Finally, Before You Get Started . . . . . . . . . . . . . . . . . . . . . . . . . . .27 Disabling the secure boot feature . . . . . . . . . . . . . . . . . . . . . . . . . . . .27 Creating a boot disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28 Installing Ubuntu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30 Your First Ubuntu Boot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36 CHAPTER 3: Living in a Virtual World . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 What Are Virtual Servers? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39 Installing VirtualBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40 Creating a Linux Virtual Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42 Installing Linux on a Virtual Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . .45 Changing settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45 Loading the operating system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47 Working with the sandbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50
📄 Page 8
vi Linux All-in-One For Dummies CHAPTER 4: Trying Out Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Starting Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53 Playing with the Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56 Starting the bash shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56 Understanding shell commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58 Trying a few Linux commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58 Shutting Down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60 CHAPTER 5: Troubleshooting and Customizing Linux . . . . . . . . . . . . 63 Using Text Mode Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .64 Lookin’ for Trouble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .64 Using the kernel ring buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65 Using log files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66 Using the journal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67 Resolving Other Installation Problems . . . . . . . . . . . . . . . . . . . . . . . . . . .68 Using KNOPPIX boot commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68 Handling the fatal signal 11 error . . . . . . . . . . . . . . . . . . . . . . . . . . . .71 Getting around the PC reboot problem . . . . . . . . . . . . . . . . . . . . . . .71 Using Linux kernel boot options . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71 Setting Up Printers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .74 Managing DVDs, CD-ROMs, and Flash Drives . . . . . . . . . . . . . . . . . . . . .76 Updating the Operating System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77 Updating Ubuntu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77 Updating openSUSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .78 Installing New Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79 Adding applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .80 Adding packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81 BOOK 2: LINUX DESKTOPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 CHAPTER 1: The GNOME Desktop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 Looking at the History of GNOME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .87 Breaking Down the GNOME Desktop . . . . . . . . . . . . . . . . . . . . . . . . . . . .88 Menu, please! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .88 The desktop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90 Exploring the Activities Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91 Customizing Your Ride . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .92 CHAPTER 2: The KDE Plasma Desktop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 The KDE Plasma Desktop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .93 The Application launcher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .95 The panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .96 The desktop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .96
📄 Page 9
Table of Contents vii Using Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98 Adding widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98 Getting more widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99 Plasma System Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99 Desktop Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100 CHAPTER 3: Other Popular Desktops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 Spicing Things Up with Cinnamon . . . . . . . . . . . . . . . . . . . . . . . . . . . . .103 Reviewing the history of Cinnamon . . . . . . . . . . . . . . . . . . . . . . . . .104 Looking at the menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105 Changing settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105 Adding more spice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .106 Working with MATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107 The history of MATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107 Looking at the menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .109 Changing desktop settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .109 Applets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .110 The Xfce Desktop Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .111 The history of Xfce . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .111 The Whisker menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112 Changing Xfce settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113 Applets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113 CHAPTER 4: Linux Desktop Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 The LibreOffice Suite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115 Browsing the Web with Firefox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .117 Configuring Firefox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .117 Communicating with Email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119 Evolving into email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .120 Working with KMail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .121 The amazing Thunderbird . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .123 Listening to Audio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .124 Listening to downloaded music . . . . . . . . . . . . . . . . . . . . . . . . . . . . .127 Viewing Movie Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129 Creating and Modifying Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .130 CHAPTER 5: The Linux File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 Pieces of the Puzzle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133 Touring the Linux File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134 The root of the tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134 Where removable media lives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .136 Managing Your File System without a Net (or Mouse) . . . . . . . . . . . . .136 Viewing information about files on the command line . . . . . . . . .136 Understanding file listing information . . . . . . . . . . . . . . . . . . . . . . .137
📄 Page 10
viii Linux All-in-One For Dummies Comprehending file types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .139 Navigating the file system in Linux . . . . . . . . . . . . . . . . . . . . . . . . . .140 A Permissions Primer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141 Checking out the triplets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141 Beware of owners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143 Hanging out in groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143 Clicking Your Way through the File System . . . . . . . . . . . . . . . . . . . . . .144 Using files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .145 Swimming with Dolphin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .149 Don’t forget Xfce! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .151 Finding Things . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .152 CHAPTER 6: Text Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 Viewing the Contents of a Text File . . . . . . . . . . . . . . . . . . . . . . . . . . . . .155 Editing Text Files with nano . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .156 Going with gedit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .157 Editing Text in the KDE Plasma Desktop . . . . . . . . . . . . . . . . . . . . . . . .158 Writing with KWrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .159 Meet Kate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .160 Text Editing with ed and vi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .161 Using ed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .162 Using vi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .165 BOOK 3: NETWORKING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 CHAPTER 1: Connecting to the Internet . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Understanding the Internet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .174 Deciding How to Connect to the Internet . . . . . . . . . . . . . . . . . . . . . . .175 Connecting with DSL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176 How DSL works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176 DSL alphabet soup: ADSL, IDSL, SDSL . . . . . . . . . . . . . . . . . . . . . . .177 Typical DSL setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .179 Connecting with a Cable Modem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .180 How a cable modem works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .181 Typical cable modem setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .182 CHAPTER 2: Setting Up a Local Area Network . . . . . . . . . . . . . . . . . . . . 185 Understanding TCP/IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .185 IP addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .187 Internet services and port numbers . . . . . . . . . . . . . . . . . . . . . . . . .189 Setting Up an Ethernet LAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .190 How Ethernet works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191 Ethernet cables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .192 Configuring TCP/IP Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .195 Connecting Your LAN to the Internet . . . . . . . . . . . . . . . . . . . . . . . . . . .196
📄 Page 11
Table of Contents ix CHAPTER 3: Going Wireless . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 Understanding Wireless Ethernet Networks . . . . . . . . . . . . . . . . . . . . .199 Understanding infrastructure and ad hoc modes . . . . . . . . . . . . .201 Understanding wireless security . . . . . . . . . . . . . . . . . . . . . . . . . . . .201 Setting Up Wireless Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .203 Configuring the Wireless Access Point . . . . . . . . . . . . . . . . . . . . . . . . . .204 Configuring Wireless Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .205 CHAPTER 4: Managing the Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 Configuring Network Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .207 Manually editing network configuration files . . . . . . . . . . . . . . . . .208 Using a graphical tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .210 Using a command-line tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .212 Basic Network Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .216 Advanced Network Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . .218 BOOK 4: ADMINISTRATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 CHAPTER 1: Working with the Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 Opening Terminal Windows and Virtual Consoles . . . . . . . . . . . . . . . .225 Using the Bash Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .228 Understanding the syntax of shell commands . . . . . . . . . . . . . . . .228 Working with files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .230 Combining shell commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .231 Controlling command input and output . . . . . . . . . . . . . . . . . . . . .231 Going wild with asterisks and question marks . . . . . . . . . . . . . . . .233 Discovering and Using Linux Commands . . . . . . . . . . . . . . . . . . . . . . .235 Becoming root (superuser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .240 Managing processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .241 Working with date and time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .242 Processing files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .243 Writing Shell Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .246 CHAPTER 2: Introducing Basic System Administration . . . . . . . . . 249 Taking Stock of System Administration Tasks . . . . . . . . . . . . . . . . . . . .250 Becoming root . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .251 Using the su - command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .251 Using the sudo command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .252 Understanding How Linux Boots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .252 Understanding the SysVinit method . . . . . . . . . . . . . . . . . . . . . . . . .253 Understanding the Systemd method . . . . . . . . . . . . . . . . . . . . . . . .259 Monitoring System Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .264 Using the top utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .264 Using the uptime command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .266
📄 Page 12
x Linux All-in-One For Dummies Using the vmstat utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .267 Checking disk performance and disk usage . . . . . . . . . . . . . . . . . .267 Viewing System Information with the /proc File System . . . . . . . . . . .270 Understanding Linux Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .273 Device files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .274 Persistent device naming with udev . . . . . . . . . . . . . . . . . . . . . . . . .275 Managing Loadable Driver Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . .276 Loading and unloading modules . . . . . . . . . . . . . . . . . . . . . . . . . . . .276 Understanding the /etc/modprobe.d files . . . . . . . . . . . . . . . . . . . .277 Scheduling Jobs in Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .278 Scheduling one-time jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .278 Scheduling recurring jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .281 Introducing Some GUI System Administration Tools . . . . . . . . . . . . . .284 CHAPTER 3: Managing Users and Groups . . . . . . . . . . . . . . . . . . . . . . . . . . 287 Adding User Accounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .288 Managing user accounts by using a GUI user manager . . . . . . . .288 Managing user accounts by using commands . . . . . . . . . . . . . . . .290 Managing Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .291 Exploring the User Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .292 Changing User and Group Ownership of Files . . . . . . . . . . . . . . . . . . .295 CHAPTER 4: Managing File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 Exploring the Linux File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .297 Understanding the file-system hierarchy . . . . . . . . . . . . . . . . . . . . .298 Mounting a device on the file system . . . . . . . . . . . . . . . . . . . . . . . .299 Examining the /etc/fstab file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .303 Sharing Files with NFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .304 Installing NFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .305 Exporting a file system with NFS . . . . . . . . . . . . . . . . . . . . . . . . . . . .306 Mounting an NFS file system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .307 Accessing a DOS or Windows File System . . . . . . . . . . . . . . . . . . . . . . .308 Mounting a DOS or Windows disk partition . . . . . . . . . . . . . . . . . .308 Mounting an NTFS partition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .309 BOOK 5: MANAGING LINUX SERVERS . . . . . . . . . . . . . . . . . . . . . . . 311 CHAPTER 1: Hosting Internet Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 What Is a Linux Server? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .313 Launching services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .314 Listening for clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .316 Serving the Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .318 Web services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .319 Database services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .320 Mail services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .322
📄 Page 13
Table of Contents xi Serving Local Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .324 File servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .325 Print servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .326 Network resource servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .326 CHAPTER 2: Managing a Web Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 Linux Web Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .331 Apache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .331 NGINX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .333 The Apache Web Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .333 Installing an Apache server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .333 Configuring an Apache server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .336 The NGINX Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .344 Installing NGINX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .344 Configuring NGINX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .346 CHAPTER 3: Managing a Database Server . . . . . . . . . . . . . . . . . . . . . . . . . 349 Using the MySQL/MariaDB Database . . . . . . . . . . . . . . . . . . . . . . . . . . .349 Installing MariaDB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .350 Looking at the MariaDB command prompt . . . . . . . . . . . . . . . . . . .353 Using the mysql commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .356 Creating database objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .360 Using the PostgreSQL Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .363 Installing PostgreSQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .364 Looking at the PostgreSQL command interface . . . . . . . . . . . . . . .366 Creating PostgreSQL database objects . . . . . . . . . . . . . . . . . . . . . .370 CHAPTER 4: Working with Samba and NFS . . . . . . . . . . . . . . . . . . . . . . . . 373 Sharing Files with NFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .373 Installing NFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .374 Exporting a file system with NFS . . . . . . . . . . . . . . . . . . . . . . . . . . . .375 Mounting an NFS file system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .378 Setting Up a Windows Server Using Samba . . . . . . . . . . . . . . . . . . . . .378 Installing Samba . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .380 Configuring Samba . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .382 Trying out Samba . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .383 CHAPTER 5: Managing Mail Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 Working with sendmail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .385 The sendmail configuration file . . . . . . . . . . . . . . . . . . . . . . . . . . . . .386 Syntax of the sendmail.cf file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .391 Other sendmail files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .393 The .forward file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .395 The sendmail alias file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .395
📄 Page 14
xii Linux All-in-One For Dummies Working with Postfix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .396 A Mail-Delivery Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .398 Using the mail command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .399 The mail-delivery mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .400 BOOK 6: SECURITY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401 CHAPTER 1: Introducing Linux Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403 Why Worry about Security? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .404 Establishing a Security Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . .404 Determining business requirements for security . . . . . . . . . . . . . .406 Performing risk analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .406 Establishing a security policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .408 Implementing security solutions (mitigation) . . . . . . . . . . . . . . . . .409 Managing security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .410 Securing Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .410 Understanding the host-security issues . . . . . . . . . . . . . . . . . . . . . .411 Understanding network-security issues . . . . . . . . . . . . . . . . . . . . . .412 Delving Into Computer Security Terminology and Tools . . . . . . . . . . .413 Keeping Up with Security News and Updates . . . . . . . . . . . . . . . . . . . .418 CHAPTER 2: Securing Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419 Securing Passwords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .420 Shadow passwords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .420 Pluggable authentication modules (PAMs) . . . . . . . . . . . . . . . . . . .421 Protecting Files and Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .422 Viewing ownerships and permissions . . . . . . . . . . . . . . . . . . . . . . .423 Changing file ownerships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .423 Changing file permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .423 Setting default permission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .424 Checking for set user ID permission . . . . . . . . . . . . . . . . . . . . . . . . .426 Encrypting and Signing Files with GnuPG . . . . . . . . . . . . . . . . . . . . . . .427 Understanding public key encryption . . . . . . . . . . . . . . . . . . . . . . .427 Understanding digital signatures . . . . . . . . . . . . . . . . . . . . . . . . . . .428 Using GPG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .429 Monitoring System Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .433 Securing Internet Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .434 Turning off stand-alone services . . . . . . . . . . . . . . . . . . . . . . . . . . . .434 Configuring the Internet super server . . . . . . . . . . . . . . . . . . . . . . .435 Configuring TCP wrapper security . . . . . . . . . . . . . . . . . . . . . . . . . .436 Using Secure Shell for Remote Logins . . . . . . . . . . . . . . . . . . . . . . . . . .437 Setting Up Simple Firewalls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .439 Using NAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .442 Enabling packet filtering on your Linux system . . . . . . . . . . . . . . .443 Security Files to Be Aware Of . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .447
📄 Page 15
Table of Contents xiii CHAPTER 3: Vulnerability Testing and Computer Security Audits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449 Understanding Security Audits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .450 Nontechnical aspects of security audits . . . . . . . . . . . . . . . . . . . . . .450 Technical aspects of security audits . . . . . . . . . . . . . . . . . . . . . . . . .451 Implementing a Security Test Methodology . . . . . . . . . . . . . . . . . . . . .452 Some common computer vulnerabilities . . . . . . . . . . . . . . . . . . . . .453 Host-security review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .454 Network-security review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .458 Vulnerability Testing Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .460 Exploring Security Testing Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .461 BOOK 7: SCRIPTING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465 CHAPTER 1: Introductory Shell Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . 467 Trying Out Simple Shell Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .468 Exploring the Basics of Shell Scripting . . . . . . . . . . . . . . . . . . . . . . . . . .469 Storing stuff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .470 Calling shell functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .471 Controlling the flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .471 Exploring bash’s built-in commands . . . . . . . . . . . . . . . . . . . . . . . . .475 CHAPTER 2: Advanced Shell Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479 Trying Out sed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .479 Working with awk and sed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .482 Step 1: Pull out the ISBN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .483 Step 2: Calculate the 13th digit . . . . . . . . . . . . . . . . . . . . . . . . . . . . .484 Step 3: Add the 13th digit to the other 12 . . . . . . . . . . . . . . . . . . . .485 Step 4: Finish the process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .485 Final Notes on Shell Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .486 CHAPTER 3: Programming in Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 An Overview of Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .488 Exploring the Software-Development Tools in Linux . . . . . . . . . . . . . .489 GNU C and C++ compilers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .490 The GNU make utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .493 The GNU debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .502 Understanding the Implications of GNU Licenses . . . . . . . . . . . . . . . .509 The GNU General Public License . . . . . . . . . . . . . . . . . . . . . . . . . . . .510 The GNU Library General Public License . . . . . . . . . . . . . . . . . . . . .511
📄 Page 16
xiv Linux All-in-One For Dummies BOOK 8: LINUX CERTIFICATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513 CHAPTER 1: Studying for the Linux Professional Institute Exams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515 Overview of LPI Certification Exams . . . . . . . . . . . . . . . . . . . . . . . . . . . .515 Overview of the Linux Essentials Exam . . . . . . . . . . . . . . . . . . . . . . . . .516 Getting involved in the Linux community and finding a career in open source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .517 Finding your way on a Linux system . . . . . . . . . . . . . . . . . . . . . . . . .518 The power of the command line . . . . . . . . . . . . . . . . . . . . . . . . . . . .520 The Linux operating system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .521 Security and file permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .522 Overview of the Linux Professionals Exams . . . . . . . . . . . . . . . . . . . . .524 The LPIC-1 exams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .524 The LPIC-2 exams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .527 The LPIC-3 exams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .528 CHAPTER 2: Studying for the CompTIA Linux+ Exam . . . . . . . . . . . . 529 Overview of the CompTIA Linux+ Exam . . . . . . . . . . . . . . . . . . . . . . . . .530 System Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .531 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .532 Scripting, Containers, and Automation . . . . . . . . . . . . . . . . . . . . . . . . .533 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .533 CHAPTER 3: Other Linux Certifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535 Vendor-Neutral Certifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .535 The Linux Foundation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .535 The GIAC Certifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .536 Vendor-Specific Certifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .537 INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539
📄 Page 17
Introduction 1 Introduction Linux is truly amazing when you consider how it originated and how it continues to evolve. From its modest beginning as the hobby of one person — Linus Torvalds of Finland — Linux has grown into a full-fledged operating system with features that rival those of any commercial Unix operating system. To top it off, Linux — with all its source code — is available free to anyone. All you have to do is download it from a website or get it on a USB flash drive, CD, or DVD for a nominal fee from one of many Linux CD vendors. Linux certainly is an exception to the rule that “you get what you pay for.” Even though Linux is free, it’s no slouch when it comes to performance, features, and reliability. The robustness of Linux has to do with the way it is developed and updated. Developers around the world collaborate to add features. Incremental versions are continually downloaded by users and tested in a variety of system configurations. Linux revisions go through much more rigorous beta testing than any commercial software does. If you’re beginning to use Linux, what you need is a practical guide that not only gets you going with Linux installation and setup but also shows you how to use Linux for a specific task. You may also want to try out different Linux distributions before settling on one. About This Book Linux All-in-One For Dummies gives you eight quick-reference guides in a sin- gle book. Taken together, these eight minibooks provide detailed information on installing, configuring, and using Linux, as well as pointers for passing the vendor-neutral certification exams available from CompTIA and the Linux Professional Institute (LPI) to authenticate your skills. What you’ll like most about this book is that you don’t have to sequentially read the whole thing chapter by chapter — or even read through each section in a chapter. You can pretty much turn to the topic you want and quickly get the answer to your pressing questions about Linux, whether they’re about using the LibreOffice.org word processor, setting up the Apache web server, or a wide range of topics.
📄 Page 18
2 Linux All-in-One For Dummies Topics that correspond to the certification objectives are important after you’ve become comfortable enough with the operating system to consider taking the cer- tification exams. As I discuss the material, Tips draw your attention to the key concepts and topics tested in the CompTIA Linux+ or LPI LPIC-1 exams. Note, though, that not all Tips indicate material that’s on the exams; I also share other types of information in Tips. If you are a novice to Linux, ignore the certification objective information as you read. Only after you become comfortable with the operating system and are con- sidering authenticating your skills by taking the CompTIA or LPI exams should you revisit the book and look for this information. Each minibook zeros in on a specific task area — such as using the Internet or running Internet servers — and then provides hands-on instructions on how to perform a series of related tasks. You can jump right to a section and read about a specific task. You don’t have to read anything but the few paragraphs or the list of steps that relate to your question. Use the Table of Contents or the Index to locate the pages relevant to your question. You can safely ignore text next to the Technical Stuff icons, as well as text in side- bars. However, if you’re the kind of person who likes to know some of the hidden details of how Linux works, then, by all means, dig into the Technical Stuff icons and the sidebars. Within this book, you may note that some web addresses break across two lines of text. If you’re reading this book in print and want to visit one of these web pages, simply key in the web address exactly as it’s noted in the text, pretending as though the line break doesn’t exist. If you’re reading this as an e-book, you’ve got it easy — just click the web address to be taken directly to the web page. Foolish Assumptions I assume that you’re familiar with a PC — you know how to turn it on and off and you’ve dabbled with Windows. (Considering that most new PCs come preloaded with Windows, this assumption is safe, right?) And I assume that you know how to use some Windows applications, such as Microsoft Office. When installing Linux on your PC, you may want to retain your Windows instal- lations. I assume that you don’t mind shrinking the Windows partition to make room for Linux. For this procedure, you can invest in a good disk-partitioning tool or use one of the partitioning tools included with most Linux distributions.
📄 Page 19
Introduction 3 I also assume that you’re willing to accept the risk that when you try to install Linux, some things may not quite work. Problems can happen if you have some uncommon types of hardware. If you’re afraid of ruining your system, try find- ing a slightly older, spare PC that you can sacrifice and then install Linux on that PC. Alternatively, you can install a virtual server software package such as Oracle’s VirtualBox and install Linux as a virtual machine inside your Windows desktop. Linux All-in-One Desk Reference For Dummies has eight minibooks, each of which focuses on a small set of related topics. If you’re looking for information on a specific topic, check the minibook names on the thumb tabs or consult the Table of Contents. Icons Used in This Book Following the time-honored tradition of the All-in-One For Dummies series, I use icons to help you quickly pinpoint useful information. The icons include the following: The Remember icon marks a general, interesting fact — something that you want to know and remember as you work with Linux. You might even find interesting trivia worth bringing up at an evening dinner party. When you see the Tip icon, you’re about to read about something you can do to make your job easier. Long after you’ve finished with the first reading of this book, you can skim the book, looking for only the tips. I use the Warning icon to highlight potential pitfalls. With this icon, I’m telling you: “Watch out! Whatever is being discussed could hurt your system.” They say that those who are forewarned are forearmed, so I hope these entities will save you some frustration. The Technical Stuff icon marks technical information that could be of interest to an advanced user (or those aspiring to be advanced users).
📄 Page 20
4 Linux All-in-One For Dummies Beyond the Book In addition to the book you have in your hands, you can access some helpful extra content online. Check out the free Cheat Sheet by going to www.dummies.com and entering Linux All-in-One For Dummies in the Search box. You’ll find common Linux commands and where to go for more help with Linux. Occasionally, we have updates to our technology books. If this book does have any technical updates, they’ll be posted at www.dummies.com. Where to Go from Here It’s time to get started on your Linux adventure. Turn to any chapter and let the fun begin. Use the Table of Contents and the Index to figure out where you want to go. Before you know it, you’ll become an expert at Linux! I hope you enjoy consulting this book as much as I enjoyed writing it!
The above is a preview of the first 20 pages. Register to read the complete e-book.

💝 Support Author

0.00
Total Amount (¥)
0
Donation Count

Login to support the author

Login Now
Back to List