-->

Table of Contents | Next

Page 5

Index

Overview



Introduction xxvi

Part I Installation and Configuration 1

Hour 1 Preparing to Install Linux 3


2 Installing Linux 11

3 Configuring the X Window System 31

Part II Learning Linux Basics 41

Hour 4 Reading and Navigation Commands 43


5 Manipulation and Searching Commands 63

6 Using the Shell 83

7 Using the X Window System 103

8 Exploring Other X11 Window Managers 127

Part III Connecting to the Outside World 139

Hour 9 Using Communications Programs 141


10 Connecting to the Internet 161

11 Configuring Internet Email 173

12 Configuring Internet News 185

13 Internet Downloading and Browsing 193

Part IV Using Linux Productively 211

Hour 14 Text Processing 213


15 Preparing Documents 229

16 Graphics Tools 243

17 Learning Math and Financial Tools 259

18 Personal Productivity Tools 271

19 Playing Linux Games 281

Page 6

Part V Administering Your System 291

Hour 20 Basic System Administration 293


21 Handling Files 313

22 Red Hat Tools 329

23 Archiving 339

24 Scheduling 347

Index 353

Page 7

Contents

Introduction xxvi

Part I Installation and Configuration 1

Hour 1 Preparing to Install Linux 3

Taking Inventory 4

Hardware Considerations 6

Network Information 6

Creating the Installation Floppies 7

Preparing Your Hard Drive 7

Partitions and File Systems 7

Creating Space 9

2 Installing Linux 11

The Installation Program's Interface 11

Beginning the Installation 12

The First Stage 13

Keyboard Selection 14

PCMCIA Support 15

Installation Method 15

Installing from CD-ROM 16

The Second Stage 17

Selecting to Install Fresh or Upgrade 17

SCSI Support 17

Partitioning the Hard Drive 17

Activating Swap Space 22

Formatting Partitions 22

Selecting Which Components To Install 22

Format and Install 23

Finishing the Installation 23

Choosing a Mouse 24

Configuring X Window 24

Network Configuration 24

Setting the Time Zone 25

Selecting Which Services to Start 25

Selecting a Printer 26

Entering Your Initial Password 27

Selecting Boot Options 28

Booting the System 29

3 Configuring the X Window System 31

Checking Your Installation Files 32

Installing the X Files 33

Page 8

Using Xconfigurator to Set Up X Window 34

Selecting Your Monitor 35

Final Server Configuration 36

Testing the X Settings 37

Common Problems and Their Solutions 38

Having Your Machine Always Start in X Window 39

Part II Learning Linux Basics 41

Hour 4 Reading and Navigation Commands 43

Getting Help with the man Command 43

Navigating and Searching the File System 46

Moving to Different Directories with the cd Command 46

Knowing Where You Are with the pwd Command 46

Searching Directories for Matching Files with the find Command 47

Finding Files with the whereis Command 48

Locating Files with the locate Command 48

Getting Command Summaries with whatis and apropos 49

Reading Directories and Files 51

Listing Directories with the ls Command 51

Listing Directories with the dir and vdir Commands 54

Graphic Directory Listings with the tree Command 54

Listing and Combining Files with the cat Command 56

Reading Files with the more Command 58

Browsing Files with the less Command 59

Reading the Beginning or End of Files with the head and tail
Commands 59

5 Manipulation and Searching Commands 63

Manipulating Files or Directories 63

Creating Files with the touch Command 64

Deleting Files with the rm Command 64

Creating Directories with the mkdir Command 66

Removing Directories with the rmdir Command 66

Renaming Files with the mv Command 68

Copying with the cp Command 69

Creating Hard and Symbolic Links
with the ln Command 71

Handling Files with the Midnight Commander Program 72

Searching Files 73

What Are Regular Expressions? 74

Searching Inside Files with the grep Commands 75

Compressing and Uncompressing Files 77

Creating Archives with the Tape Archive Command 77

Creating cpio Archives 80

Compressing Files with the gzip Command 80

Compressing Files with the compress Command 81

Page 9

6 Using the Shell 83

What Is a Shell? 83

What Shells Are Available? 84

Features of ash 85

Features of the Default Linux Shell—bash 85

The Public Domain Korn Shell—ksh 86

Features of the csh-Compatible Shell—tcsh 87

zsh 87

Understanding the Shell Command Line 88

Customizing Your Shell 90

