Datasheet

34
Phase 1
Working on the Command Line
Scenario
A user of a Linux computer you administer reports problems with network connections from
the Mozilla Firefox browser. As part of your diagnosis of this problem, you want to use some
diagnostic commands that produce copious output. In order to do this more easily, you will
pipe the output streams from these programs into other programs and redirect the output into
files that you can peruse later.
This task uses advanced network diagnostic commands. These commands are
described in more detail in Phase 6. For now, don’t be too concerned with what
these commands do; just concentrate on their input and output streams, the
redirection of these streams, and piping these streams between programs.
Scope of Task
This task demonstrates several tools and techniques that you’re likely to use quite heavily as
a Linux user and system administrator. Each of these commands and techniques is quite pow-
erful and so can take some time to master, but once you’ve mastered them, they’ll become sec-
ond nature.
Duration
This task should take half an hour or so to complete. Once you understand streams, pipes, and
redirection, you should be able to use these tools and techniques as a matter of course in a wide
variety of commands, most of which will take just seconds to type.
Setup
You need a working Linux computer with a network connection and the Mozilla Firefox Web
browser. (You may use another Web browser instead of Firefox, but you must then modify the
examples appropriately.) Firefox is an X-based (GUI) Web browser, so you’ll need to run it
from X; however, the diagnostic commands must be run from the command line—either in an
xterm or similar window or from a separate text-mode login.
To prepare for this task, you should log into your Linux system as an ordinary user in GUI
mode. Once logged in, launch the Mozilla Firefox Web browser by locating it from the menu
system or by typing firefox in an xterm window. Once Firefox is running, browse to a Web
site (any external Web site will do). You should then launch an xterm or similar window to
obtain a command prompt or press Alt+Ctrl+F1 to switch to text mode and log in as an ordi-
nary user to get a command prompt.
Caveats
If you don’t have or don’t want to use Firefox, you may use any other Web browser (such as
Konqueror, Opera, or even the text-mode lynx). If you do, you must change the references to
the browser as appropriate in the following procedure.
83484.book Page 34 Monday, September 18, 2006 8:58 AM