Transcription

full EcolorI S U AQUIL QCUK S T AGRUIDT GVIVS UALKISCTARTE U InI D Easy visual approach uses pictures to guide you through Unix andLinux and show you what to do step by step. Concise steps and explanations let you get up and running in no time. Essential reference guide keeps you coming back again and again. Visit the companion Web site at peachpit.com/unixlinuxvqs5Deborah and Eric Ray have together published nearly 20 computingbooks since the mid-1990s. Deborah is Professor of Practice at UtahState University, where she teaches graduate and undergraduatecourses in technical communication for the English and Engineeringdepartments and uses online and broadcast technologies to reachstudents all over the United States. Eric is Director of Platform Engineering at Nexenta, aglobal leader in software-defined storage, and has two decades of high-profile experienceworking at high-tech corporations such as Sun Microsystems and Oracle Corporation.www.peachpit.comFOR COMPUTERS USING:Adobe Photoshop CC for Mac OS Xand Microsoft WindowsCATEGORY: Unix/LinuxUS 39.99 CAN 45.99 UK 21.99ISBN-13: 978-0-321-99754-8ISBN-10:0-321-99754-9Deborah and Eric Raydonatas1205 / ShutterstockAUTHOR PHOTOS:COVER IMAGES:95 3 9 9 9RAY&RAYLEVEL: Beginning / IntermediateVISU AL Q UI CK STA RT G UIDE Whether you’re new to Unix and Linux or you’ve been using thecommand line for years, this book has something for you—from howto create and edit directories and files to writing scripts, and much,much more!Peachpit PressUnix and LinuxFifth EditionFifth Edition Detailed code listings and scripting instructions help you leveragethe power of Unix and Linux to the fullest.Unix and LinuxLearn Unix and Linux—the quick and easy way!VIS U A L QU ICK S TA RT GU IDED E B O R A H S . R AYE R I C J . R AY780321 997548L E A R N T H E Q U I C K A N D E A S Y WAY !

V I S UA L Q U I C K S TA R T G U I D EUnix andLinuxFifth EditionDeborah Ray  Eric RayPeachpit Press

Visual QuickStart GuideUnix and Linux, Fifth EditionDeborah Ray and Eric RayPeachpit Presswww.peachpit.comTo report errors, please send a note to [email protected] Press is a dvision of Pearson Education.Copyright 2015 by Deborah Ray and Eric RayEditor: Clifford ColbyDevelopment editor: Robyn G. ThomasSenior production editor: Lisa BraziealCopyeditor: Scout FestaTechnical editor: Bruce ByfieldCompositor: Danielle FosterIndexer: James MinkinCover design: RHDG / Riezebos Holzbaur Design Group, Peachpit PressInterior design: Peachpit PressLogo design: MINE www.minesf.comNotice of RightsAll rights reserved. No part of this book may be reproduced or transmitted in any form by any means,electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of thepublisher. For information on getting permission for reprints and excerpts, contact [email protected] of LiabilityThe information in this book is distributed on an ”As Is” basis, without warranty. While every precaution hasbeen taken in the preparation of the book, neither the author, Adobe Systems, Inc., nor the publisher shall haveany liability to any person or entity with respect to any loss or damage caused or alleged to be caused directlyor indirectly by the instructions contained in this book or by the computer software and hardware productsdescribed in it.TrademarksVisual QuickStart Guide is a registered trademark of Peachpit Press, a division of Pearson Education.Many of the designations used by manufacturers and sellers to distinguish their products are claimed astrademarks. Where those designations appear in this book, and Peachpit was aware of a trademark claim,the designations appear as requested by the owner of the trademark. All other product names and servicesidentified throughout this book are used in editorial fashion only and for the benefit of such companies with nointention of infringement of the trademark. No such use, or the use of any trade name, is intended to conveyendorsement or other affiliation with this book.ISBN 13: 978-0-321-99754-8ISBN 10:0-321-99754-9987654321Printed and bound in the United States of America