Running Programs in the Background 94

How to Use Pipes 96

Building Shell Commands 98

7 Using the X Window System 103

X11 Window Managers 104

Configuring the fvwm2 Window Manager 104

Configuring the fvwm Window Manager 108

Configuring the twm Window Manager 109

X11 Terminal Programs 110

Changing the nxterm Terminal Settings 110

Using the Memory-Efficient rxvt Terminal 111

Learning X11 Basic Operations 112

Using X11 Client Geometry Settings 112

Setting Background and Foreground Colors for X11 Clients 113

Setting X11 Client Resources 114

Changing X11 Mouse and Cursor Modes 115

How to Copy and Paste in X11 116

Capturing and Dumping X11 Windows 117

Customizing the X11 Root Window and Using Screensavers 118

Exploring X11 Programs 122

Listing X11 Fonts with xlsfonts 122

Getting Window Information with the xwininfo Client 123

Making a Sticky Note Calendar with the xmessage Client 124

Keeping Time with X11 Clocks 124

8 Exploring Other X11 Window Managers 127

Obtaining, Installing, and Configuring Other Window Managers 128

The Motif Window Manager 128

Installing and Using the LessTif mwm Window Manager 130

Starting the Common Desktop Environment 130

Obtaining, Building, and Installing KDE 132

Installing the Enlightenment Window Manager 135

Emulating Other Desktops with the mlvwm Window Manager 136

Using the Simplest Window Manager, wm2 137

Page 10

Part III Connecting to the Outside World 139

Hour 9 Using Communications Programs 141

Setting Up and Testing Your Modem 142

Creating /dev/modem with the modemtool Command 144

Dialing Out with Communications Programs 144

Setting Up and Calling Out with minicom 144

Setting Up and Calling Out with the seyon X11 Client 146

Setting Up Your Linux System for Dialing In 148

Sending and Receiving Faxes 150

Faxing with the efax System 150

Sending Fax Documents with mgetty+sendfax 155

10 Connecting to the Internet 161

Hardware You'll Need 162

Linux Software You'll Need 163

Information You'll Need from Your ISP 163

Setting Up a PPP Connection 164

Editing the resolv.conf File 165

Editing the PPP Connection Scripts 165

Starting and Stopping PPP Connections 167

Using minicom to Connect 167

Using Your ppp-on Script to Connect 168

Checking the Connection 169

11 Configuring Internet Email 173

Setting Up and Getting Your Email 173

Retrieving Your Email with popclient 174

Using fetchmail as an Alternative 175

Sending Mail with Mail Programs 175

Using the mail Program 175

Configuring and Using the pine Mail Program 177

Configuring and Using the elm Mail Program 179

Subscribing to Mailing Lists 180

Configuring procmail and Writing Recipes to Fight Spam 181

12 Configuring Internet News 185

Reading Usenet News 185

Reading Usenet News with the tin Newsreader 187

Reading Usenet News with the slrn Newsreader 189

13 Internet Downloading and Browsing 193

Using File Transfer Protocol Programs to Get Files 194

Retrieving Files with the ftp Command 194

Downloading with the ncftp Command 199

Browsing the World Wide Web with Linux Browsers 201

Fast Browsing with the Lynx Command 201

Browsing with the Arena Browser 202

Browsing with the Red Baron Browser 203

Page 11

Exploring Unique Features of the Grail Browser 203

Getting the Mosaic Browser 204

Setting Up and Downloading with Netscape Communicator 205

Chatting with Internet Relay Chat 207

Connecting with Other Computers with the telnet Command 208

Part IV Using Linux Productively 211

Hour 14 Text Processing 213

Word Processors in the Linux Environment 213

Features of the emacs Environment 214

Variants of the Visual Editor Improved—vim 217

Features of Pine's pico Editor 218

Five Editors in One—joe 219

Configuring the jed Editor 220

Changing Text with sed and Other Filters 220

Applix Words 224

Spell Checking Your Documents 225

Correcting Documents with the ispell Command 226

Single Word Lookup and Other Tricks 227

15 Preparing Documents 229

Formatting Text 229

Formatting Text Using Text Filters 230

Formatting Text with the groff Formatter 232

Formatting Text with TeX 235

Printing Text Documents 237

Printing Documents with the lpr Printing System 238

Defining Printers with the printtool Command 240

16 Graphics Tools 243

Understand Linux Graphics File Formats 243

