Datasheet

Task 1.5: Edit Files
23
find hits in a slightly different set of directories than is shown here. Don’t be concerned about
this.) The whereis program accepts several parameters that modify its behavior in various
ways. These are detailed in the program’s man page.
Criteria for Completion
To complete this task, you should use the three file-location commands to locate the whatis pro-
gram. Although the output from the locate program is likely to be quite long, you should verify
that the three programs all return the same key file, which is likely to be /usr/bin/whatis.
Task 1.5: Edit Files
A great deal of Linux system administration involves editing files. In Linux, most configura-
tion files are ordinary text files, and changing how the system functions involves editing these
files. Thus, you should be proficient with at least one text editor in Linux. Although you can
use a fancy GUI text editor if you like, one editor that’s particularly important is Vi. This edi-
tor is a simple text-mode editor, and it’s important because it’s a very lightweight editor that’s
accessible from most basic emergency systems. Thus, even if you prefer another editor, you
may be forced to use Vi in certain emergency recovery situations.
Scenario
An accidental change to the /etc/lilo.conf file has rendered a Linux system unbootable. To
recover, you must boot using an emergency disk and edit this file using Vi. For the purpose of
this exercise, of course, you won’t edit the real /etc/lilo.conf file, and you needn’t even
boot from an emergency disk (although you can if you want to). Instead, you’ll make a copy
of /etc/lilo.conf and edit the copy.
Scope of Task
This task involves reviewing the basics of the Vi editor and trying out Vi editing tasks. You will
not need to know anything about the format of the /etc/lilo.conf file to perform this task;
for now, the goal is simply to learn the basics of Vi. You might want to know, though, that
lilo.conf controls the way Linux boots, at least on computers that use the Linux Loader
(LILO) boot loader. Modifying this file therefore modifies the options that are available when
you first boot the computer.
Duration
This task should take half an hour or an hour to complete. Once you’re proficient with Vi, you
should be able to perform similar tasks in a matter of minutes.
83484.book Page 23 Monday, September 18, 2006 8:58 AM