DedicationAcknowledgmentsTo Simon Hayes, who helped develop thisbook’s first edition—the foundation for thisbook’s long-term success.This book came together with the invaluable assistance of a number of verytalented and supportive people. Thanks toClifford Colby for his continued confidenceand support; it’s always a treat to work withyou! Our thanks to Robyn Thomas as well,who was a delight to work with and helpedtremendously in pulling the various piecestogether. Scout Festa was really helpful ascopyeditor and was a great proofreader.Lisa Brazieal did a great job in production,even with our special needs. And our special thanks to Bruce Byfield, whose carefulattention to detail and deep knowledge ofthe idiosyncrasies of Unix and Linux helpediron out technical rough spots. Thanks, all!

Table of ContentsIntroduction . . . . . . . . . . . . . . . . . . . . . ixChapter 1Getting Started with Unix and Linux . . . . . . . . 1Accessing a Unix System . . . . . . . . . . . . . . . . . . . 3Connecting to the Unix or Linux System . . . . . . . . . . 8Logging In . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Changing Your Password with passwd . . . . . . . . . . 13Listing Directories and Files with ls . . . . . . . . . . . . 15Changing Directories with cd . . . . . . . . . . . . . . . . 17Finding Yourself with pwd . . . . . . . . . . . . . . . . . . 18Piping Input and Output . . . . . . . . . . . . . . . . . . . 19Redirecting Output . . . . . . . . . . . . . . . . . . . . . . 21Using Wildcards . . . . . . . . . . . . . . . . . . . . . . . 23Viewing File Contents with more . . . . . . . . . . . . . . 24Displaying File Contents with cat . . . . . . . . . . . . . 25Exploring the System . . . . . . . . . . . . . . . . . . . . .27Getting Help with man . . . . . . . . . . . . . . . . . . . . 28Logging Out . . . . . . . . . . . . . . . . . . . . . . . . . 30Chapter 2Using Directories and Files . . . . . . . . . . . . 31Creating Directories with mkdir . . . . . . . . . . . . . . 32Creating Files with touch . . . . . . . . . . . . . . . . . . 34Copying Directories and Files with cp . . . . . . . . . . . 36Listing Directories and Files with ls(More Goodies) . . . . . . . . . . . . . . . . . . . . . . 38Moving Files with mv . . . . . . . . . . . . . . . . . . . . . 41Removing Files with rm . . . . . . . . . . . . . . . . . . . .42Removing Directories with rmdir . . . . . . . . . . . . . 44Finding Forgotten Files with find . . . . . . . . . . . . . 46Locating Lost Files with locate . . . . . . . . . . . . . . 48Linking with ln (Hard Links) . . . . . . . . . . . . . . . . 49Linking with ln -s (Soft Links) . . . . . . . . . . . . . . . . 51Chapter 3Working with Your Shell . . . . . . . . . . . . . . 53Discovering Which Shell You’re Using . . . . . . . . . . 54Understanding Shells and Options . . . . . . . . . . . . 55Changing Your Shell with chsh . . . . . . . . . . . . . . . 57Changing Your Shell Temporarily . . . . . . . . . . . . . 59Using Completion in the bash Shell . . . . . . . . . . . . . 61Viewing Session History in the bash Shell . . . . . . . . 62Using Completion in the zsh Shell . . . . . . . . . . . . . 64ivTable of Contents