Converting and Viewing Graphics 248

Graphic Editing with GIMP 249

Graphics Editing with ImageMagick 251

Using the xv Command to View Graphics 253

Using the gv Command to View PostScript Files 254

Painting and Drawing with xpaint and xfig 255

A Word About Scanners 256

17 Learning Math and Financial Tools 259

Calculators 260

Doing Desk Calculations with the dc Command 260

Calculating with the X11 xcalc Client 261

Three Calculators in One: dtcalc 261

Performing Unit Conversions with the units Command 262

Programming Calculators with the bc Language Interpreter 263

Spreadsheets 264

Using the Public Domain sc Spreadsheet 264

Plotting Graphics with the X11 xspread Spreadsheet 266

Page 12

Finding and Using the teapot Spreadsheet 266

Finding and Using the Shareware Wingz Spreadsheet 267

Commercial Features of the Applixware Spreadsheet Program 268

Using gnuplot to Graph Mathematical Formulas 269

Tips 270

18 Personal Productivity Tools 271

Scheduling Personal Reminders and Tasks with the at Command 272

Scheduling Regular Reminders with the crontab Command 274

Creating Appointment Reminders with the X11 ical Client 276

Checking the Calendar and Keeping Appointments with emacs 278

19 Playing Linux Games 281

Playing Music CDs with the cpd and xplaycd Commands 282

Games for the Console 284

Playing Emacs Games 285

Games for the X Window System 286

Playing Chess with the xboard Client 286

Playing X11 Solitaire 287

Playing Backgammon for X11 287

Playing Galaga for X11 288

Breakout the Fun with the X11 Client Xboing 289

Playing DOOM for X Window 289

Part V Administering Your System 291

Hour 20 Basic System Administration 293

Running as the Root Operator with the su Command 294

Getting Disk Space Information 295

Getting Filesystem Statistics with the df Command 296

Getting Filesystem Disk Usage with the du Command 297

Checking Symbolic Links with the stat Command 299

Saving Disk Space 299

Getting Memory Information 301

Memory Reporting with the free Command 301

Virtual Memory Reporting with the vmstat Command 302

Viewing Your Shell's "Ulimit"ations 302

Reclaiming Memory with the kill Command 303

Getting System Load Information with the top and xload
Commands 304

Determining How Long Linux Has Been Running with the
uptime and w Commands 306

Getting Network and Mail Information with the pppstats and
mailstat Commands 306

Monitoring Your Serial Ports with the statserial Command 307

Managing User Access 307

Creating Users with the adduser Command 307

Changing Passwords in /etc/passwd with the passwd Command 308

Restricting Logins 310

Setting Disk Quotas 311

Page 13

21 Handling Files 313

How Linux Is Organized 314

Using the mount Command to Access Other Filesystems 315

Understanding the Filesystem Table,
/etc/fstab 316

Formatting a Floppy 318

The mtools Package 320

Managing File Ownership and Permissions 322

Understanding Linux File Types 322

Reading File Permissions Flags 323

Changing File Permissions with the chmod Command 324

Changing File Ownership with the chown Command 326

Changing Groups and Ownerships with the chgrp and newgrp
Commands 327

22 Red Hat Tools 329

Configuring Your System with the Control-Panel 329

Creating and Maintaining Users with the usercfg Command 330

Managing System Services with the tksysv Command 331

Setting the System Time with the timetool Command 332

Creating Printers with the printtool Command 332

Configuring your Network Services with the netcfg Command 332

Creating a Symbolic Modem Link with the modemtool Command 333

Kernel Configuration with the kernelcfg Command 333

Using the glint and rpm Commands 334

Finding Help with the helptool Command 335

Configuring Your System with the setup Command 336

Maintaining Your Filesystem with the cabaret Command 337

Probing Your Mouse with the mouseconfig Command 337

Installing Sound Service with the sndconfig Command 337

Setting the System Time with the timeconfig Command 338

Configuring X11 with Xconfigurator 338

23 Archiving 339

Considerations Before Performing Backups and Restores 339

Backing Up Your System with the tar Command 341

Using the cpio Command to Backup and Restore 342

Using the taper Script for Tape Drive Backups and Restores 343

Configuring the BRU Backup System for Backups and Restores 344

24 Scheduling 347

Using the cron Daemon 347

Managing User cron Scheduling 348

Setting Schedules with the crontab Command 349

