Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Beginning Ubuntu Linux - From Novice To Professional (2006)

.pdf
Скачиваний:
67
Добавлен:
17.08.2013
Размер:
25.54 Mб
Скачать

Beginning Ubuntu Linux

From Novice to Professional

■ ■ ■

Keir Thomas

Beginning Ubuntu Linux: From Novice to Professional

Copyright © 2006 by Keir Thomas

All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher.

ISBN-13 (pbk): 978-1-59059-627-2

ISBN-10 (pbk): 1-59059-627-7

Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1

Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.

Lead Editor: Jason Gilmore Technical Reviewer: John Hornbeck

Editorial Board: Steve Anglin, Dan Appleman, Ewan Buckingham, Gary Cornell, Jason Gilmore, Jonathan Hassell, James Huddleston, Chris Mills, Matthew Moodie, Dominic Shakeshaft, Jim Sumser, Matt Wade

Project Manager: Sofia Marchant

Copy Edit Manager: Nicole LeClerc Copy Editor: Marilyn Smith

Assistant Production Director: Kari Brooks-Copony Production Editor: Ellie Fountain

Compositor: Susan Glinert

Proofreader: Kim Burton

Indexer: Broccoli Information Management Artist: Kinetic Publishing Services, LLC Cover Designer: Kurt Krames Manufacturing Director: Tom Debolski

Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail orders-ny@springer-sbm.com, or visit http://www.springeronline.com.

For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219, Berkeley, CA 94710. Phone 510-549-5930, fax 510-549-5939, e-mail info@apress.com, or visit http://www.apress.com.

The information in this book is distributed on an “as is” basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
. . . . . . . . . . . . . . . . 161
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
. . . . . . . . . . . . . . . . . . . . . . . . . . . 77

Contents at a Glance

About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii About the Technical Reviewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvii Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxix

PART 1 ■ ■ ■ Introducing the World of Linux

CHAPTER 1

Welcome! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. 3

CHAPTER 2 A History and Politics Lesson . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11

CHAPTER 3 The Realities of Running Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

19

PART 2 ■ ■ ■ Installing Ubuntu

 

CHAPTER 4

Preinstallation Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

25

CHAPTER 5

Installing Ubuntu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

33

CHAPTER 6

Solving Installation Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

47

PART 3 ■ ■ ■ The No-Nonsense

Getting Started Guide

CHAPTER 7 Booting Ubuntu for the First Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

CHAPTER 8 Getting Everything Up and Running

CHAPTER 9 How to Secure Your Computer

CHAPTER 10 Personalizing Ubuntu: Getting Everything Just Right . . . . . . . . . . 139

CHAPTER 11 Ubuntu Replacements for Windows Programs

CHAPTER 12 Managing Your Files

iii

PART 4 ■ ■ ■ The Shell and Beyond

CHAPTER 13 Introducing the BASH Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203

CHAPTER 14 Understanding Linux Files and Users . . . . . . . . . . . . . . . . . . . . . . . . 219

CHAPTER 15 Working with Text Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241

CHAPTER 16 Taking Control of the System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257

CHAPTER 17 Cool Shell Tricks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267

PART 5 ■ ■ ■ Multimedia

 

CHAPTER 18

Digital Music . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

279

CHAPTER 19

Movies and Multimedia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

291

CHAPTER 20

Image Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

301

PART 6 ■ ■ ■ Office Tasks

CHAPTER 21 Making the Move to OpenOffice.org . . . . . . . . . . . . . . . . . . . . . . . . . . 319

CHAPTER 22 OpenOffice.org Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329

CHAPTER 23 In Depth: Writer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343

CHAPTER 24 In Depth: Calc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355

CHAPTER 25 In Depth: Impress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363

CHAPTER 26 In Depth: Base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373

CHAPTER 27 In Depth: Evolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383