Viewing Session History in the zsh Shell . . . . . . . . . 65Changing Your Identity with su . . . . . . . . . . . . . . .67Fixing Terminal Settings with stty . . . . . . . . . . . . 69Exiting the Shell . . . . . . . . . . . . . . . . . . . . . . . .70Chapter 4Creating and Editing Files . . . . . . . . . . . . . 71Choosing an Editor: nano/pico or vi /vim . . . . . . . . . 72Starting nano and Dabbling with It . . . . . . . . . . . . . 75Saving in nano . . . . . . . . . . . . . . . . . . . . . . . . .76Cutting and Pasting Text Blocks in nano . . . . . . . . . .77Checking Spelling in nano . . . . . . . . . . . . . . . . . .78Getting Help in nano . . . . . . . . . . . . . . . . . . . . .79Exiting nano . . . . . . . . . . . . . . . . . . . . . . . . . 80Starting vi (or vim) and Dabbling with It . . . . . . . . . . 81Saving in vi . . . . . . . . . . . . . . . . . . . . . . . . . 83Adding and Deleting Text in vi . . . . . . . . . . . . . . 84Importing Files into vi . . . . . . . . . . . . . . . . . . . 85Searching and Replacing in vi . . . . . . . . . . . . . . . 86Exiting vi . . . . . . . . . . . . . . . . . . . . . . . . . . . 88Chapter 5Controlling Ownership and Permissions . . . . . 89Understanding File Ownership and Permissions . . . . 90Finding Out Who Owns What . . . . . . . . . . . . . . . . 91Finding Out Which Group You’re In . . . . . . . . . . . . 94Changing the Group Association of Files andDirectories with chgrp . . . . . . . . . . . . . . . . . . 96Changing Ownership of Files and Directorieswith chown . . . . . . . . . . . . . . . . . . . . . . . . . 98Changing Permissions with chmod . . . . . . . . . . . . 100Translating Mnemonic Permissions toNumeric Permissions . . . . . . . . . . . . . . . . . . 103Changing Permission Defaults with umask . . . . . . . . 105Chapter 6Manipulating Files . . . . . . . . . . . . . . . . 107Counting Files and Their Contents with wc . . . . . . . 108Viewing File Beginnings with head . . . . . . . . . . . . 109Viewing File Endings with tail . . . . . . . . . . . . . . 110Finding Text with grep . . . . . . . . . . . . . . . . . . . .111Using Regular Expressions with grep . . . . . . . . . . . 112Using Other Examples of Regular Expressions . . . . . 114Making Global Changes with sed . . . . . . . . . . . . . 115Changing Files with awk . . . . . . . . . . . . . . . . . . 116Comparing Files with cmp . . . . . . . . . . . . . . . . . . 118Finding Differences in Files with diff . . . . . . . . . . . 119Finding Differences in Files with sdiff . . . . . . . . . . 120Sorting Files with sort . . . . . . . . . . . . . . . . . . . 121Table of Contentsv

Eliminating Duplicates with uniq . . . . . . . . . . . . . 122Redirecting to Multiple Locations with tee . . . . . . . . 123Changing with tr . . . . . . . . . . . . . . . . . . . . . . 124Formatting with fmt . . . . . . . . . . . . . . . . . . . . 126Splitting Files with split . . . . . . . . . . . . . . . . . . 128Chapter 7Getting Information About the System . . . . . 131Getting System Information with uname . . . . . . . . . 132Viewing File Systems with df . . . . . . . . . . . . . . . 133Determining Disk Usage with du . . . . . . . . . . . . . 136Finding Out File Types with file . . . . . . . . . . . . . 137Finding Out About Users with finger . . . . . . . . . . 138Learning Who Else Is Logged In with who . . . . . . . . . 141Learning Who Else Is Logged In with w . . . . . . . . . . 142Getting Information About Your Userid with id . . . . . 144Chapter 8Configuring Your Unix or Linux Environment . . 145Understanding Your Unix or Linux Environment . . . . 146Discovering Your Current Environment . . . . . . . . . 148Adding or Changing Variables . . . . . . . . . . . . . . 150Looking at Your zsh Configuration Files . . . . . . . . . 152Adding to Your zsh Path . . . . . . . . . . . . . . . . . . 156Changing Your zsh Prompt . . . . . . . . . . . . . . . . 158Looking at Your bash Configuration Files . . . . . . . . . 161Adding to Your bash Path . . . . . . . . . . . . . . . . . 164Changing Your bash Prompt . . . . . . . . . . . . . . . . 167Setting Aliases with alias . . . . . . . . . . . . . . . . . 169Chapter 9Running Scripts and Programs . . . . . . . . . . 171Running a Command . . . . . . . . . . . . . . . . . . . . 172Scheduling Onetime Jobs with at . . . . . . . . . . . . 173Scheduling Regularly Occurring Jobs with cron . . . . 176Suspending Jobs . . . . . . . . . . . . . . . . . . . . . . 178Checking Job Status with jobs . . . . . . . . . . . . . . 179Running Jobs in the Background with bg . . . . . . . . 180Running Jobs in the Foreground with fg . . . . . . . . . 181Controlling Job Priority with nice . . . . . . . . . . . . . 182Timing Jobs with time . . . . . . . . . . . . . . . . . . . 183Finding Out What Processes Are Running with ps . . . 185Deleting Processes with kill . . . . . . . . . . . . . . . 187Chapter 10Writing Basic Scripts . . . . . . . . . . . . . . . 189Creating a Shell Script . . . . . . . . . . . . . . . . . . . 191Running a Shell Script . . . . . . . . . . . . . . . . . . . 193Making a Script Executable . . . . . . . . . . . . . . . . 194Getting a Head Start on Scripts with history . . . . . . 196viTable of Contents

Embedding Commands . . . . . . . . . . . . . . . . . . 197Looping Your Scripts . . . . . . . . . . . . . . . . . . . . 199Creating If-Then Statements . . . . . . . . . . . . . . . . 201Accepting Command-Line Arguments inYour Scripts . . . . . . . . . . . . . . . . . . . . . . . . 204Accepting Input While a Script Is Running . . . . . . . .206Debugging Scripts . . . . . . . . . . . . . . . . . . . . .208Chapter 11Sending and Reading Email . . . . . . . . . . . 209Choosing an Email Program and Getting Started . . . . 210Reading Email with alpine . . . . . . . . . . . . . . . . 212Sending Email with alpine . . . . . . . . . . . . . . . . 214Customizing alpine . . . . . . . . . . . . . . . . . . . . 216Reading Email with mutt . . . . . . . . . . . . . . . . . . 218Sending Email with mutt . . . . . . . . . . . . . . . . . .220Reading Email with mail . . . . . . . . . . . . . . . . . . 222Sending Email with mail . . . . . . . . . . . . . . . . . . 223Creating a Signature File . . . . . . . . . . . . . . . . . . 225Automatically Forwarding Incoming Messages . . . . . 227Announcing an Absence with vacation . . . . . . . . . 228Configuring procmail . . . . . . . . . . . . . . . . . . . 230Managing Email with procmail . . . . . . . . . . . . . . 232Chapter 12Accessing the Internet . . . . . . . . . . . . . . 235Getting Familiar with Internet Lingo . . . . . . . . . . . 236Logging In to Remote Systems with ssh . . . . . . . . . 238Logging In to Remote Systems with telnet . . . . . . . 239Communicating with Others Using write . . . . . . . . 241Communicating with Others Using talk . . . . . . . . . 242Getting Files from the Internet with ftp . . . . . . . . . 243Sharing Files on the Internet with ftp . . . . . . . . . . 247Surfing the Web with links . . . . . . . . . . . . . . . . 249Surfing the Web with lynx . . . . . . . . . . . . . . . . . 251Downloading Websites with wget . . . . . . . . . . . . . 253Checking Connections with ping . . . . . . . . . . . . . 254Tracing Connections with traceroute . . . . . . . . . . 255Matching Domain Names with IP Addresses . . . . . . 257Chapter 13Working with Encoded andCompressed Files . . . . . . . . . . . . . . . . . 259Encoding Files with uuencode . . . . . . . . . . . . . . .260Decoding Files with uudecode . . . . . . . . . . . . . . . 263Archiving with tar . . . . . . . . . . . . . . . . . . . . . 264Unarchiving Files with tar . . . . . . . . . . . . . . . . . 266Compressing Files with compress . . . . . . . . . . . . 267Table of Contentsvii

Uncompressing Files with uncompress . . . . . . . . . . 268Zipping a File or Directory with gzip . . . . . . . . . . . 269Unzipping a gzip File with gunzip . . . . . . . . . . . . 270Zipping Files and Directories with zip . . . . . . . . . . 271Unzipping Zipped Files with unzip . . . . . . . . . . . . 272Combining Commands . . . . . . . . . . . . . . . . . . . 273Chapter 14Using Handy Utilities . . . . . . . . . . . . . . . 275Calendaring with cal . . . . . . . . . . . . . . . . . . . . 276Calculating with bc . . . . . . . . . . . . . . . . . . . . . 278Evaluating Expressions with expr . . . . . . . . . . . . . 279Converting with units . . . . . . . . . . . . . . . . . . .280Looking It Up with look . . . . . . . . . . . . . . . . . . 281Keeping a Record of Your Session with script . . . . . 282Getting Back to Your Place with screen . . . . . . . . . 284Acting On Found Files with xargs . . . . . . . . . . . . 286Chapter 15Being Root . . . . . . . . . . . . . . . . . . . . 287Acting Like root with sudo . . . . . . . . . . . . . . . . . 288Becoming root with su . . . . . . . . . . . . . . . . . . . 291Starting, Stopping, and Restarting Daemons . . . . . . 292Changing the System Configuration . . . . . . . . . . . 294Monitoring the System . . . . . . . . . . . . . . . . . . .296Keeping Up with watch . . . . . . . . . . . . . . . . . . .299Checking Boot Messages with dmesg . . . . . . . . . . 300Setting the Date and Time . . . . . . . . . . . . . . . . . 302Chapter 16Sensational Unix Tricks . . . . . . . . . . . . . . 303Cleaning Up HTML Documents with tidy . . . . . . . . 304Searching and Replacing Throughout MultipleDocuments with sed . . . . . . . . . . . . . . . . . . . 307Generating Reports with awk . . . . . . . . . . . . . . . 310Using Input to Customize Your Environment . . . . . . . 311Using ROT13 Encoding with sed . . . . . . . . . . . . . . 313Embedding ROT13 Encoding in a Shell Script . . . . . . 315Making Backups with rsync . . . . . . . . . . . . . . . . 318Using Advanced Redirection with stderr . . . . . . . . 320Appendix A Unix and Linux Reference . . . . . . . . . . . . 323Appendix B What’s What and What’s Where . . . . . . . . . 339Appendix C Commands, Flags, and Arguments . . . . . . . 343Index . . . . . . . . . . . . . . . . . . . . . . . 384viiiTable of Contents