Managing User Scheduling with the atrun Command 350

Index 353

Page 16

Introduction

Welcome to Linux! You hold in your hands everything you need to install and use one of the most powerful computer operating systems in the world. This book is designed to help guide you through the process of learning about Linux.

Although the title of this book is Sams' Teach Yourself Linux in 24 Hours, you won't be alone while you learn. As you're taken from installation through system administration to playing games, you'll find advice, tips, and hints to help you along the way. Before you know it you'll be familiar with the terms, topics, and technical concepts dealing with the hottest and newest operating system in the world—Linux!

This book is designed to help you learn quickly. You'll find it an indispensable guide to installing Linux and getting right to work. This book helps you overcome technical obstacles, explains complex subjects in simple language, and shows you some neat tricks to make your computing experience easier.

Each section of this book gives you an hour's worth of knowledge and examples that you can run as you learn. By the way, you should know that this book was created, developed, and edited using the software included on the book's CD-ROM. We hope you enjoy teaching yourself Linux!

What is Linux?

Linux (pronounced Lih-nucks) is a UNIX-like operating system that runs on many different computers. Although many people might refer to Linux as the operating system and included software, strictly speaking, Linux is the operating system kernel, which comes with a distribution of software.

Linux was first released in 1991 by its author Linus Torvalds at the University of Helsinki. Since then it has grown tremendously in popularity as programmers around the world embraced his project of building a free operating system, adding features, and fixing problems.

Linux is popular with today's generation of computer users for the same reasons early versions of the UNIX operating system enticed fans more than 20 years ago. Linux is portable, which means you'll find versions running on name-brand or clone PCs, Apple Macintoshes, Sun workstations, or Digital Equipment Corporation Alpha-based computers. Linux also comes with source code, so you can change or customize the software to adapt to your needs. Finally, Linux is a great operating system, rich in features adopted from other versions of UNIX. We think you'll become a fan too!

Page 17

Why Teach Yourself Linux?

You should teach yourself Linux for a number of good reasons. You'll expand your knowledge of your computer's hardware, which can be handy in troubleshooting problems. You'll also learn the basics of using a UNIX-like operating system loaded with state-of-the-art features. When you combine this knowledge of hardware and software, you'll be well on your way to becoming a power computer user.

You can use this book as a starting point in learning Linux basics. You'll learn all the skills needed to build and run a powerful and productive Linux workstation. While you won't learn how to program in Java, administer a network, or manage a Web server, you will learn that

Who Should Use This Book?

This book is for someone who wants to quickly master the basics of how to install, run, and maintain Linux on an Intel-based personal computer. All of the tools you need are included.

Your computer should have a monitor, or display, keyboard, mouse, hard drive, floppy drive, and CD-ROM drive. Although you can jump right in and install Linux onto your hard drive, you should have some technical information about your computer and its hardware on hand before you start.

What's Included on the CD-ROM?

Everything you need! Included with this book is a CD-ROM, from Red Hat Software, Inc., which contains the latest and one of the most popular distributions of Linux, including the Linux kernel, utility programs, productivity programs, and even games. As you read through this book and install or configure software, you'll discover many of the reasons Red Hat's Linux was chosen to help you learn. Some of these are

Page 18

How to Use This Book

This book is designed to teach you topics in one-hour sessions. All the books in the Sams' Teach Yourself series enable you to start working and become productive with the product as quickly as possible. This book will do that for you!

Each hour, or session, starts with an overview of the topic to inform you what to expect in each lesson. The overview helps you determine the nature of the lesson and whether the lesson is relevant to your needs.

Each lesson has a main section that discusses the lesson topic in a clear, concise manner by breaking the topic down into logical component parts and explaining each component clearly.

Interspersed in each lesson are special elements, called Just a Minutes, Time Savers, and Cautions, that provide additional information.

JUST A MINUTE

A Just a Minute is designed to clarify the concept that is being discussed. It elaborates on the subject; if you are comfortable with your understanding of the subject, you can bypass it without danger.

TIME SAVER

Time Savers inform you of tricks or elements that are easily missed by most computer users. You can skip them, but often Time Savers show you an easier way to do a task.

CAUTION

A Caution deserves the most attention, because a Caution points out a problematic element of the topic being discussed. Ignoring the information contained in a Caution could have adverse effects on the task at hand. These are the most important special elements in the book.

Table of Contents | Next