Docsity

Ubuntu Installation and File Management, Manuais, Projetos, Pesquisas de Medicina

Pré-visualização parcial do texto

Baixe Ubuntu Installation and File Management e outras Manuais, Projetos, Pesquisas em PDF para Medicina, somente na Docsity!

Ubuntu Pocket

Guide and

Reference

Keir Thomas

iii

Contents

About the author ...............................................................ix

A brief introduction............................................................xi

What is Ubuntu? ........................................................................... xi GNU.......................................................................................... xi The Linux kernel........................................................................xii Linux distros.............................................................................xiii What makes Ubuntu special.........................................................xiii Focus on desktop users ............................................................xiv Philosophy and community ......................................................xiv Ease of use ................................................................................xv What Ubuntu offers ....................................................................xvii How to read this book .................................................................xvii Typing commands.................................................................. xviii Menu options ......................................................................... xviii What to click .......................................................................... xviii Ubuntu versions ..................................................................... xviii

CHAPTER ONE: Installing Ubuntu ........................................

Types of installation....................................................................... 1 #1: Dual‐booting........................................................................ 1 #2: Installing within Windows .................................................... 2 #3: Virtual computer .................................................................. 2 Preparing your PC for Ubuntu ........................................................ 2 Ensuring enough disk space is free.............................................. 2 Defragmenting the hard disk...................................................... 3 Checking the Windows filesystem for errors ............................... 3 Getting Ubuntu.............................................................................. 4 Choosing a version ..................................................................... 4 Choosing a release ..................................................................... 6 Downloading Ubuntu ................................................................. 7 Creating an install CD..................................................................... 8 Step‐by‐step: Installing Ubuntu ..................................................... 9 Standard (repartitioning)............................................................ 9 Within Windows (Wubi)............................................................. Virtual computer ....................................................................... Problematic installations (alternate install)............................... 16 Getting Ubuntu onto an Apple Mac ...........................................

iv

  • CHAPTER TWO: Configuring Ubuntu
    • Getting started
    • Keyboard and mouse/trackpad
      • Switching keyboard languages
      • Mouse......................................................................................
    • Graphics
      • Changing screen resolution
      • Installing proprietary drivers.....................................................
      • Activating desktop visual effects
      • Configuring a second monitor
      • Changing screen backlighting...................................................
      • Screensaver
    • Sound
    • Getting online..............................................................................
      • Wireless
      • Wired (Ethernet)
    • Printers........................................................................................
      • Printing a test page
      • Setting default print options.....................................................
      • Managing print jobs
      • Installing a network printer.......................................................
    • Removable storage
    • Scanners......................................................................................
    • Bluetooth.....................................................................................
      • Pairing (Ubuntu 8.10) ................................................................
      • Pairing (Ubuntu 8.04) ................................................................
      • Transferring files .......................................................................
  • CHAPTER THREE: Getting to grips with the desktop ............
    • Logging in.....................................................................................
      • Wubi (Windows install).............................................................
      • Dual‐boot.................................................................................
    • The layout of the desktop .............................................................
      • Panels .......................................................................................
      • Main menus ..............................................................................
      • Icons and applets......................................................................
    • Virtual desktops............................................................................
    • Personalizing
      • Themes....................................................................................
      • Fonts........................................................................................
      • Login screen.............................................................................
      • Configuring menus...................................................................
      • Customizing desktop icons.......................................................
    • Useful applications.......................................................................
    • Cutting, copying, and pasting....................................................... v
    • Desktop search
    • Deskbar
    • Keyboard shortcuts......................................................................
    • Adding new users.........................................................................
    • Making programs start automatically...........................................
    • Dealing with crashed programs
    • Changing the time & date
    • Rebooting and shutting down
  • CHAPTER FOUR: Users and the filesystem..........................
    • How Ubuntu handles files.............................................................
      • Paths
      • Mounting
      • File & folder names
      • Important filesystem locations ..................................................
      • Hidden files and folders
      • File extensions ..........................................................................
    • Understanding users
      • Root user
      • File permissions........................................................................
    • Nautilus: An overview
    • Day‐to‐day file management
      • Links and launchers
      • Bookmarks...............................................................................
      • Tabbed browsing
      • Searching for files.....................................................................
      • Special browsing locations
      • File Associations.......................................................................
    • File compression
  • CHAPTER FIVE: Hands‐on at the command‐line ..................
    • All about the shell
      • bashed about
      • To DOS or not to DOS
    • Understanding the prompt...........................................................
      • Starting a command‐line session..............................................
      • Knowing who you are
      • Knowing where you’re browsing...............................................
    • How commands work
      • Arguments
      • Command options.....................................................................
    • Complex filenames
    • Relative and absolute paths
    • Running programs
    • Useful everyday commands .......................................................... vi
    • Working with root powers.............................................................
      • Using sudo ................................................................................
      • Temporarily switching to root ...................................................
      • Enabling root login....................................................................
    • File permissions in depth..............................................................
      • The basics
      • Execute permission
      • Folder permissions
      • What permissions look like
      • Changing ownerships and permissions
    • bash productivity tricks
      • Keyboard shortcuts
      • Command history.....................................................................
      • Job management
    • Managing processes.....................................................................
    • Working with compressed files.....................................................
      • Zip files
      • tar archives
    • Advanced bash techniques...........................................................
      • Redirection
      • Piping
      • Brace expansion
      • Wildcards
  • CHAPTER SIX: Software management...............................
    • All about package management...................................................
      • What’s in a package?
      • APT and dpkg...........................................................................
      • Software repositories
      • Dependency management
    • Synaptic: An overview.................................................................
    • Typical tasks ...............................................................................
      • Installing software...................................................................
      • Uninstalling software ..............................................................
      • Reinstalling software...............................................................
      • Manually installing a package
    • Command‐line software management
      • Installing software..................................................................
      • Uninstalling software ..............................................................
      • Reinstalling software...............................................................
      • Manually installing/uninstalling packages ................................
    • Working with repositories ...........................................................
      • Adding a repository.................................................................
      • Adding a new repository key
    • Compiling from source code........................................................
  • CHAPTER SEVEN: Securing the system vii
    • System updates ..........................................................................
      • Update Manager .....................................................................
      • Updating at the command‐line................................................
    • Configuring the firewall...............................................................
      • Installing and configuring Firestarter
      • Creating inbound rules ............................................................
      • Creating outbound rules.........................................................
      • Turning off diagnostic tool responses ......................................
    • Installing antivirus.......................................................................
      • Installing ClamTK
      • Scanning for viruses
    • Encrypting files and folders .........................................................
      • Creating an encrypted /private folder...................................
      • Encrypting individual files and folders......................................
    • Enhancing web browser security .................................................
      • Enabling a master password...................................................
      • Avoiding “executable content” attacks
  • APPENDIX A: Glossary of terms
  • APPENDIX B: Learning more and getting help...................
    • Books and magazines .................................................................
    • Online help
      • Forums...................................................................................
      • Mailing lists .............................................................................
    • Built‐in documentation ...............................................................
      • Understanding man pages.......................................................
      • READMEs and other documentation
  • Index

If you like Ubuntu Pocket Guide and Reference , why not get the PRINT EDITION?

Only $9.94 from Amazon.com

Add it to your Amazon order now!

Other books by Keir Thomas…

Ubuntu Kung Fu The Pragmatic Programmers ISBN 978 ‐ 1934356227

Over 300 tips, tricks, hints, and hacks for the world’s favorite Linux.

Beginning Ubuntu Linux, Third Edition / Apress ISBN 978 ‐ 1590599914 Comprehensive, award‐ winning guide. From zero to hero in over 700 pages!

xi

A brief introduction

The purpose of this chapter is to introduce you to the Ubuntu operating system, and the philosophy that underpins it.

The fact you’re reading this book might mean you already know about Ubuntu, but one or two readers might have bought the Print Edition of this book (or downloaded the PDF) on a whim to see what the fuss is all about. These people might lack specifics, and remain unconvinced of the benefits of Ubuntu. So, I’m going to burn through some precious pages of this slim volume to evangelize and explain just a little.

What is Ubuntu?

Ubuntu is a version of the Linux operating system. An operating system is the software that “runs your computer”. Microsoft Windows is the world’s most popular operating system, at least for desktop computers, but Linux is a completely separate endeavor.

GNU

The ball started rolling back in the 1980s, when a hugely talented computer scientist called Richard Stallman decided to create a clone of a venerable operating system called Unix. At the time, Unix ran many of the world’s industrial and academic computer systems.

