UbuntuPocket Guideand Reference KeirThomas UbuntuPocketGuideandReference(PDFEdition) Version:PDF1.1 www.ubuntupocketguide.com Copyright©2009byKeirThomas Allrightsreserved. This book is distributed in two editions: as a printed book (“Print Edition”), andasaPDFcomputerfile(“PDFEdition”). NopartofthePrintEditionofthisworkmaybereproducedortransmittedin anyformorbyanymeans,electronicormechanical,includingphotocopying, recording,orbyan yinformationstorageorretrievalsystem,withouttheprior writtenpermissionofthecopyrightowner. Permission is granted to redistribute electronically the unmodified and complete computer file that comprises the PDF Edition of this work. This permissiondoesnotimpairor restricttheauthor’smoralrights,orgrantan y additionalpermissions.Withoutthepriorwrittenpermissionofthecopyright owner any or all of the following is not permitted: (i) altering, editing, or otherwisemodifyingthe filethat comprisesthe PDFEdition of thiswork;(ii) printingorpublishingthisworkinanyform(includingbutnotlimitedtopr int‐ on‐demand services); (iii) selling, retailing, or offering in exchange for any kindofcompensationthe filethatcomprises the PDF Editionof thi sworkor any of its content; (iv) redistributing some or all extracted or excerpted contentfromthiswork;(v)redistributingsomeorallcontentofth isworkina differentformat(forexamplebutnotlimitedtoHTMLorplaintext). ISBN(EAN‐13):978‐1440478291 TheUbuntu logo isaregisteredtrademarkofCanonicalLtdandisusedwith permission. Trademarked names may appear in this book. Rather than use a trademark symbol with eve ry occurrence of a trademarked name, we use th e names onlyin aneditorialfashion andto the benefit of thetrademark owner, with nointentionofinfringementofthetrademark. For information on translations and/or licensing, please email licensing@ubuntupocketguide.com. The information in this book is distributed on an “as is” basi s without warranty. Although every precaution has been taken in the preparation of this work, neither the author nor publishers shall have any liability to any personor entitywithrespectto any loss ordamagecaused orallegedto be caused directly or indirectly by the information contained in th is work. iii Contents Abouttheauthor ix Abriefintroduction xi WhatisUbuntu? xi GNU xi TheLinuxkernel xii Linuxdistros xiii WhatmakesUbuntuspecial xiii Focusondesktopusers xiv Philosophyandcommunity xiv Easeofuse xv WhatUbuntuoffers xvii Howtoreadthisbook xvii Typingcommands xviii Menuoptions xviii Whattoclick xviii Ubuntuversions xviii CHAPTERONE:InstallingUbuntu 1 Typesofinstallation 1 #1:Dual‐booting 1 #2:InstallingwithinWindows 2 #3:Virtualcomputer 2 PreparingyourPCforUbuntu 2 Ensuringenoughdiskspaceisfree 2 Defragmentingtheharddisk 3 CheckingtheWindowsfilesystemforerrors 3 GettingUbuntu 4 Choosingaversion 4 Choosingarelease 6 DownloadingUbuntu 7 CreatinganinstallCD 8 Step‐by‐step:In stallingUbuntu 9 Standard(repartitioning) 9 WithinWindows(Wubi) 13 Virtualcomputer 15 Problematicinstallations(alternateinstall) 16 GettingUbuntuontoanAppleMac 17 iv CHAPTERTWO:ConfiguringUbuntu 19 Gettingstarted 19 Keyboardandmouse/trackpad 20 Switchingkeyboardlanguages 20 Mouse 20 Graphics 21 Changingscreenresolution 21 Installingproprietarydrivers 21 Activatingdesktopvisualeffects 22 Configuringasecondmonitor 23 Changingscreenbacklighting 24 Screensaver 24 Sound 24 Gettingonline 25 Wireless 25 Wired(Ethernet) 26 Printers 27 Printingatestpage 27 Settingdefaultprintoptions 27 Managingprintjobs 28 Installinganetworkprinter 28 Removablestora ge 29 Scanners 30 Bluetooth 30 Pairing(Ubuntu8.10) 31 Pairing(Ubuntu8.04) 31 Transferringfiles 31 CHAPTERTHREE:Gettingtogripswiththedesktop 33 Loggingin 33 Wubi(Windowsinstall) 34 Dual‐boot 34 Thelayoutofthedesktop 35 Panels 35 Mainmenus 35 Iconsandapplets 36 Virtualdesktops 37 Personalizing 38 Themes 38 Fonts 38 Loginscreen 39 Configuringmenus 39 Customizingdesktopicons 40 Usefulapplications 40 v Cutting,copying,andpasting 40 Desktopsearch 41 Deskbar 41 Keyboardshortcuts 44 Addingnewusers 44 Makingprogramsstartautomatically 46 Dealingwithcrashedprograms 47 Changingthetime&date 47 Rebootingandshuttingdown 48 CHAPTERFOUR:Usersandthefilesystem 49 HowUbuntuhandlesfiles 49 Paths 49 Mounting 50 File&foldernames 50 Importantfilesystemlocations 51 Hiddenfilesandfolders 52 Fileextensions 53 Understandingusers 54 Rootuser 54 Filepermissions 54 Nautilus:Anoverview 56 Day‐to‐dayfilemanagement 61 Linksandlaunchers 61 Bookmarks 62 Tabbedbrowsing 62 Searchingforfiles 64 Specialbrowsinglocations 64 FileAssociations 64 Filecompression 65 CHAPTERFIVE:Hands‐onatthecommand‐line 67 Allabouttheshell 67 bashedabout 67 ToDOSornottoDOS 68 Understandingtheprompt 68 Startingacommand‐linesession 68 Knowingwhoyouare 69 Knowingwhereyou’rebrowsing 69 Howcommandswork 70 Arguments 70 Commandoptions 71 Complexfilenames 72 Relativeandabsolutepaths 72 Runningprograms 74 vi Usefuleverydaycommands 75 Workingwithrootpowers 77 Usingsudo 77 Temporarilyswitchingtoroot 77 Enablingrootlogin 77 Filepermissionsindepth 78 Thebasics 78 Executepermission 79 Folderpermissions 79 Whatpermissionslooklike 81 Changingownershipsandpermissions 83 bashproductivitytricks 87 Keyboardshortcuts 87 Commandhistory 88 Jobmanagement 89 Managingprocesses 90 Workingwithcompressedfiles 91 Zipfiles 91 tararchives 92 Advancedbashtechniques 94 Redirection 94 Piping 95 Braceexpansion 95 Wildcards 96 CHAPTERSIX:Softwaremanagement 97 Allaboutpackagemanagement 97 What’sinapackage? 97 APTanddpkg 98 Softwarerepositories 98 Dependencymanagement 99 Synaptic:Anoverview 101 Typicaltasks 103 Installingsoftware 103 Uninstallingsoftware 105 Reinstallingsoftware 105 Manuallyinstallingapackage 106 Command‐linesoftwaremanagement 108 Installingsoftware 108 Uninstallingsoftware 110 Reinstallingsoftware 110 Manuallyinstalling/uninstallingpackages 110 Workingwithrepositories 112 Addingarepository 112 Addinganewrepositorykey 113 Compilingfromsourcecode 113 vii CHAPTERSEVEN:Securingthesystem 115 Systemupdates 115 UpdateManager 115 Updatingatthecommand‐line 116 Configuringthefirewall 117 InstallingandconfiguringFirestarter 117 Creatinginboundrules 118 Creatingoutboundrules 120 Turningoffdiagnostictoolresponses 121 Installingantivirus 121 InstallingClamTK 122 Scanningforviruses 122 Encryptingfilesandfolders 123 Creatinganencrypted /privatefolder 124 Encryptingindividualfilesandfolders 125 Enhancingwebbrowsersecurity 127 Enablingamasterpassword 128 Avoiding“executablecontent”attacks 129 APPENDIXA:Glossaryofterms 131 APPENDIXB:Learningmoreandgettinghelp 141 Booksandmagazines 141 Onlinehelp 142 Forums 142 Mailinglists 143 Built‐indocumentation 143 Understandingmanpages 143 READMEsandotherdocumentation 146 Index 147 ix Abouttheauthor Keir Thomas is the one of the world’s most prolific authors writing about Ubuntu Linux. Ubuntu Pocket Guide and Reference is his third Ubuntu book, and his award-winning comprehensive guide to Ubuntu—Beginning Ubuntu Linux (ISBN 978-1590599914)—recently reached a third edition. Thomas is also the author of Ubuntu Kung Fu (ISBN 978-1934356227), a unique book containing over 300 tips, tricks, hints, and hacks for Ubuntu. It regularly tops the Amazon.com best-seller list in the Linux category. He has written books on the subjects of SUSE and Fedora Linux, and edited books on subjects ranging from enterprise e-commerce to Ruby programming. In a previous life he edited several top-selling computer magazines, including PC Utilities and Linux User & Developer, and has written for many more. He lives in the United Kingdom and his pastimes include hiking, cycling, and gardening. He wishes to thank the technical reviewers of this book: John Southern, Matthew Helmke, and Ryan Troy. 10 Ifyou likeUbuntu PocketGuideandRefe rence, whynotgetthe PRINTEDITION? Only $ 9.94fromAmazon.com AddittoyourAmazonordernow! Other books by Keir Thomas… UbuntuKungFu ThePragmaticProgrammers ISBN978‐1934356227 Over300tips,tricks, hints,andhac ksforthe world’sfavoriteLinux. BeginningUbuntu Linux, ThirdEdition/Apr ess ISBN978‐1590599914 Comprehensive,award‐ winningguide.Fromzero toheroinover700pages! [...]... system to your own tastes and needs TIP Ubuntu works well on older hardware. The minimum realistic requirements for Ubuntu 8.04 are a 700MHz processor, 384MB of memory, and 8GB of disk space. You might consider installing Ubuntu on an older PC to evaluate it, before installing it on your day‐to‐day computer. How to read this book Ubuntu Pocket Guide and Reference is concise... #1: Dual-booting If you intend to switch to Ubuntu full-time, installing Ubuntu by repartitioning your computer’s hard disk is best This involves shrinking the existing Windows partition and creating new partitions alongside for Ubuntu Following this, Ubuntu is installed and a menu added so you can choose between Ubuntu and Windows at boot-time Having Ubuntu and Windows side-by-side on a PC is called... the Internet, it got named after him and became known as Linux—a hybrid of “Linus” and “Unix” Crucially, Torvalds chose to release his kernel as Free Software, and invited any interested party to give him a hand They did Thousands of people around the world got involved As the years went by, the project became more and more important, and grander in its design and outlook Today, the Linux kernel receives... more about the Ubuntu philosophy at www .ubuntu. com/community/ubuntustory/philosophy, and read more about the Free Software Foundation’s principles at www.gnu.org/philosophy/free‐sw.html. What Ubuntu represents is freedom—freedom to use and share the software, to do what you want with it, and to learn The community The Ubuntu community arose directly out of the Ubuntu philosophy Put... editing and creation software See http://ubuntustudio.org similar to Gnome but tends to offer more configuration options It might be argued that Kubuntu is popular with power users Kubuntu differs from Ubuntu in that it uses Konqueror for Web browsing and Kontact for email/PIM (although Firefox and other Ubuntu standard programs can be installed) There are a handful of other key differences too, particularly... easy virtual computing, and is ideal for trialing Ubuntu Here are the steps required: 1 Head over to www.vmware.com/products/player and download VMware Player Install it once downloaded Then head over to www.ubuntupocketguide.com/vmware.html and download an empty virtual computer container zip file 2. Extract the contents of the virtual computer zip into a new folder and copy the Ubuntu ISO image file... explanations, so is perhaps the best choice at this stage. Kubuntu: This is a version of Ubuntu that uses the KDE desktop environment (www.kde.org) instead of Gnome KDE is mostly 4 : Installing Ubuntu Table 1‐1. Ubuntu derivatives. Ubuntu version Details Edubuntu Includes educational software and a child-friendly user-interface Intended for use in educational environments See www.edubuntu.org for more information Gobuntu... information, see www .ubuntu. com/products/whatisubuntu/serve redition Mobile and Embedded Designed for devices—for handheld more and ultra-portable information, see www .ubuntu. com/products/mobile MythBuntu Features the MythTV digital video recording software For details of MythBuntu, see www.mythbuntu.org For details of MythTV, see www.mythtv.org Ubuntu Studio Includes multimedia editing and creation software... It’s published by Apress (June 2008; ISBN 9781590599914) and provides a complete guide to Ubuntu xvii Figure i‐1. Checkboxes and radio buttons. Typing commands Sometimes I might ask you type something at the command-line Usually this will appear on a line of its own, like this: mv /home/keir/Desktop/report.doc /home/keir Some commands are long and won’t fit on a single line of the page If this is... tools, although the underlying system is still 100% Ubuntu NOTE Versions of Kubuntu prior to 8.04 used the older v3 series of KDE releases. 8.04 was released in both v3 and the newer experimental v4 series, but from 8.10 onwards, Kubuntu has standardized entirely on the v4 series. Installing Ubuntu : 5 Xubuntu: This version of Ubuntu is based on the Xfce desktop environment (www.xfce.org) . Ubuntu Pocket Guide and Reference KeirThomas Ubuntu Pocket Guide and Reference (PDFEdition) Version:PDF1.1 www.ubuntupocketguide.com Copyright©2009byKeirThomas Allrightsreserved. This. prolific authors writing about Ubuntu Linux. Ubuntu Pocket Guide and Reference is his third Ubuntu book, and his award-winning comprehensive guide to Ubuntu Beginning Ubuntu Linux (ISBN 978-1590599914)—recently. partition and creating new partitions alongside for Ubuntu. Following this, Ubuntu is installed and a menu added so you can choose between Ubuntu and Windows at boot-time. Having Ubuntu and Windows