IntroductionGreetings, and welcome to Unix and Linux!In this book, you’ll find the information youneed to get started with the operating system, advance your skills, and make Linuxor Unix do the hard work for you. Thisbook focuses on the most common Unixand Linux commands, but it also gives youideas for working smartly and efficiently.For the purposes of this book, Unix andLinux are pretty much interchangeable—the commands and usages are the same.You may find small differences among Unixversions or between specific Unix or Linuxversions, but they’ll be small indeed.How Do You UseThis Book?We designed this book to be used as botha tutorial and a reference. If you’re a Unixnewbie, you should start at the beginningand work forward through the first severalchapters. As you progress through thechapters, you’ll build on concepts and commands you learned in previous chapters.Then, as you become more proficient, youcan start choosing topics, depending onwhat you want to do. Be sure to referencethe table of contents, the index, and theappendixes to find information at a glance.The commands used throughout this bookapply to any version of Unix (or Linux)you might be using, including Solaris,OpenIndiana, BSD, Linux (any or all), AIX orHP-UX, your OS X or Linux system at home,or any other flavor (that’s the technicalterm) you can find. Heck, you can evenrun something very Unix-like from yourWindows system with Cygwin. Or you canrun the Unix or Linux of your choice underVirtualBox, VMWare, or other virtualizationprograms. You’ll find more about flavors andgetting access to Unix or Linux in Chapter 1.By the way, if you’re looking around on theInternet for information, you’ll find that anumber of people sidestep the awkwarddiscussion of various flavors of Unix andLinux by using the term Un*x. That seemsa little too geeky, even for us, so we optedout of that one. (Un*x sidesteps a perceived issue of trademark enforcementwith the specific name Unix and managesto convey the “and Linux too, when it’s likeIntroductionix

Unix” concept as well. Useful, but geeky. Inthis book, we’ll stick to Unix and Linux.)Each chapter covers several topics, each ofwhich is presented in its own section. Eachsection begins with a brief overview of thetopic, often including examples or descriptions of how or when you’d use a command.Next, you’ll find a step-by-step list (or acouple of them) to show you how to complete a process. Note that the code youtype appears as the numbered step, and adescription follows it, like this:1. The code you type will appear like this,in a blocky font.An explanation will appear like this, ina regular font. Here, we often describewhat you’re typing, give alternatives,or provide cross-references to relatedinformation.If a line of code in a numbered step isparticularly long, the code might wrap to asecond line. Just type the characters shown,without pressing e until the end of thecommand. Also, in code listings throughoutthe book, a single line of code onscreenmight wrap to two lines in the book. If thishappens, the continued line will start with anarrow, so it might look like this:The beginning of the code starts here, but it continues on this line.Sometimes you’ll have to press a specialkey or key combination—like c C, whichmeans to hold down the c key andpress C. We’ll use this special keyboardfont for these keys, but not for letters ornumbers or symbols you might type.Finally, most sections end with a couple ofhandy tips. Look here for ways to combineUnix and Linux commands, suggestionsfor using commands more efficiently, andideas for finding out more information.xIntroductionWho Are You?We assume that you’ve picked up thisbook because you already have a need foror an interest in learning to use Unix or anyUnix-like operating system, such as Linux,OpenIndiana, OS X, BSD, HP-UX, AIX,Solaris, or others.Reasons and places to use Unix or Linuxabound. Have an Android phone? Linuxinside. How about a Kindle Fire tablet?Linux inside. Neighbors experimenting witha Raspberry Pi device? Yup, Linux. Yourhome Wi-Fi router probably contains Linux,as does your digital cable box. Unix andLinux are everywhere (even if they’re hidden sometimes).Many techie tasks are easier if you havesome knowledge of Unix or Linux. Forexample, if you’re installing Minecraftmods, knowing how your shell promptworks makes the process smoother. Ifyou.or someone you know, that is.arerooting or flashing an Android device,knowing Linux can help there, too. And youget SuperGeek points for being able towatch movies and know that the villain isusing Unix when writing that fatally flawedprogram to conquer the world.

