You are on page 1of 11

Unit 2

Unit 2

Linux Usage Basics

RH033-RH033-RHEL5-en-220070306

Copyright 2007 Red Hat, Inc. All rights reserved

2-1

http://www.way2download.com/linux/RH033/unit-2/page01.html [2008/02/06 08:02:57 PM]

Objectives

Objectives
Upon completion of this unit, you should be able to:

Log into a Red Hat Enterprise Linux system Start X from a console Access the command line from X Change your password Understand the nature of root privileges Elevate your privileges Edit plain text files
Copyright 2007 Red Hat, Inc. All rights reserved

RH033-RH033-RHEL5-en-220070306

2-2

http://www.way2download.com/linux/RH033/unit-2/page02.html [2008/02/06 08:03:00 PM]

Logging in to a Linux System

Logging in to a Linux System


Two types of login screens: virtual consoles (text-based) and graphical logins (called display managers) Login using login name and password Each user has a home directory for personal file storage

RH033-RH033-RHEL5-en-220070306

Copyright 2007 Red Hat, Inc. All rights reserved

2-3

http://www.way2download.com/linux/RH033/unit-2/page03.html [2008/02/06 08:03:07 PM]

Switching between virtual consoles and the graphical environment

Switching between virtual consoles and the graphical environment

A typical Linux system will run six virtual consoles and one graphical console
r r

Server systems often have only virtual consoles Desktops and workstations typically have both

Switch among virtual consoles by typing: Ctrl-Alt-F[1-6] Access the graphical console by typing CtrlAlt-F7

RH033-RH033-RHEL5-en-220070306

Copyright 2007 Red Hat, Inc. All rights reserved

2-4

http://www.way2download.com/linux/RH033/unit-2/page04.html [2008/02/06 08:03:10 PM]

Elements of the X Window System

Elements of the X Window System


The X Window System is Linux's graphical subsystem Xorg is the particular version of the X Window System used by Red Hat

Open source implementation of X

Look and behavior largely controlled by the desktop environment Two desktop environments provided by Red Hat:

r r

GNOME: the default desktop environment KDE: an alternate desktop environment


Copyright 2007 Red Hat, Inc. All rights reserved

RH033-RH033-RHEL5-en-220070306

2-5

http://www.way2download.com/linux/RH033/unit-2/page05.html [2008/02/06 08:03:14 PM]

Starting the X server

Starting the X server


On some systems, the X server starts automatically at boot time Otherwise, if systems come up in virtual consoles, users must start the X server manually

r r

The X server must be pre-configured by the system administrator Log into a virtual console and run startx The X server appears on Ctrl-Alt-F7
2-6

RH033-RH033-RHEL5-en-220070306

Copyright 2007 Red Hat, Inc. All rights reserved

http://www.way2download.com/linux/RH033/unit-2/page06.html [2008/02/06 08:03:18 PM]

Changing Your Password

Changing Your Password

Passwords control access to the system


r r r

Change the password the first time you log in Change it regularly thereafter Select a password that is hard to guess

To change your password using GNOME, navigate to System->Preferences->About Me and then click Password. To change your password from a terminal: passwd

RH033-RH033-RHEL5-en-220070306 Copyright 2007 Red Hat, Inc. All rights reserved

2-7

http://www.way2download.com/linux/RH033/unit-2/page07.html [2008/02/06 08:03:23 PM]

The root user

The root

user

The root user: a special administrative account


r r

Also called the superuser root has near complete control over the system

...and a nearly unlimited capacity to damage it!

Do not login as root unless necessary


r

Normal (unprivileged potential to do damage is more limited

) users'

RH033-RH033-RHEL5-en-220070306

Copyright 2007 Red Hat, Inc. All rights reserved

2-8

http://www.way2download.com/linux/RH033/unit-2/page08.html [2008/02/06 08:03:27 PM]

Changing Identities

Changing Identities

su - creates new shell as root sudo command runs command as root


r

Requires prior configuration by a systemadministrator

id shows information on the current user

RH033-RH033-RHEL5-en-220070306

Copyright 2007 Red Hat, Inc. All rights reserved

2-9

http://www.way2download.com/linux/RH033/unit-2/page09.html [2008/02/06 08:03:30 PM]

Editing text files

Editing text files

The nano editor


r r

Easy to learn, easy to use Not as feature-packed as some advanced editors gedit, a simple graphical editor vim, an advanced, full feature editor gvim, a graphical version of the vim editor

Other editors:
r r r

RH033-RH033-RHEL5-en-220070306

Copyright 2007 Red Hat, Inc. All rights reserved

2-10

http://www.way2download.com/linux/RH033/unit-2/page10.html [2008/02/06 08:03:34 PM]

End of Unit 2

End of Unit 2

Questions and Answers Summary


r r r r r r

Login name and password startx gnome-terminal passwd su nano

RH033-RH033-RHEL5-en-220070306

Copyright 2007 Red Hat, Inc. All rights reserved

2-11

http://www.way2download.com/linux/RH033/unit-2/page11.html [2008/02/06 08:03:41 PM]