CHAPTER 28 Running Microsoft Office Under Ubuntu . . . . . . . . . . . . . . . . . . . . . . 401

PART 7 ■ ■ ■ Keeping Your System Running

CHAPTER 29

Installing Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

413

CHAPTER 30

Managing Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

435

CHAPTER 31 Optimizing Your System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

443

CHAPTER 32

Backing Up Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

463

CHAPTER 33

Scheduling Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

473

CHAPTER 34 Accessing Computers Remotely . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

479

iv

APPENDIX A Glossary of Linux Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493

APPENDIX B BASH Command Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515

APPENDIX C Getting Further Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529

APPENDIX D Other Versions of Ubuntu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537

INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541

v

Contents

About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii About the Technical Reviewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvii Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxix

PART 1 ■ ■ ■ Introducing the World of Linux

CHAPTER 1 Welcome! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3

What Is Linux? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 The Age of Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 The Problems with Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 The Benefits of Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Crash-Free. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Free and Shareable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Compatible with Older Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

The Linux Community . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

CHAPTER 2 A History and Politics Lesson . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11

In the Beginning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

The GNU Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Proprietary Software and the GPL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

GNU and Linux Together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Different Flavors of Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Linux Today . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

Modern Linux Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

vii

viii

C O N T E N T S

 

 

CHAPTER 3 The Realities of Running Linux . . . . . . . . . . . . . . . . . . . . . . . . . . .

19

Learning to Use Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Who Uses Linux? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

Getting Hold of Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Using Ubuntu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

PART 2 ■ ■ ■ Installing Ubuntu

CHAPTER 4 Preinstallation Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Understanding Partitioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Freeing Up Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Reclaiming Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

Removing Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

Using Another Hard Disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

Backing Up Your Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Backing Up E-mail Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Making Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

CHAPTER 5 Installing Ubuntu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

An Overview of the Installation Process . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Step-by-Step Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

Step 1: Boot from the CD-ROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

Step 2: Select Your Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

Step 3: Confirm Your Keyboard Layout . . . . . . . . . . . . . . . . . . . . . . . 36

Step 4: Wait During Hardware and Networking Autodiscovery . . . . 37

Step 5: Set a Hostname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

Step 6: Partition the Disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

Step 7: Wait During Automated Package Copying . . . . . . . . . . . . . . 40

Step 8: Set the Time Zone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

Step 9: Set Your Real Name, Username, and Password . . . . . . . . . 41

Step 10: Install the GRUB Boot Loader . . . . . . . . . . . . . . . . . . . . . . . . 42

Step 11: Reboot for the Second Installation Phase . . . . . . . . . . . . . . 43

Step 12: Wait During Package Installation. . . . . . . . . . . . . . . . . . . . . 44

Step 13: Configure Your Monitor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

Step 14: Boot for the First Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

C O N T E N T S ix

CHAPTER 6 Solving Installation Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . .

47

Preinstallation Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Installation Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

Postinstallation Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

Graphical Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

Graphics Card Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

Keyboard and Mouse Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 55

Monitor Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

PART 3 ■ ■ ■ The No-Nonsense

Getting Started Guide

CHAPTER 7 Booting Ubuntu for the First Time . . . . . . . . . . . . . . . . . . . . . . . .

63

Starting Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

Logging In . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

Exploring the Desktop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

First Impressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

Desktop Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

Quick Desktop Guides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

Running Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

Working with Virtual Desktops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

Using the Mouse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

Cutting and Pasting Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

CHAPTER 8 Getting Everything Up and Running . . . . . . . . . . . . . . . . . . . . . .

77

Ubuntu Hardware Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

Proprietary vs. Open Source Drivers. . . . . . . . . . . . . . . . . . . . . . . . . . 78

Viewing Your Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

Getting Online . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

Using an Ethernet Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

Joining a Wireless Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

Configuring Dial-Up Internet Access. . . . . . . . . . . . . . . . . . . . . . . . . . 90

Using a USB-Based DSL Modem . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

Working with a Proxy Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98