Learn Linux in a Month of Lunches STEVEN OVADIA MANNING SHELTER ISLAND ii For online information and ordering of this and other Manning books, please visit www.manning.com. The publisher offers discounts on this book when ordered in quantity. For more information, please contact Special Sales Department Manning Publications Co. 20 Baldwin Road PO Box 761 Shelter Island, NY 11964 Email: [email protected] ©2017 by Manning Publications Co. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps. Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end. Recognizing also our responsibility to conserve the resources of our planet, Manning books are printed on paper that is at least 15 percent recycled and processed without elemental chlorine. Manning Publications Co. Development editor: Frances Lefkowitz 20 Baldwin Road Technical development editor: Gary Park PO Box 761 Copyeditor: Benjamin Berg Shelter Island, NY 11964 Proofreader: Elizabeth Martin Technical proofreader: Mayur Patil Typesetter: Marija Tudor Cover designer: Leslie Haimes ISBN: 9781617293283 Printed in the United States of America 1 2 3 4 5 6 7 8 9 10 – EBM – 21 20 19 18 17 16 brief contents PART 1 GETTING LINUX UP AND RUNNING ............................... 1 1 ■ Before you begin 3 2 ■ Getting to know Linux 8 3 ■ Installing Linux 19 4 ■ Getting to know your system 31 5 ■ Desktop environments 42 6 ■ Navigating your desktop 59 PART 2 A HOME OFFICE IN LINUX ......................................... 79 7 ■ Installing software 81 8 ■ An introduction to Linux home/office software 98 9 ■ Text files and editors 114 10 ■ Working with files and folders on the command line 125 11 ■ Working with common command-line applications, part 1 133 12 ■ Working with common command-line applications, part 2 143 13 ■ Using the command line productively 151 14 ■ Explaining the Linux filesystem hierarchy 162 iii iv BRIEF CONTENTS 15 ■ Windows programs in Linux 171 16 ■ Establishing a workflow 180 PART 3 HOME SYSTEM ADMIN ON LINUX ............................. 193 17 ■ An in-depth look at package management and maintenance 195 18 ■ Updating the operating system 205 19 ■ Linux security 215 20 ■ Connecting to other computers 229 21 ■ Printing 240 22 ■ Version control for non-programmers 251 23 ■ Never the end 263 contents foreword xiii preface xiv acknowledgments xvi about this book xviii PART 1 GETTING LINUX UP AND RUNNING ................... 1 1 Before you begin 3 1.1 Why Linux matters 3 1.2 Is this book for you? 4 1.3 Using this book 5 The main chapters 5 ■ Hands-on labs 5 ■ Further exploration 6 1.4 Setting up your lab environment 6 1.5 Online resources 7 1.6 Being immediately effective with Linux 7 2 Getting to know Linux 8 2.1 Distributions 8 2.2 Ubuntu 10 Debian 10 ■ Fedora 12 ■ Linux Mint 13 v vi CONTENTS Arch 14 ■ Other distributions 14 2.3 Choosing a distribution 15 2.4 Repositories 16 2.5 The Linux kernel 17 2.6 Wrapping up 18 2.7 Lab 18 3 Installing Linux 19 3.1 Live vs. installation 20 3.2 Creating a Linux boot image 20 3.3 Burn the image to DVD 21 3.4 Install the image to USB 21 3.5 Boot from the image 23 Installation preparation 24 ■ Installation type 25 Where are you? 26 ■ Keyboard layout 26 ■ Who are you? 27 3.6 Common issues 28 3.7 Purchasing hardware with Linux installed 28 3.8 Wrapping up 29 3.9 Lab 29 4 Getting to know your system 31 4.1 Identifying hardware 32 4.2 Drivers 34 4.3 Codecs 37 4.4 Using log files 37 4.5 Finding help 39 4.6 Wrapping up 41 4.7 Lab 41 5 Desktop environments 42 5.1 Desktop environments 43 5.2 GNOME 44 Interface 44 ■ Customizing 46 ■ Software 47 5.3 KDE 47 Interface 47 ■ Customizing 47 ■ Software 51 CONTENTS vii 5.4 Unity 52 Interface 52 ■ Customizing 53 ■ Software 53 5.5 Xfce 53 Interface 53 ■ Customizing 54 ■ Software 54 5.6 Choosing a desktop environment 55 5.7 Wrapping up 57 5.8 Lab 57 6 Navigating your desktop 59 6.1 Working with programs 59 Finding programs 59 ■ Launching programs 62 ■ Closing programs 63 ■ Top menu bars 63 ■ Customizing your dock 64 6.2 Working with files and folders 66 Creating folders 66 ■ Creating files 68 ■ Opening files 68 Moving folders and files 71 ■ Copying folders and files 73 Deleting folders and files 74 ■ Changing the look of the folders and files 75 6.3 Wrapping up 76 6.4 Lab 77 PART 2 A HOME OFFICE IN LINUX .............................. 79 7 Installing software 81 7.1 Package managers 82 7.2 Ubuntu Software Center 84 7.3 Synaptic 91 7.4 Wrapping up 96 7.5 Lab 96 8 An introduction to Linux home/office software 98 8.1 Office/productivity 99 LibreOffice 99 ■ Calligra 101 ■ Email clients 102 Choosing your office program(s) 104 8.2 Image editing 105 GIMP 105 ■ LibreOffice Draw 108 viii CONTENTS 8.3 Multimedia 109 Movies 109 ■ Music 110 8.4 Wrapping up 112 8.5 Lab 112 9 Text files and editors 114 9.1 Getting to know text editors 115 gedit 115 ■ Vim 116 ■ Emacs 118 9.2 Working with text editors 120 Writing with text editors 120 ■ Going under the hood with text files 121 9.3 Wrapping up 122 9.4 Lab 123 10 Working with files and folders on the command line 125 10.1 Working with files and folders 126 Creating folders 127 ■ Creating files 128 ■ Copying folders and files 128 ■ Moving folders and files 130 Deleting folders and files 131 10.2 Wrapping up 131 10.3 Lab 132 11 Working with common command-line applications, part 1 133 11.1 top 133 11.2 Kill commands 137 xkill 137 ■ killall 138 11.3 wget 139 11.4 grep 140 11.5 Wrapping up 141 11.6 Lab 142 12 Working with common command-line applications, part 2 143 12.1 su and sudo for administrative tasks 143 su 144 ■ sudo 144 12.2 Installing and removing software with the command line 145 CONTENTS ix 12.3 Read the manual with the man command 147 12.4 Grow commands with pipes and redirects 148 12.5 Wrapping up 149 12.6 Lab 150 13 Using the command line productively 151 13.1 Alternative terminal interfaces 151 Guake 152 ■ Terminator 154 13.2 Customizing the terminal 156 13.3 Saving time in the terminal 159 Last command(s) 159 ■ history command 159 ■ Searching commands 160 ■ Autocompleting commands 160 Copying and pasting 160 13.4 Wrapping up 161 13.5 Lab 161 14 Explaining the Linux filesystem hierarchy 162 14.1 /home 162 14.2 / (root) 166 14.3 /usr, /bin, and /sbin 167 14.4 /etc 167 14.5 /tmp 169 14.6 Wrapping up 169 14.7 Lab 170 15 Windows programs in Linux 171 15.1 Virtualization 172 15.2 Wine: using Windows without full-blown virtual machines 175 Winetricks 177 15.3 Wrapping up 179 15.4 Lab 179 16 Establishing a workflow 180 16.1 File/application launchers 181 GNOME Do 181 ■ Kupfer 185
Description: