Read this chapter of <i>A Practical Guide To Ubuntu Linux</i> and bring yourself up to speed on the open source operating system's desktop and its root privileges, and learn how to work with the command line and control windows.

InformationWeek Staff, Contributor

July 1, 2008

10 Min Read

Chapter 4: Introduction To Ubuntu Linux

Introduction to Ubuntu Linux: chapter 4

A Practical Guide To Ubuntu Linux
This chapter is an excerpt from A Practical Guide to Ubuntu Linux, by Mark G. Sobell, published by Prentice Hall December 2007

ISBN 013236039X
Copyright 2008 Mark G. Sobell.

Used with permission from the publisher.
Available from booksellers.
Book available at Informit

In this chapter:

  • Curbing Your Power: root Privileges/sudo

  • A Tour of the Ubuntu Linux Desktop

  • The Update Notifier

  • Updating, Installing, and Removing Software Packages

  • Where to Find Documentation

  • More About Logging In

  • What to Do If You Cannot Log In

  • Working from the Command Line

  • Controlling Windows: Advanced Operations

The Ubuntu GNOME login screen.

One way or another you are sitting in front of a computer that is running Ubuntu Linux. After describing root privileges, this chapter takes you on a tour of the system to give you some ideas about what you can do with it. The tour does not go into depth about choices, options, menus, and so on; that is left for you to experiment with and to explore in greater detail in Chapter 8 and throughout later chapters. Instead, this chapter presents a cook’s tour of the Linux kitchen: As you read it, you will have a chance to sample the dishes that you will enjoy more fully as you read the rest of this book.

Following the tour are sections that describe where to find Linux documentation (page 124) and offer more about logging in on the system, including information about passwords (page 132). The chapter concludes with a more advanced, optional section about working with Linux windows (page 139).

Be sure to read the warning about the dangers of misusing the powers of root (sudo) in the next section. Heed that warning, but feel free to experiment with the system: Give commands, create files, click objects, choose items from menus, follow the examples in this book, and have fun.


root terminology
Most Linux systems include an account for a user named root. This user has special privileges and is sometimes referred to as Superuser. On a classic Linux system a user can log in and work as root by providing the root password.

As installed, Ubuntu has a root account but no password for the account: The root account is locked. The next section explains how you can use sudo and provide your password to run a command with root privileges. This book uses the phrase "working with root privileges" to distinguish this temporary escalation of privileges from the classic scenario wherein a user can work with root privileges for an entire session. See page 487 for more information on root privileges.

Curbing Your Power: root Privileges/sudo

When you enter your password to run a program (not when you log in on the system), or when you use sudo from the command line, you are working with root privileges and have extraordinary systemwide powers. A person working with root privileges is sometimes referred to as Superuser or administrator. When working with root privileges, you can read from or write to any file on the system, execute programs that ordinary users cannot, and more. On a multiuser system you may not be permitted to run certain programs, but someone—the system administrator—can and that person maintains the system. When you are running Linux on your own computer, the first user you set up, usually when you install Ubuntu, is able to use sudo and its graphical counterpart, gksudo, to run programs with root privileges.


Who is allowed to run sudo?
The first user you set up when you install Ubuntu can administer the system: This user can use sudo to execute any command. When you add user accounts, you can specify whether they are allowed to administer the system. See page 658 and Figure 172 on page 659 for more information.

In this chapter and in Chapter 8, when this book says you have to enter your password, it assumes you have permission to administer the system. If not, you must get an administrator to perform the task.

There are two primary ways to gain root privileges. First, when you start a program that requires root privileges, a dialog box pops up asking you to Enter your password to perform administrative tasks. After you enter your password, the program runs with root privileges. Second, if you use the sudo utility (for textual applications; page 490) or gksudo utility (for graphical applications; page 491) from the command line (such as from a terminal emulator; page 114) and provide your password, the command you enter runs with root privileges. In both cases you cease working with root privileges when the command finishes or when you exit from the program you started with root privileges. For more information refer to "Running Commands with root Privileges" on page 487.


Do not experiment while you are working with root privileges
Feel free to experiment when you are not working with root privileges. When you are working with root privileges, do only what you have to do and make sure you know exactly what you are doing. After you have completed the task at hand, revert to working as yourself. When working with root privileges, you can damage the system to such an extent that you will need to reinstall Ubuntu Linux to get it working again.


If you bought your system with Ubuntu installed at the factory
When a manufacturer installs Ubuntu, it cannot set up an account for you (it does not know your name). Typically, these systems come with the root account unlocked. Ubuntu suggests you not unlock the root account. To set the system up the way Ubuntu suggests, use users-admin as explained on page 658 to add a user who will be the system administrator. Make sure to put a tick in the check box labeled Administer the system in the User Privileges tab (page 658). Then relock the root account (page 499).

A Tour of the Ubuntu Linux Desktop

This section presents new words (for some readers) in a context that explains the terms well enough to get you started with the Ubuntu desktop. If you would like exact definitions as you read this section, refer to "GNOME Desktop Terminology" on page 105 and to the Glossary. The Glossary also describes the data entry widgets (page 1068), such as the combo box (page 1029), drop-down list (page 1035), list box (page 1045), and text box (page 1064).

GNOME (, a product of the GNU project (page 4), is the user-friendly default desktop manager under Ubuntu Linux. KDE, the K Desktop Environment, is a powerful desktop manager and complete set of tools you can use in place of GNOME. The version of Ubuntu that runs KDE is named Kubuntu. See page 60 for instructions on installing KDE.

This tour describes GNOME, a full-featured, mature desktop environment that boasts a rich assortment of configurable tools. After discussing logging in, this section covers desktop features—including panels, objects, and workspaces—and explains how to move easily from one workspace to another. It describes several ways to launch objects (run programs) from the desktop, how to set up the desktop to meet your needs and please your senses, and how to manipulate windows. As the tour continues, it explains how to work with files and folders using the Nautilus File Browser window, one of the most important GNOME tools. The tour concludes with a discussion of the Update Notifier, the object that allows you to keep a system up-to-date with the click of a button; getting help; and logging out.

Logging In on the System
When you boot a standard Ubuntu Linux system, it displays a Login screen (Figure 41) on the system console.

The Ubuntu GNOME login screen

Figure 4.1
The Ubuntu GNOME login screen

(click image for larger view)

view the image gallery
Download a PDF of the whole chapter

At the lower-left corner of the screen is a small object labeled Options. Click this object or press F10 to display the Actions menu. The selections on this menu allow you to work in a different language (Select Language), specify a desktop manager (Session), log in remotely, reboot the system (Restart), turn the system off (Shut Down), suspend the system, or have the system hibernate. For more information refer to "The Login Screen" on page 132.

To log in, enter your username in the text box labeled Username and press RETURN. The label changes to Password. Enter your password and press RETURN. If Ubuntu displays an error message, try entering your username and password again. Make sure the CAPS LOCK key is not on (Ubuntu displays a message if it is); the routine that verifies your entries is case sensitive. See page 133 if you need help with logging in and page 135 if you want to change your password. The system takes a moment to set things up and then displays a workspace (Figure 42).

Note: To read this chapter in it's entirety: Download the PDF file.

Mark G. Sobell is the author of best-selling UNIX and Linux books, including A Practical Guide to the UNIX System, UNIX System V: A Practical Guide, and A Practical Guide to Linux. He has more than twenty years of experience working with UNIX and Linux and is president of Sobell Associates Inc., a consulting firm that designs and builds custom software applications, designs and writes documentation, and provides UNIX and Linux training and support.

Never Miss a Beat: Get a snapshot of the issues affecting the IT industry straight to your inbox.

You May Also Like

More Insights