We assume thatnnnnYou want to know how to use Unixor Linux to do things at work, school,or home.You may or may not already have experience with Unix or Linux.You don’t necessarily have other geeky—er, techie—computer skills or experience.You want to learn to use Unix or Linuxbut probably do not want to delve intoall the arcane details about the system.In short, we assume you want to use Unix orLinux to achieve your computing goals. Youwant to know what you can do, get an ideaof the potential that a command offers, andlearn how to work smart. Very smart.You can do all these things using thisbook. Basically, all you need is access toan account or system and a goal (or goals)that you want to achieve.What Do You NeedComputer-Wise?You can learn or experiment with Unix usingvirtually any computer you might haveavailable. If you’re using a Mac with OS X,you’re all set; it’s all Unix under the hood. Ifyou have an extra computer sitting around,even something as old as a Pentium III, youcan install several different flavors of Unixor Linux, including Solaris, OpenIndiana,Ubuntu, Red Hat, or SuSE. Certainly youcan install Unix or Linux on an extra harddrive (or empty space on your current harddrive) on your regular desktop computer,and generally without affecting your existingWindows configuration.Alternatively, you can dabble in Unix lessinvasively by using an account on a systemat work or through an Internet serviceprovider. If you have a reasonably newcomputer and are concerned about notmessing up what you have, though, theeasiest options are tonnnUse Cygwin to run Unix as part of yourWindows environmentUse VirtualBox or a similar programto run Unix in a “virtual machine”as an application in your WindowsenvironmentUse a bootable Unix (Linux will be theeasiest) CD to experiment on withouthaving to install anything at all on yourcomputer (and save files to a flash driveas needed)What Do You Need toKnow to Get Started?As you get started learning Unix or Linux,keep in mind the following Unix and Linuxconventions for typing commands:nThe terminology and commands aretypically arcane, cryptic, and funnylooking. For example, the commandto list files or directories is just ls—short and cryptic. (The command ls isalso short for list, as in “list the files.”Many commands have these logicalderivations.) We’ll walk you through thecommands one step at a time so thatyou know how to read them and applythem to your own uses. Just follow thesteps in the order provided.Introductionxi

nnUnix and Linux are case sensitive, sotype commands following the capitalization used in the book.Whenever you type a command, youalso have to press e . For example, ifwe say1. funny-looking command goes hereyou’ll type the code, then press e ,which sends the command along to theUnix system.Often, we’ll tell you to press a combination of keys on the keyboard, as inc V . Here, all you do is press thec key plus the (lowercase) V key,both at the same time. Even though thekeyboard uses capital letters (and, thus,the little key icons also do in this book),you would not take the extra step tocapitalize the V (or whatever) in applying key combinations. If you really needto press s , we’ll show you that. Some commands have flags or arguments (also called options) associatedwith them (you might think of flags asmodifiers for the command) that giveyou additional control. For example, youmight see the ls command used in variations like ls -la or ls -l -a. In eithercase, ls lists the files in a directory, theoptional -l flag specifies that you wantthe long format, and the optional -a flagspecifies all files, including hidden ones(don’t worry, we’ll go over this again!).Just keep in mind that flags and arguments are essentially options you canuse with a given command.xii IntroductionnYou can also put multiple commandson the same line. All you have to do isseparate the commands with a semicolon (;), like this:ls ; pwdwhich would list the files in the currentdirectory (ls) and find out what directory you’re in (pwd)—all in one step!So, with these things in mind, see you inChapter 1!Anything Else YouShould Know?Yup! Please feel free to send us a messageat [email protected] We welcomeyour input, suggestions, and questionsrelated to this book. Thanks, and we lookforward to hearing from you!Note to Mac UsersFor simplicity, we consistently write e(not r), c (not C), and a(not o), and we refer (not very often,though) to a Recycle Bin (not a TrashCan). No slight intended to those who donot use PCs or Windows—we just tried tokeep the complexity of the instructionsto a minimum.

4Creating andEditing FilesCreating and editing files are likely themost common tasks you’ll perform in Unixor Linux. If you’re programming, developing webpages, sending email (uh-huh,really), writing a letter, configuring yourenvironment (see Chapter 8), or just exploring the system, you’ll spend a lot of timein an editor.In this chapter, we’ll introduce you to twoof the most common editors: nano and vi.We’ll launch this chapter with a generaloverview of each, and then discuss somehow-tos of using each one. With the information presented here, you’ll be able tochoose an e

Learn Unix and Linux— the quick and easy way! VISUAL VISUAL QUICKSTARTQUICKSTART GUIDE GUIDE FOR COMPUTERS USING: Adobe Photoshop CC for Mac OS X and Microsoft Windows CATEGORY: Unix/Linux LEVEL: Beginning / Intermediate AUTHOR PHOTOS: Deborah and Eric Ray COVER IMA