Stallman did this because Unix was becoming increasingly proprietary —it was no longer permitted to share its source code (the

xiii

Because the kernel is such an important aspect of an operating system, people began to refer to the combination of GNU and Linux simply as Linux. This upset Stallman, who asked that the name GNU/Linux be used instead. But it was too late. The name stuck.

NOTE Whether to refer to the operating system as GNU/Linux or simply Linux is a debate that continues to this day.

Software from other sources is typically included in the Linux operating system too, alongside GNU and the Linux kernel. Virtually all the software in Linux is Free Software, even though much of it has no direct ties with GNU or Richard Stallman. Arguably, Stallman’s greatest gift to the world was not the GNU software, but the concept of Free Software. Much of Stallman’s activity nowadays involves evangelizing around the world about Free Software.

NOTE Often the term open source is used instead of Free Software. It has a similar meaning—see www.opensource.org.

Linux distros

There isn’t just one version of Linux. There are hundreds. Versions are known as distributions of Linux, or distros for short. Examples of other distros include Red Hat (www.redhat.com) and SUSE (www.suse.com), but there are many others, and new ones appear all the time.

This variety is possible because of the freedom allowed by Free Soft- ware—anybody can take the source code and make their own version.

Some distros are commercially sponsored, while others arose from the massive community of Linux users around the world. Ubuntu is a little of both: it is sponsored by Canonical, a company founded by the entrepreneur Mark Shuttleworth in 2004, but it also benefits from massive community support, and is based on Debian (www.debian.org), a community-generated distro.

What makes Ubuntu special

Three things make Ubuntu stand out from the crowd:

1. Its focus on desktop users; 2. The Ubuntu philosophy and community; 3. Ease of use.

Let’s take a closer look at each.

xiv

Focus on desktop users

Although it comes in versions for all kinds of computers, at its core Ubuntu is a distribution of Linux aimed primarily at desktop users.

Most Linux distros are equally at home on desktop or server computers (the powerful computers that run the Internet), but lack polish when it comes to the desktop experience. Indeed, in many cases the needs of desktop users are something of an afterthought.

In contrast, the desktop experience is something to which the Ubuntu developers pay very close attention.

When Ubuntu was created back in 2004, Mark Shuttleworth recorded the very first bug in the online database. However, it wasn’t about software. Instead, it was a revolutionary call to arms. It read as follows: “Microsoft has a majority market share in the new desktop PC marketplace. This is a bug, which Ubuntu is designed to fix”.

Philosophy and community

As you might have realized, Linux is as much a philosophy as it is an operating system. Ubuntu is no different.

African values

Ubuntu gets its title from the African concept of the same name that translates roughly as “humanity to others”. The term gained popularity in post-apartheid South Africa, where it stressed the importance of individuals recognizing their role within communities, and being generous of spirit because of this.

When Mark Shuttleworth founded the Ubuntu Linux project in 2004, he drew-up a philosophical statement, based on this concept, and on the principles of Free Software.

In a nutshell, the Ubuntu project is driven by the idea that software should be inclusive. It should be possible for anybody, anywhere to use, share, or modify Ubuntu. This means the software should be available in a particular user’s language too. If they have a disability, the software should be accessible to them.

Ubuntu is free of charge, like nearly all versions of Linux. Updates are also free-of-charge for a set period after release (usually 18 months, but see the table on page 7 for more details).

xvi

How it used to be

To understand why this is important, let me recount an experience I had with Linux in 2002, before Ubuntu hit the scene. I wanted the wireless card in my notebook to connect to my network, but I couldn’t get it working under Linux. So, I asked for help on a popular forum. I received something similar to the following in reply:

“ Getting the card to work is simple! Just grab the source code for the module and compile it against the kernel. insmod it and then use iwconfig to configure a WEP password—”

Are you still reading? As you can tell, that’s a complex answer. It involves working at the command-line, and requires knowledge of how Linux works on a very technical level. I knew what the poster was talking about, although inwardly I sighed at the amount of work involved. However, a newcomer would be baffled.

That’s how it was back then. Linux was “for techies only“. It was considered an industrial-strength operating system, and brought with it a steep learning curve that drove many away.

How it is now

Ubuntu changed everything. It focuses on the desktop user experience and, to this end, features graphical configuration software. It includes a wide variety of hardware drivers so that nearly all standard hardware “just works”. Ubuntu comes with an installer program that doesn’t fea- ture mind-boggling terminology, and updating the system takes just a few clicks of the mouse.

NOTE To be fair, it can be argued Ubuntu was part of a broader revolution in desktop Linux, and several other versions of Linux were heading in the same direction. Ubuntu was the first to get there, and continues to lead the charge with each new release.

While the command-line is still around, there’s no longer an obligatory requirement to use it. It’s often quicker and more efficient to use it, as you’ll find out later in this book, but you don’t have to. Ubuntu makes Linux truly accessible to all.

Don’t think Ubuntu is somehow “less Linux” than other versions. Scratch under the surface and you’ll find Ubuntu is based on Debian, a widely-respected community-generated version of Linux that many consider definitive_._ See www.debian.org.

xvii

What Ubuntu offers

Ubuntu is a thoroughly modern operating system that provides everything you might find in Windows or Macintosh OS X, but without the drawbacks. It keeps things simple, yet offers sophisticated features.

Want to browse the web? Firefox will do the job. This is the same Firefox you might have been using under Windows and, yes, the same add-ons will work. Want to instant-message friends using AIM, MSN, or ICQ? Pidgin provides the solution. Need to do some word- processing, or spreadsheeting, or presenting? OpenOffice.org will do the trick. GIMP will handle image-editing, while RhythmBox will take care of music playback (stand-alone video playback is handled by Totem).

All of these programs are installed by default. They’re not extras and they’re all free of charge.

Hardware support is excellent, with virtually every item of day-to-day hardware supported, including graphics/sound cards, printers, wireless, USB memory sticks, cameras, iPods, and so-on. There’s no need to fumble around with driver CDs—practically everything will be up and running straight after installation, although as with any operating system you may have to configure the 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. Its goal is to explain the essentials of day-to-day Ubuntu administration in a fuss-free manner. Due to the limited size of the pocket book format, at times it can be a whistle-stop tour of Ubuntu features. However, topics are always fully explained, and often I linger over details to provide a lasting reference.

There are certainly more comprehensive Ubuntu books around. I recommend Beginning Ubuntu Linux, Third Edition , written by Jaime Sicam and myself. It’s published by Apress (June 2008; ISBN 978-

  1. and provides a complete guide to Ubuntu.

Installing Ubuntu : 1

C H A P T E R O N E

Installing Ubuntu

This chapter explains the methods used to install Ubuntu on a computer. Additionally, you’ll learn how to:

 Choose a version (and release) of Ubuntu that’s right for you;  Undertake preparatory work to ensure that installation runs smoothly;  Create your own Ubuntu installation CD-ROM;  Install Ubuntu on problematic computers;  Install Ubuntu on Intel-based Apple Macintosh computers.

Types of installation

Installing Ubuntu is much easier than you might think and there are essentially three ways of doing so, as follows:

#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 dual-booting.

This sounds complex, but it’s automated via the Ubuntu installation software. However, there’s a slight risk involved when repartitioning, so it’s very wise to backup essential data first.

2 : Installing Ubuntu

NOTE Instead of repartitioning, some users choose to wipe Windows from the hard disk and install Ubuntu in its place. This can also be done using the above installation method.

#2: Installing within Windows

Wubi is Windows software that installs Ubuntu within a series of virtual hard disk files contained in the Windows filesystem. It then configures a boot-time menu so you can choose between booting into Ubuntu or Windows. If you choose to boot into Ubuntu, a clever trick makes the virtual hard disk files appear to be real disks. As a result, the user will be entirely unaware they’re not using a traditional partition-based installation, as described previously.

Using Wubi to install Ubuntu is just like installing some Windows soft- ware, and is equally risk-free. There’s even an uninstall option added to Add/Remove Programs. The only drawback is a slight reduction in per- formance compared to a traditional installation, and you’ll also find the Ubuntu suspend-to-disk (hibernate) power-saving mode doesn’t work.

TIP You can still use the “sleep” power saving mode that suspends power to most of the computer’s components except RAM.

#3: Virtual computer

By downloading a virtual computer application, such as the free-of- charge VMware Player (www.vmware.com/products/player), you can install Ubuntu so it runs within a program window on the Windows desktop.

A virtual computer is effectively a complete computer recreated in software. It offers an excellent way to trial Ubuntu, although the limitations of the virtual computer software mean you won’t experience Ubuntu to its full advantage (desktop visual effects won’t work, for example). Additionally, you’ll need a powerful PC with over 1GB of memory for optimal results.

Preparing your PC for Ubuntu

Before installing Ubuntu, some preparatory work within Windows is advisable.

Ensuring enough disk space is free

Regardless of what installation method you choose, you’ll need at least 5GB of free disk space for Ubuntu. For an installation you intend to use full-time, you’ll probably need much more.