• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/146

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

146 Cards in this Set

  • Front
  • Back
The following line appears in your X server’s mouse configuration area. What can you
conclude?
Option “Protocol” “PS/2”
A. The mouse is connected to the PS/2 hardware mouse port.
B. The mouse uses the PS/2 software communication standard.
C. The computer is an ancient IBM PS/2 system.
D. The mouse was designed for use with IBM’s OS/2.
B. “PS/2” can refer to both a hardware interface and a software protocol, but used in the
context of the Protocol option, it unambiguously refers to the software protocol.

Option A
might be correct, but the specified line is insufficient evidence of that; USB mice generally use
the PS/2 protocol or a variant of it, such as the Intellimouse PS/2 protocol. Although the PS/2
hardware port and protocol originated with the IBM PS/2 computer mentioned in option C,
many other computers now use them. Mice that use the PS/2 protocol may be used with just
about any OS, not just IBM’s OS/2.
How can you tell whether your system is using inetd or xinetd as a super server? (Choose
all that apply.)
A. Type ps ax | grep inetd, and examine the output for signs of inetd or xinetd.
B. Type superserver to see a report on which super server is running.
C. Look for the /etc/inetd.conf file or /etc/xinetd.d subdirectory, which is a sign of
inetd or xinetd, respectively.
D. Examine the /etc/inittab file to see which super server is launched by init, which is
responsible for this task.
A, C. Examining a process listing (obtained from ps) for signs of the super server is the
most reliable way to determine which one is actually running. The presence of the super
server’s configuration file or files (as in option C) is also a good diagnostic, although some
older systems that have been upgraded may have both sets of configuration files.

There is no
standard superserver utility to report on which one is used. Most distributions launch the
super server through a SysV startup script; the /etc/inittab file isn’t directly involved in this
process, so examining it would be pointless. For more information, please see Chapter 10,
“Securing Your System.”
How does the lpc utility for CUPS differ from its counterpart in BSD LPD and LPRng?
A. The lpc utility is unique to CUPS; it doesn’t ship with BSD LPD or LPRng.
B. CUPS doesn’t ship with an lpc command, but BSD LPD and LPRng do.
C. CUPS’s lpc is much more complex than its counterpart in BSD LPD and LPRng.
D. CUPS’s lpc is much simpler than its counterpart in BSD LPD and LPRng.
D. The lpc utility is used to start, stop, change the priority of, and otherwise control jobs
in a print queue. CUPS ships with an lpc utility, but it’s quite rudimentary compared to the
lpc utilities of BSD LPD and LPRng. Instead, CUPS relies on its Web-based interface to
provide the ability to control print jobs.
What file would you edit to restrict the number of simultaneous logins a user can employ?
A. /etc/pam.d/login-limits
B. /etc/bashrc
C. /etc/security/limits.conf
D. /etc/inittab
C. The /etc/security/limits.conf file defines various limits on user resources, including
the number of simultaneous logins individual users are permitted. Thus, option C is correct.

The /etc/pam.d/login-limits file is fictitious, although login limits do rely on the pam_
limits module to the Pluggable Authentication System (PAM). The /etc/bashrc file is a
global bash startup script file, but it’s not normally used to impose login limits. The /etc/
inittab file is a key Linux startup file, but it doesn’t have any direct bearing on imposing
login limits.
What does the following command accomplish?
$ wc report.txt | tee wc
A. It launches the wc editor on both the report.txt and wc.txt files; each file opens in
its own window.
B. It displays a count of the windows in which the report.txt file is displayed and shows
that information in a new window called wc.
C. It displays a count of newlines, words, and bytes in the report.txt file and copies that
output to the wc file.
D. It cleans up any memory leaks associated with the tee program’s use of the
report.txt file.
c. The wc command displays a count of newlines, words, and bytes in the specified file
(report.txt). Piping this data through tee causes a copy of the output to be stored in
the new file (wc in this example—you shouldn’t run this command in the same directory
as the wc executable file!). Thus, option C is correct.

Contrary to option A, wc isn’t an
editor, and the remaining syntax wouldn’t cause two files to open in separate windows
even if wc were an editor. Contrary to option B, wc doesn’t count windows or open a new
window. Contrary to option D, wc has nothing to do with cleaning up memory leaks, and
tee doesn’t directly use the report.txt file.
Which of the following lines, when entered in /etc/lilo.conf, begins a definition to boot
Linux using the /boot/bzImage-2.6.19 kernel when the /boot partition is /dev/hda2?
A. image=(hd0,1)/bzImage-2.6.19
B. kernel=/boot/bzImage-2.6.19
C. image=/boot/bzImage-2.6.19
D. kernel=(hd0,1)/boot/bzImage-2.6.19
C. The image= line in /etc/lilo.conf identifies a kernel image to be booted using normal
Linux filenames, so /boot/bzImage-2.6.19 is the correct notation. There is no kernel=
option in LILO’s configuration file. The (hd0,1) notation in options A and D is a GRUB harddisk
identifier; this notation isn’t used in LILO. Option D also uses both the GRUB disk identifier
notation and the /boot Linux filesystem specification. For more information, please see
What does the number 703 represent in the following /etc/passwd entry?
george:x:703:100:George Brown:/home/george:/bin/tcsh
A. The account’s human ID (HID) number
B. The account’s process ID (PID) number
C. The account’s group ID (GID) number
D. The account’s user ID (UID) number
D. The third field of /etc/passwd entries holds the UID number for the account. Linux
doesn’t use any standard identifier called a human ID (HID), although the acronym HID
stands for human interface device, a class of USB devices. Accounts don’t have PID numbers;
those belong to running processes. The account’s GID number is stored in the fourth field of
/etc/passwd—100 in this example.
What does the grep command accomplish?
A. It creates a pipeline between two programs.
B. It searches files’ contents for a pattern.
C. It concatenates two or more files.
D. It displays the last several lines of a file.
B. The grep command scans files to find those that contain a specified string or pattern.
In the case of text files, it displays the matching line or lines; for binary files, it reports that
the file matches the pattern. The method of creating a pipeline involves separating two commands
with a vertical bar (|). The grep command can be used in a pipeline, but it doesn’t
create one. The command that concatenates files is cat, and the command that displays the
last several lines of a file is tail.
Which of the following are journaling filesystems for Linux? (Choose all that apply.)
A. HPFS
B. JFS
C. Ext2fs
D. Ext3fs
B, D. The Journaled Filesystem (JFS) is a journaling filesystem written by IBM for AIX
and OS/2 and later ported to Linux. The Third Extended Filesystem (ext3fs) is a journaling
filesystem based on the older non-journaling Second Extended Filesystem (ext2fs). The
High-Performance Filesystem (HPFS) is a non-journaling filesystem designed by Microsoft
for OS/2. For more information, please see Chapter 3, “Configuring Hardware.”
You’re experiencing sporadic problems with a Secure Shell (SSH) login server—sometimes
users can log in, and sometimes they can’t. What might you try immediately after a failure
to help diagnose this problem?
A. On the server computer, type http://localhost:631 into a Web browser to access the
SSH configuration page and check its error subpage for error messages.
B. Type diagnose sshd to run a diagnostic on the SSH server daemon (sshd).
C. Type tail /var/log/messages to look for error messages from the server.
D. Examine the /dev/ssh device file to look for error messages from the server.
C. Log files, such as /var/log/messages and sometimes others in /var/log, often contain
useful information concerning server errors. The tail program displays the last few lines
of a file, so using it to examine log files immediately after a problem occurs can be a useful
diagnostic procedure. The http://localhost:631 URL accesses the Common Unix Printing
System (CUPS) configuration utility, which has nothing to do with SSH. There is no standard
diagnose utility to help diagnose server problems, and there is no standard /dev/ssh file.
What is the function of the ~/.profile file?
A. It’s the user configuration file for the ProFTP server.
B. It’s one of a user’s bash startup scripts.
C. It’s the user configuration file for the ProFile file manager.
D. Its presence tells tcsh to ignore file modes.
B. The ~/.profile file is one of several bash startup scripts. It has nothing to do with the
ProFTP server or the tcsh shell. The ProFile file manager mentioned in option C is fictitious.
You want your computer to remind you to get your car inspected in two years. What is the
best way to do this, of the specified options?
A. Create a program that repeatedly checks the time and, when two years has passed,
displays a message to get your car inspected.
B. Type at date, where date is a date specification. You can then specify a command, such
as mail with appropriate options, to notify you of the need to get your car inspected.
C. Create a cron job that runs hourly. This job should check the date and, when the correct
date comes up, use mail to notify you of the need for a car inspection.
D. Use the NTP GUI calendar program to create an alarm for the specified date. The
program will then display the message you enter at the specified date and time.
B. The at utility was created to run programs at one specified point in the future. Thus,
option B will accomplish the stated goal. Options A and C might also work; but neither is
the best way to accomplish this goal. Option A will tie up CPU time, and if the program
crashes or the system is shut down during the intervening two years, the message will never
display. Option C would be more reliable, but it adds unnecessary complexity to your hourly
cron job schedule. A GUI calendar program, as specified in option D, might work; but NTP
is the Network Time Protocol, a protocol and like-named program for synchronizing clocks
across a network. Thus, NTP isn’t the tool for the job, and option D is incorrect
16. How would you configure a computer to use the computer whose IP address is 172.24.21.1
as a gateway for all network traffic that’s not otherwise configured?
A. gateway default 172.24.21.1
B. gateway 172.24.21.1
C. route gateway 172.24.21.1
D. route add default gw 172.24.21.1
D. route add default gw 172.24.21.1
What software can you use to drive a Braille display device? (Select all that apply.)
A. Emacspeak
B. BRLTTY
C. A 2.6.26 or later kernel
D. GOK
B, C. The BRLTTY package is an add-on daemon for handling a Braille display device, and
some features for using these devices have been added to the 2.6.26 kernel, so options B and C
are correct. Emacspeak is speech-synthesis software; it can be used to “speak” a text display
to a user, but it doesn’t interface with Braille displays. GOK (http://www.gok.ca) is an onscreen
keyboard, not a Braille display tool.
Which is true of source RPM packages?
A. They consist of three files: an original source tarball, a patch file of changes, and a
PGP signature indicating the authenticity of the package.
B. They require programming knowledge to rebuild.
C. They can sometimes be used to work around dependency problems with a binary
package.
D. They are necessary to compile software for RPM-based distributions.
C. Some dependencies result from dynamically linking binaries to libraries at compile time
and so can be overcome by recompiling the software from a source RPM. Option A describes
Debian source packages, not RPM packages. Recompiling a source RPM requires only issuing
an appropriate command, although you must also have appropriate compilers and libraries
installed. Source tarballs can also be used to compile software for RPM systems, although this
results in none of RPM’s advantages.
Which utility should you use to rename the file pumpkin.txt to lantern.txt?
A. dd
B. rm
C. cp
D. mv
D. The mv utility can be used to rename files as well as move them from one location to
another. The dd utility is used to copy files to backups, whereas rm is used to remove (delete)
files and cp copies files
You want to run a lengthy scientific simulation program, called simbigbang, which doesn’t
require any user interaction; the program operates solely on disk files. If you don’t want to
tie up the shell from which you run the program, what should you type to run simbigbang
in the background?
A. start simbigbang
B. simbigbang &
C. bg simbigbang
D. background simbigbang
B. Appending an ampersand (&) to a command causes that command to execute in the background.
The program so launched still consumes CPU time, but it won’t monopolize the shell
you used to launch it. The start and background commands are fictitious. Although bg does
place a job into the background, it doesn’t launch a program that way; it places a process that’s
been suspended (by pressing Ctrl+Z) into the background.
Which of the following commands will install an RPM package called
theprogram-1.2.3-4.i386.rpm on a computer? (Choose all that apply.)
A. rpm -Uvh theprogram-1.2.3-4.i386.rpm
B. rpm -i theprogram-1.2.3-4.i386.rpm
C. rpm -U theprogram
D. rpm -e theprogram-1.2.3-4.i386.rpm
A, B. The -Uvh parameter issues an upgrade command (which installs the program whether or
not an earlier version is installed) and creates a series of hash marks to display the command’s
progress. The -i parameter installs the program if it’s not already installed but causes no progress
display. Option C uses a package name, not a complete filename, and so it will fail to install
the package file. The -e option removes a package
Which of the following commands displays help on topic, when typed in a Linux shell?
(Choose all that apply.)
A. manual topic
B. man topic
C. ? topic
D. info topic
B, D. The correct answers, man and info, are two common Linux help packages. Although
? is a common help command within certain interactive programs, it isn’t a help command
in bash or other common Linux shells. There is no common command called manual
A computer’s hardware clock keeps track of the time while the computer is powered off. In
what formats may this time be stored on an x86 Linux system? (Choose all that apply.)
A. Coordinated Universal Time (UTC)
B. Internet Time
C. Local time
D. 12-hour time
A, C. Unix systems traditionally store time in UTC (a.k.a. Greenwich Mean Time), and Linux
may do so as well. Most other x86 PC OSs traditionally store time as the local time however, so
Linux also supports this option. Internet Time is an alternative to the 24-hour clock in which the
day is broken into 1,000 “beats.” Standard PC BIOSs don’t support this time format. Likewise,
a 12-hour clock isn’t terribly useful to computers because it doesn’t differentiate a.m. from p.m.
You want to know what kernel modules are currently loaded. What command would you
type to learn this information?
A. insmod
B. depmod
C. modprobe
D. lsmod
D. Typing lsmod produces a list of the modules that are currently loaded. The insmod and
modprobe programs both load modules—either a single module or a single module and all
those on which it depends, respectively. The depmod command generates the modules.dep file
that contains module dependency information
You want to enable all members of the music group to read the instruments.txt file, which
currently has 0640 (-rw-r-----) permissions, ownership by root, and group ownership by
root. How might you accomplish this goal? (Choose all that apply.)
A. Type chown music instruments.txt in the file’s directory.
B. Type chgrp music instruments.txt in the file’s directory.
C. Type chgroup music instruments.txt in the file’s directory.
D. Type chown .music instruments.txt in the file’s directory.
B, D. The chgrp and chown commands can both change the group ownership of a file. The
chgrp command takes a group name and a filename as parameters, as in option B. The chown
command normally changes a file’s owner; but if you provide a group name preceded by a
dot (.), as in option D, it changes the group of a file. The chown command shown in option
A will change the primary ownership of the file to the music user, if such a user exists on the
system; it won’t change the group ownership. There is no standard chgroup command, as in
option C.
You want to create a link to the /usr/local/bin directory in another location. Which of
the following statements is true?
A. The link will probably have to be a symbolic link.
B. You must own /usr/local/bin to create the link.
C. You can create the link only if the link’s location is on the same filesystem as the
original directory.
D. Only the system administrator can do this.
A. Hard links to directories aren’t permitted by most filesystems, so you’ll probably have to
create a symbolic link, as noted in option A. Contrary to option B, anybody may create a link,
not just the original’s owner. Option C describes a restriction of hard links; but because this
link will probably have to be a symbolic link, this restriction is unimportant and option C is
incorrect. Option D describes a more severe restriction than option B, but it’s incorrect for the
same reasons.
Which of the following, when typed in Vi’s command mode, saves a file and quits the
program?
A. :rq
B. :wq
C. :re
D. :we
B. The colon (:) starts ex mode, from which you can enter commands. In ex mode, r includes
a file in an existing one, w writes a file, e loads an entirely new file, and q quits the program.
Thus, the desired combination is :wq.
A user’s home directory includes a file called ~/.forward that consists of one line:
|~/junkme. What is the effect of this configuration?
A. The user’s incoming mail is forwarded to the junkme user on the same system.
B. The user’s incoming mail is stored in the ~/junkme file.
C. The user’s incoming mail is sent through the ~/junkme program file.
D. The user’s incoming mail is flagged as spam and deleted.
C. The ~/.forward file is a user e‑mail forwarding file. The vertical bar character (|) at the
start of such a file is a code to send the e‑mail through the specified program file, so option C is
correct. To do as option A describes, the file would need to read junkme or junkme@hostname,
where hostname is the computer’s hostname. To do as option B describes, the leading vertical bar
would have to be omitted. It’s conceivable that the ~/junkme script does as option D describes,
but there’s no way of knowing this for certain
You type a command into bash and pass a long filename to it, but after you enter the command,
you receive a File not found error message because of a typo in the filename. How
might you proceed?
A. Retype the command, and be sure you type the filename correctly, letter by letter.
B. Retype the command, but press the Tab key after typing a few letters of the long filename
to ensure that the filename is entered correctly.
C. Press the Up arrow key, and use bash’s editing features to correct the typo.
D. Any of the above.
d
Which of the following commands is implemented as an internal command in bash?
A. cat
B. echo
C. tee
D. sed
B. echo
The echo command is implemented internally to bash, although an external version is
also available on most systems.
The cat, tee, and sed commands are not implemented
internally to bash, although they can be called from bash as external commands.
You type echo $PROC, and the computer replies Go away. What does this mean?
A. No currently running processes are associated with your shell, so you may log out
without terminating them.
B. The remote computer PROC isn’t accepting connections; you should contact its administrator
to correct the problem.
C. Your computer is handling too many processes; you must kill some of them to regain
control of the computer.
D. You, one of your configuration files, or a program you’ve run has set the $PROC environment
variable to Go away.
D. You, one of your configuration files, or a program you’ve run has set the $PROC environment
variable to Go away.
In an xterm window launched from your window manager, you type exec gedit. What
will happen when you exit from the gedit program?
A. Your shell will be a root shell.
B. The gedit program will terminate, but nothing else unusual will happen.
C. Your X session will terminate.
D. The xterm window will close.
D. The exec command causes the rest of the command to replace the current shell.
Thus,
when you exit from gedit in this scenario, the result will be the same as if you’d terminated
the shell, namely, the xterm window will close.
The exec command doesn’t raise the execution
privilege, so option A is incorrect.
Because the xterm window closes, option B is incorrect. X won’t ordinarily
terminate when a single xterm does, and definitely not if that xterm was launched
from a window manager, so option C is incorrect.
What is the surest way to run a program (say, myprog) that’s located in the current working
directory?
A. Type ./ followed by the program name: ./myprog.
B. Type the program name alone: myprog.
C. Type run followed by the program name: run myprog.
D. Type /. followed by the program name: /.myprog.
A. The dot (.) character refers to the current working directory, and the slash (/) is a directory
separator. Thus, preceding a program name by ./ unambiguously identifies the intention to
run the program that’s stored in the current directory.
Option B will run the first instance of
the program that’s found on the current path. Because paths often omit the current directory
for security reasons, this option is likely to fail.
The run command isn’t a standard Linux command,
so option C is unlikely to do anything, much less what the question specifies
Option D
would be correct except that it reverses the order of the two characters. The effect is to attempt
to run the .myprog file in the root (/) directory. This file probably doesn’t exist, and even if it
did, it’s not the file the question specifies should be run
How does man display information by default on most Linux systems?
A. Using a custom X-based application
B. Using the Firefox Web browser
C. Using the less pager
D. Using the Vi editor
C. By default, man uses the less pager to display information on most Linux systems.
Although an X-based version of man does exist (xman), the basic man doesn’t use a custom X-based application, nor does it use Firefox or the Vi editor.
You want to store the standard output of the ifconfig command in a text file (file.txt) for
future reference, and you want to wipe out any existing data in the file. How can you do so?
A. ifconfig < file.txt
B. ifconfig >> file.txt
C. ifconfig > file.txt
D. ifconfig | file.txt
C. ifconfig > file.txt
What is the effect of the following command?
$ myprog &> input.txt
A. Standard error to myprog is taken from input.txt.
B. Standard input to myprog is taken from input.txt.
C. Standard output and standard error from myprog are written to input.txt.
D. All of the above.
C. Standard output and standard error from myprog are written to input.txt.
You want to run an interactive script, gabby, which produces a lot of output in response to
the user’s inputs. To facilitate future study of this script, you want to copy its output to a
file. How might you do this?
A. gabby > gabby-out.txt
B. gabby | tee gabby-out.txt
C. gabby < gabby-out.txt
D. gabby &> gabby-out.txt
B. The tee command sends its output both to standard output and to a named file. Thus,
placing the tee command (with an output filename) after another command and a pipe will
achieve the desired effect. Options A and D redirect gabby’s output to a file, which means
you won’t be able to see the output and interact with it. Option C sends the contents of
gabby-out.txt to gabby as input, which isn’t what’s desired, either.
A text-mode program, verbose, prints a lot of spurious “error” messages to standard error.
How might you get rid of those messages while still interacting with the program?
A. verbose | quiet
B. verbose &> /dev/null
C. verbose 2> /dev/null
D. verbose > junk.txt
C. The 2> redirection operator redirects standard error only, leaving standard output unaffected. Sending standard error to /dev/null gets rid of it.

Option A pipes the standard
output of verbose through the quiet program, which isn’t a standard Linux program.
Option B sends both standard output and standard error to /dev/null, so you won’t be
able to interact with the program, as the question specifies you must be able to do. Option
D redirects standard output only to the junk.txt file, so once again, interaction will be
impossible—and you’ll see the unwanted error messages on the screen.
How do the > and >> redirection operators differ?
A. The > operator creates a new file or overwrites an existing one; the >> operator creates
a new file or appends to an existing one.
B. The > operator creates a new file or overwrites an existing one; the >> operator
appends to an existing file or issues an error message if the specified file doesn’t exist.
C. The > operator redirects standard output; the >> operator redirects standard error.
D. The > operator redirects standard output; the >> operator redirects standard input.
A. Option A correctly describes the difference between these two redirection operators.
Option B is almost correct, but the >> operator will create a new file if one doesn’t already
exist. The >> operator does not redirect standard error (as stated in option C) or standard
input (as stated in option D).
What program would you use to display the end of a configuration file?
A. uniq
B. cut
C. tail
D. wc
C. The tail command displays the final 10 lines of a file. (You can change the number of
lines displayed with the -n option.) The uniq command removes duplicate lines from a list.
The cut command echoes the specified characters or fields from an input text file. The wc
command displays counts of the number of characters, words, and lines in a file.
What is the effect of the following command?
$ pr report.txt | lpr
A. The file report.txt is formatted for printing and sent to the lpr program.
B. The files report.txt and lpr are combined together into one file and sent to standard
output.
C. Tabs are converted to spaces in report.txt, and the result is saved in lpr.
D. None of the above.
A. The pr program takes a text file as input and adds formatting features intended for
printing, such as a header and blank lines to separate pages. The command also pipes the
output through lpr (which is a Linux printing command).
Which of the following commands will number the lines in aleph.txt? (Select all that apply.)
A. fmt aleph.txt
B. nl aleph.txt
C. cat -b aleph.txt
D. cat -n aleph.txt
B, C, D. The nl command numbers lines, so it does this task without any special options.
(Its options can fine-tune the way it numbers lines, though.) The cat command can also
number lines via its -b and -n options; -b numbers non-blank lines, whereas -n numbers
all lines (including blank lines). The fmt command is the only one described here that will
not number the lines of the input file.
Which of the following commands will change all occurrences of dog in the file animals.txt
to mutt in the screen display?
A. sed –s “dog” “mutt” animals.txt
B. grep –s “dog||mutt” animals.txt
C. sed ‘s/dog/mutt/g’ animals.txt
D. cat animals.txt | grep –c “dog” “mutt”
C. The sed utility can be used to “stream” text and change one value to another. In this
case, the s option is used to replace dog with mutt. The syntax in option A is incorrect,
and choices B and D are incorrect because grep doesn’t include the functionality needed to make the changes.
You’ve received an ASCII text file (longlines.txt) that uses no carriage returns within
paragraphs but two carriage returns between paragraphs. The result is that your preferred
text editor displays each paragraph as a very long line. How can you reformat this file so
that you can more easily edit it (or a copy)?
A. sed ‘s/Ctrl-M/NL/‘ longlines.txt
B. fmt longlines.txt > longlines2.txt
C. cat longlines.txt > longlines2.txt
D. pr longlines.txt > longlines2.txt
B. The fmt command performs the desired task of shortening long lines by inserting carriage returns. It sends its results to standard output, so option B uses output redirection to save the results in a new file. The sed command of option A won’t accomplish anything useful; it only replaces the string Ctrl-M with the string NL. Although these strings are both sometimes used as abbreviations for carriage returns or new lines, the replacement of these literal strings isn’t what’s required. Option C creates an exact copy of the original file, with the long single-line paragraphs intact. Although option D’s pr command is a formatting tool, it won’t reformat individual paragraphs. It will also add headers that you probably don’t want.
Which of the following commands will print lines from the file world.txt that contain
matches to changes and changed?
A. grep change[ds] world.txt
B. sed change[d-s] world.txt
C. od “change’d|s’“ world.txt
D. cat world.txt changes changed
A. The grep utility is used to find matching text within a file and print those lines. It accepts regular expressions, which means you can place in brackets the two characters that differ in the words for which you’re looking. The syntax for sed, od, and cat wouldn’t perform the specified task.
Which of the following regular expressions will match the strings dig and dug but not dog?
A. d.g
B. d[iu]g
C. d[i-u]g
D. di*g
B. The bracket expression within the d[iu]g regular expression means that either i or u
may be the middle character; hence, this regular expression matches both dig and dug but
not dog. Option A’s dot matches any single character, so d.g matches all three words. The
range expression [i-u] matches any single character between i and u, inclusive. Because
o falls between these two letters, option C matches all three words. Finally, di*g matches
dig, diig, diiig, or any other word that begins with d, ends with g, and contains any
number of i letters in-between. Thus, option D matches dig but not dug as required.
What is the purpose of udev?
A. To aid in the development of software
B. To manage the /dev directory tree
C. To load Linux device drivers
D. To store devices’ BIOS configurations in files
B. The udev software creates and manages a dynamic /dev directory tree, adding entries to that directory for devices that exist on the target system.

The udev software has nothing to do with software development (option A).
It doesn’t load drivers (option C), although it does respond to the loading of drivers by creating appropriate entries in /dev.
It also doesn’t store BIOS configuration options in a file (option D).
Which files contain essential system information such as IRQs, DMA channels, and I/O
addresses? (Select all that apply.)
A. /proc/ioports
B. /proc/ioaddresses
C. /proc/dma
D. /proc/interrupts
A, C, D. There is no /proc/ioaddresses file. All the other files listed contain useful information;
/proc/ioports holds information about I/O ports, /proc/dma holds information about DMA port usage, and /proc/interrupts holds information about IRQs.
Typing fdisk -l /dev/hda on an x86 Linux computer produces a listing of four partitions:
/dev/hda1, /dev/hda2, /dev/hda5, and /dev/hda6. Which of the following is true?
A. The disk contains two primary partitions and two extended partitions.
B. Either /dev/hda1 or /dev/hda2 is an extended partition.
C. The partition table is corrupted; there should be a /dev/hda3 and a /dev/hda4 before /dev/hda5.
D. If you add a /dev/hda3 with fdisk, /dev/hda5 will become /dev/hda6 and /dev/hda6 will become /dev/hda7.
B. Logical partitions are numbered 5 and up, and they reside in an extended partition with
a number between 1 and 4. Therefore, one of the first two partitions must be an extended
partition that houses partitions 5 and 6. Because logical partitions are numbered starting
at 5, their numbers won’t change if /dev/hda3 is subsequently added. The disk holds one
primary, one extended, and two logical partitions
A new Linux administrator plans to create a system with separate /home, /usr/local, and /etc partitions. Which of the following best describes this configuration?
A. The system won’t boot because /etc contains configuration files necessary to mount non-root partitions.
B. The system will boot, but /usr/local won’t be available because mounted partitions must be mounted directly off their parent partition, not in a subdirectory.
C. The system will boot only if the /home partition is on a separate physical disk from the /usr/local partition.
D. The system will boot and operate correctly, provided each partition is large enough for its intended use.
A. The /etc/fstab file contains the mapping of partitions to mount points, so /etc must be an ordinary directory on the root partition, not on a separate partition.

Options B and C describe restrictions that don’t exist.
Option D would be correct if /etc were not a separate partition
Which of the following directories is most likely to be placed on its own hard disk partition?
A. /bin
B. /sbin
C. /mnt
D. /home
D. The /home directory is frequently placed on its own partition in order to isolate it from the rest of the system and sometimes to enable use of a particular filesystem or filesystem mount options. The /bin and /sbin directories should never be split off from the root (/) filesystem because they contain critical executable files that must be accessible in order to do the most basic work, including mounting filesystems. The /mnt directory often contains subdirectories used for mounting floppy disks, CD-ROMs, and other removable media or may be used for this purpose itself. It’s seldom used to directly access hard disk partitions, although it can be used for this purpose.
You discover that an x86 hard disk has partitions with type codes of 0x0f, 0x82, and 0x83. Assuming these type codes are accurate, what can you conclude about the disk?
A. The disk holds a partial or complete Linux system.
B. The disk holds DOS or Windows 9x/Me and Windows NT/200x/XP installations.
C. The disk holds a FreeBSD installation.
D. The disk is corrupt; those partition type codes are incompatible.
A. The 0x0f partition type code is one of two valid partition type codes for an extended partition. (The other is 0x05.)

The 0x82 code refers to a Linux swap partition, whereas 0x83 denotes a Linux filesystem partition. Thus, it appears that this disk holds Linux partitions. Windows 9x/Me, Windows NT/200x/XP, and FreeBSD all use other partition type codes for their partitions. Partitions exist, in part, to enable different OSs to store their data side-by-side on the same disk, so mixing several partition types (even for different OSs) on one disk doesn’t indicate disk corruption.
What does the following command accomplish?
# mkfs -t ext2 /dev/sda4

A. It sets the partition table type code for /dev/sda4 to ext2.
B. It converts a FAT partition into an ext2fs partition without damaging the partition’s existing files.
C. It creates a new ext2 filesystem on /dev/sda4, overwriting any existing filesystem and data.
D. Nothing; the -t option isn’t valid, and so it causes mkfs to abort its operation.
C. The mkfs command creates a new filesystem, overwriting any existing data and therefore making existing files inaccessible. This command doesn’t set the partition type code in the partition table. The -t ext2 option tells mkfs to create an ext2 filesystem; it’s a perfectly valid option.
Which of the following best summarizes the differences between DOS’s FDISK and Linux’s fdisk?
A. Linux’s fdisk is a simple clone of DOS’s FDISK but written to work from Linux rather than from DOS or Windows.
B. The two are completely independent programs that accomplish similar goals, although Linux’s fdisk is more flexible.
C. DOS’s FDISK uses GUI controls, whereas Linux’s fdisk uses a command-line interface, but they have similar functionality.
D. Despite their similar names, they’re completely different tools—DOS’s FDISK handles disk partitioning, whereas Linux’s fdisk formats floppy disks.
B. Although they have similar names and purposes, Linux’s fdisk isn’t modeled after DOS’s FDISK. DOS’s FDISK does not have GUI controls. Linux’s fdisk does not format floppy disks.
What mount point should you associate with swap partitions?
A. /
B. /swap
C. /boot
D. None
D. Swap partitions aren’t mounted in the way filesystems are, so they have no associated
mount points.
Which of the following options is used with fsck to force it to use a particular filesystem type?
A. -A
B. -N
C. -t
D. -C
C. The –t option is used to tell fsck what filesystem to use. Normally, fsck determines the filesystem type automatically. The –A option causes fsck to check all the filesystems marked to be checked in /etc/fstab. The –N option tells fsck to take no action and to display what it would normally do without doing it. The –C option displays a text-mode progress indicator of the check process.
Which of the following pieces of information can df not report?
A. How long the filesystem has been mounted
B. The number of inodes used on an ext3fs partition
C. The filesystem type of a partition
D. The percentage of available disk space used on a partition
A. A default use of df reports the percentage of disk space used. The number of inodes and filesystem types can both be obtained by passing parameters to df. This utility does not report how long a filesystem has been mounted.
What is an advantage of a journaling filesystem over a conventional (non-journaling) filesystem?
A. Journaling filesystems are older and better tested than non-journaling filesystems.
B. Journaling filesystems never need to have their filesystems checked with fsck.
C. Journaling filesystems support Linux ownership and permissions; non-journaling filesystems don’t.
D. Journaling filesystems require shorter disk checks after a power failure or system crash.
D. The journal of a journaling filesystem records pending operations, resulting in quicker disk checks after an uncontrolled shutdown. Contrary to option A, journaling filesystems are, as a class, newer than non-journaling filesystems; in fact, the journaling ext3fs is built upon the non-journaling ext2fs. Although disk checks are quicker with journaling filesystems than with non-journaling filesystems, journaling filesystems do have fsck utilities, and these may still need to be run from time to time. All Linux native filesystems support Linux ownership and permissions; this isn’t an advantage of journaling filesystems, contrary to option C.
To access files on a USB pen drive, you type mount /dev/sdc1 /media/pen as root. Which types of filesystems will this command mount?
A. Ext2fs
B. FAT
C. HFS
D. All of the above
D. When typed without a filesystem type specification, mount attempts to auto-detect the filesystem type. If the media contains any of the specified filesystems, it should be detected and the disk mounted
Which of the following /etc/fstab entries will mount /dev/sdb2 as the /home directory at boot time?

A. /dev/sdb2 reiserfs /home defaults 0 0
B. /dev/sdb2 /home reiserfs defaults 0 0
C. /home reiserfs /dev/sdb2 noauto 0 0
D. /home /dev/sdb2 reiserfs noauto 0 0
B. The /etc/fstab file consists of lines that contain the device identifier, the mount point, the filesystem type code, filesystem mount options, the dump flag, and the filesystem check frequency, in that order.

Option B provides this information in the correct order and so will work.
Option A reverses the second and third fields but is otherwise correct.
Options C and D both scramble the order of the first three fields and also specify the noauto mount option, which causes the filesystem to not mount automatically at boot time.
What filesystem options might you specify in /etc/fstab to make a removable disk (USB pen drive, Zip disk, floppy disk, and so on) user-mountable? (Select all that apply.)
A. user
B. users
C. owner
D. owners
A, B, C. The user, users, and owner options in /etc/fstab all enable ordinary users to mount a filesystem, but with slightly different implications: user enables anybody to mount a filesystem, and only that user may unmount it; users enables anybody to mount a filesystem, and anybody may unmount it; and owner enables only the owner of the mount point to mount or unmount a filesystem. Any of these is likely to be accompanied by noauto, which revents Linux from attempting to mount the filesystem at boot time.

The owners parameter of option D doesn’t exist.
You want to use /media/cdrom to access your CD-ROM drive, so you insert a CD-ROM
into the drive and type mount /media/cdrom /dev/cdrom as root. You receive the error
message /media/cdrom is not a block device. Why did this happen?
A. You must first prepare the mount point by typing mountpoint /media/cdrom; only
then will the mount command succeed.
B. The command reverses the order of the CD-ROM device file and the mount point; it
should be mount /dev/cdrom /media/cdrom.
C. The /dev/cdrom filename isn’t valid; you must determine what device file is associated
with your CD-ROM drive.
D. The CD-ROM is defective or the CD-ROM drive is malfunctioning. Try another
CD-ROM and, if necessary, replace the drive.
B. The mount command takes a device filename first and a mount point second, so option B is correct.

There is no need for special mount point preparation, as option A implies, other
than the existence of the mount point directory.
Contrary to option C, /dev/cdrom is often a
valid device file for CD-ROMs (or more precisely, a symbolic link to a valid device file). Furthermore, the error message mentions /media/cdrom, not /dev/cdrom. Defective CD-ROMs and drives can certainly cause problems, as
option D implies, but this error message refers to block devices, suggesting the problem is one of Linux configuration, not media viability.
What is wrong with the following /etc/fstab file entry? (Select all that apply.)
/dev/hda8 nfs default 0 0
A. The entry is missing a mount point specification.
B. All /etc/fstab fields should be separated by commas.
C. The default option may only be used with ext2 filesystems.
D. /dev/hda8 is a disk partition, but nfs indicates a network filesystem.
A, D. A mount directory must be specified between the device entry (/dev/hda8) and the filesystem type code (nfs). The nfs filesystem type code may only be used with an NFS export specification of the form server:/export as the device specification. Fields in /etc/fstab are separated by spaces or tabs, not commas (but commas are used between individual options if several options are specified in the options column). The default option may be used with any filesystem type.
You want to discover the sizes of several dot files in a directory. Which of the following
commands might you use to do this?
A. ls -la
B. ls -p
C. ls -R
D. ls -d
A. The -l parameter produces a long listing, including file sizes. The -a parameter produces a listing of all files in a directory, including the dot files. Combining the two produces the desired information (along with information about other files). The -p, -R, and -d options don’t have the specified effects.
You want to move a file from your hard disk to a USB pen drive. Which of the following
is true?
A. You’ll have to use the --preserve option to mv to keep ownership and permissions set
correctly.
B. The mv command will adjust filesystem pointers without physically rewriting data if
the pen drive uses the same filesystem type as the hard disk partition.
C. You must use the same filesystem type on both media to preserve ownership and
permissions.
D. The mv command will delete the file on the hard disk after copying it to the pen drive.
D. When moving from one partition or disk to another, mv must necessarily read and copy
the file and then delete the original if that copy was successful. If both filesystems support ownership and permissions, they’ll be preserved; mv doesn’t need an explicit --preserve option to do this, and this preservation does not rely on having exactly the same filesystem types. Although mv doesn’t physically rewrite data when moving within a single low-level filesystem, this approach can’t work when you’re copying to a separate low-level filesystem (such as from a hard disk to a pen drive); if the data isn’t written to the new location, it won’t be accessible should the disk be inserted in another computer.
You type mkdir one/two/three and receive an error message that reads, in part, No such
file or directory. What can you do to overcome this problem? (Select all that apply.)
A. Add the --parents parameter to the mkdir command.
B. Issue three separate mkdir commands: mkdir one, then mkdir one/two, and then
mkdir one/two/three.
C. Type touch /bin/mkdir to be sure the mkdir program file exists.
D. Type rmdir one to clear away the interfering base of the desired new directory tree.
A, B. If you try to create a directory inside a directory that doesn’t exist, mkdir responds with a No such file or directory error. The --parents parameter tells mkdir to automatically
create all necessary parent directories in such situations. You can also manually do this by creating each necessary directory separately.
Which of the following commands are commonly used to create archive files? (Select all
that apply.)
A. restore
B. tar
C. tape
D. cpio
B, D. The tar and cpio programs are common Linux archive-creation utilities. The restore
command restores (but does not back up) data; its backup counterpart command is dump, but dump is no longer a recommended backup tool on Linux. There is no standard tape command in Linux.
You’ve received a tarball called data79.tar from a colleague, but you want to check the
names of the files it contains before extracting them. Which of the following commands
would you use to do this?
A. tar uvf data79.tar
B. tar cvf data79.tar
C. tar xvf data79.tar
D. tar tvf data79.tar
D. With the tar utility, the --list (t) command is used to read the archive and display its contents. The --verbose (v) option creates a verbose file listing, and --file (f) specifies
the filename—data79.tar in this case. Option D uses all of these features.
Options A, B, and C all substitute other commands for --list, which is required by the question.
You want to create a link from your home directory on your hard disk to a directory on a
CD-ROM drive. Which of the following types of links might you use?
A. Only a symbolic link.
B. Only a hard link.
C. Either a symbolic or a hard link.
D. None of the above; such links aren’t possible under Linux.
A. Symbolic links can point across filesystems, so creating a symbolic link from one filesystem (in which your home directory resides) to another (on the CD-ROM) isn’t a problem.
Hard links, as in options B and C, are restricted to a single filesystem and so won’t work for the described purpose. Because symbolic links will work as described, option D is incorrect
What command would you type (as root) to change the ownership of somefile.txt from
ralph to tony?
A. chown ralph:tony somefile.txt
B. chmod somefile.txt tony
C. chown somefile.txt tony
D. chown tony somefile.txt
D. Option D is the correct command. Typing chown ralph:tony somefile.txt, as in option A, sets the owner of the file to ralph and the group to tony. The chmod command used in option B is used to change file permissions, not ownership. Option C reverses the order of the filename and the owner.
Typing ls -ld wonderjaye reveals a symbolic file mode of drwxr-xr-x. Which of the
following are true? (Select all that apply.)
A. wonderjaye is a symbolic link.
B. wonderjaye is an executable program.
C. wonderjaye is a directory.
D. wonderjaye may be read by all users of the system.
C, D. The d character that leads the mode indicates that the file is actually a directory,
whereas the r symbol in the r-x triplet at the end of the symbolic mode indicates that all
users of the system have read access to the directory. Symbolic links are denoted by leading l characters, which this mode lacks, so option A is incorrect. Although the x symbols usually denote executable program files, as specified in option B, in the case of directories this permission bit indicates that the directory’s contents may be searched; executing a directory is meaningless.
When should programs be configured SUID root?
A. At all times; this permission is required for executable programs.
B. Whenever a program should be able to access a device file.
C. Only when they require root privileges to do their job.
D. Never; this permission is a severe security risk.
C. The set user ID (SUID) bit enables programs to run as the program’s owner rather than as the user who ran them. This makes SUID root programs risky, so setting the SUID bit on root-owned programs should be done only when it’s required for the program’s normal functioning, as stated in option C.
Which of the following commands would you type to enable world read across access to the file myfile.txt? (Assume that you’re the owner of myfile.txt.)
A. chmod 741 myfile.txt
B. chmod 0640 myfile.txt
C. chmod u+r myfile.txt
D. chmod o+r myfile.txt
D. Using symbolic modes, the o+r option adds read (r) permissions to the world (o). Thus,
option D is correct.
Option A sets the mode to rwxr----x, which is a bit odd and doesn’t provide world read access to the file, although it does provide world execute access.
Option B sets the mode to rw-r-----, which gives the world no access whatsoever to the file.
Option C adds read access to the file for the owner (u) if the owner doesn’t already have this access; it doesn’t affect the world permissions.
Which of the following umask values will result in files with rw-r----- permissions?
A. 640
B. 210
C. 022
D. 027
D. Option D, 027, removes write permissions for the group and all world permissions.

Option A, 640, is the octal equivalent of the desired rw-r----- permissions; but the umask sets the bits that are to be removed from permissions, not those that are to be set

Option B, 210, would remove write
permission for the owner, but it wouldn’t remove write permission for the group, which is incorrect. This would also leave all world permissions open

Finally, option C, 022, wouldn’t remove world read permission.
You see the usrquota and grpquota options in the /etc/fstab entry for a filesystem.
What is the consequence of these entries?
A. Quota support will be available if it’s compiled into the kernel; it will be automatically
activated when you mount the filesystem.
B. Quota support will be available if it’s compiled into your kernel, but you must activate it with the quotaon command.
C. Quota support will be disabled on the filesystem in question unless you activate it with the quotaon command.
D. Nothing; these options are malformed and so will have no effect.
B. Using quotas requires kernel support, the usrquota or grpquota (for user or group
quotas) filesystem mount option, and activation via the quotaon command (which often appears in SysV startup scripts). Thus, option B is correct. Option A suggests that quotaon is not necessary, and option C suggests that quotaon is sufficient, but neither is true. The usrquota and grpquota options are both valid, so option D is incorrect.
Which of the following commands can be used to summarize the quota information about all filesystems?
A. repquota
B. repquota -a
C. quotacheck
D. quotacheck -a
B. The repquota utility is used to summarize the quota information about the filesystem.
When used with the –a option, it shows this information for all filesystems. The quotacheck utility checks quota information about a disk and writes corrections.
You’ve installed a commercial spreadsheet program called WonderCalc on a workstation.
In which of the following directories are you most likely to find the program executable
file?
A. /usr/sbin
B. /etc/X11
C. /bin
D. /opt/wcalc/bin
D. The /opt directory tree exists to hold programs that aren’t a standard part of a Linux distribution, such as commercial programs. These programs should install in their own directories under /opt; these directories usually have bin subdirectories of their own, although this isn’t required. The /usr/sbin directory holds programs that are normally run only by the system administrator, and /bin holds critical basic binary files. The /etc/X11 directory holds X-related configuration files. None of these directories is an appropriate place for a spreadsheet
program.
Which of the following file-location commands is likely to take the most time to find a file
that may be located anywhere on the computer (assuming the operation succeeds)?
A. The find command.
B. The locate command.
C. The whereis command.
D. They’re all equal in speed.
A. The find utility operates by searching all files in a directory tree, and so it’s likely to
take a long time to search all of a computer’s directories. The locate program uses a precompiled database, and whereis searches a limited set of directories, so these commands will take less time.
What can the type command do that whereis can’t do?
A. Identify the command as being for x86 or x86-64 CPUs
B. Locate commands based on their intended purpose, not just by name
C. Identify a command as an alias, internal command, or external command
D. Assist in typing a command by finishing typing it for you
C. The type command identifies a command, as executed by the shell, as being a built-in
shell command, a shell alias, or an external command, whereas the whereis command
helps find the location of external command files. Neither type nor whereis identifies the
CPU architecture of a program file, can locate commands based on intended purpose, or
complete an incompletely typed command.
You want to track down all the files in /home that are owned by karen. Which of the following
commands will do the job?
A. find /home -uid karen
B. find /home -user karen
C. locate /home -username karen
D. locate /home karen
B. The find command includes the ability to search by username using the -user name
option, where name is the username; thus, option B is correct. The -uid option to find can
also locate files owned by a user; but it takes a numeric user ID (UID) number as an argument,
so option A isn’t quite correct. The locate command provides no ability to search by
user, so options C and D are incorre
What can you conclude from the following interaction?
$ which man
/usr/bin/man
A. The only file called man on the system is in /usr/bin.
B. The /usr/bin/man program was installed by system package tools.
C. The /usr/bin/man program will be run by any user who types man.
D. The first instance of the man program, in path search order, is in /usr/bin.
D. The which program searches the path just as bash does, but it prints the path to the first
executable program it finds on the path. Thus, option D is correct. The which program
doesn’t conduct an exhaustive search of the system, so there could be many more files called man on the system, contrary to option A. System package tools and which aren’t closely related; option B is incorrect. Although /usr/bin/man would be run when the user whose which output matches that in the question types man, this may not be true of others because the path can vary from one user to another. Thus, option C is incorrect
1.Where might the BIOS find a boot loader?
A. RAM
B. /dev/boot
C. MBR
D. /dev/kmem
C. The Master Boot Record (MBR) can contain a boot loader that is up to 512 bytes in size. If more space is required, the boot loader must load a secondary boot loader.

Although the boot loader is laoded into RAM it's not stored there permanently because RAM is volatile storage

/dev/boot and /dev/kmem and are meaningful only after the BIOS has found a boot loader
2.You want to boot a Linux system into single-user mode. What might you type at a LILO
boot: prompt to accomplish this task?
A. s
B. single-user
C. linux 1
D. telinit 6
C. You can type a stanza name (such as linux, although this can vary) and a runlevel number (such as 1) at a LILO boot: prompt to boot into the specified runlevel; runlevel 1 is
single-user mode.
Option A won’t do the trick unless you’ve got a stanza called s and your system is configured to boot into single-user mode by default.
Option B is similar. Option C is a command you can type once Linux has booted to reboot the computer, but it won’t work as described at a LILO boot: prompt.
3. After booting, one of your hard disks doesn’t respond. What might you do to find out
what’s gone wrong?
A. Check the /var/log/diskerror log file to see what’s wrong.
B. Verify that the disk is listed in /mnt/disks.
C. Check the contents of /etc/inittab to be sure it’s mounting the disk.
D. Type dmesg | less, and peruse the output for disk-related messages.
D. The kernel ring buffer, which can be viewed by typing dmesg (piping this through less is a good supplement), contains messages from the kernel, including those from hardware drivers.

log/diskerror file is fictitious, as is /mnt/disks. The /etc/inittab file doesn’t directly
control disk access and so is unlikely to provide useful information
4. What is the first program that the Linux kernel runs once it’s booted in a normal boot
process?
A. dmesg
B. init
C. startup
D. rc
B. Ordinarily, Linux runs init as the first program; init then runs, via various scripts,
other programs.

The dmesg program is a user diagnostic and information tool used to access the kernel ring buffer; it’s not part of the startup process. The startup program is fictitious.
The rc program is a script that init calls, typically indirectly, during the startup sequence, but it’s not the first program the kernel runs.
5. Which of the following is the LILO boot loader configuration file?
A. /dev/lilo
B. The MBR
C. /boot/lilo/lilo.conf
D. /etc/lilo.conf
D. Option D is the correct LILO configuration file.

Option A is a fictitious file;
Option B: LILO's boot loader code may be written to MBR this isnt the location of the LILO config file
Option C resembles the location of the GRUB configuration file
6. What should be the first line of a LILO configuration file stanza intended to boot a Linux
kernel stored as /boot/bzImage-2.6.26?
A. image=/boot/bzImage-2.6.26
B. image /boot/bzImage-2.6.26
C. kernel /boot/bzImage-2.6.26
D. kernel=/boot/bzImage-2.6.26
A. The image keyword identifies a kernel file in the LILO configuration file, and an equal
sign (=) separates this keyword from the filename.

Option B no =
option C/D user kernel keyword
GRUB uses kernel but a slightly differently from the way LILO uses
7. Which command is used to install GRUB into the MBR of your first ATA hard drive?
A. grub (hd0,1)
B. grub-install /dev/hda1
C. lilo /dev/hda
D. grub-install /dev/hda
D. You use grub-install to install the GRUB boot loader code into an MBR or boot sector.
When using grub-install, you specify the boot sector on the command line. The MBR
is the first sector on a hard drive, so you give it the Linux device identifier for the entire hard disk, /dev/hda.

Option A. sepcifies using grub utility, which is an interactive tool and the device identifier shown in option A is a GRUB-style identifier for what would probably be the /dev/hda3
Option B is almost correct but installs GRUB to the /dev/hda1 partition’s boot sector rather than the hard disk’s MBR.
Option C is the command to install LILO to the MBR rather than to install GRUB.
8. The string root (hd1,5) appears in your /boot/grub/menu.lst file. What does this mean?
A. GRUB tells the kernel that its root partition is the fifth partition of the first disk.
B. GRUB looks for files on the sixth partition of the second disk.
C. GRUB looks for files on the fifth partition of the first disk.
D. GRUB installs itself in /dev/hd1,5.
B. The root keyword in a GRUB configuration file tells GRUB where to look for files,
including its own configuration files, kernel files, and so on. Because GRUB numbers starting from 0, (hd1,5) refers to the sixth partition on the second disk

Option A is incorrect because you pass the Linux root partition to the kernel on the kernel line.
Options B and C both misinterpret the GRUB numbering scheme. The GRUB installation location is specified on the grub-install command line, and /dev/hd1,5 isn’t a standard Linux device file
9. What line in /etc/inittab would indicate that your default runlevel is 5?
A. ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
B. id:5:initdefault:
C. si:5:sysinit:/etc/init.d/rcS
D. l5:5:wait:/etc/init.d/rc 5
B. The initdefault action specifies the default runlevel.
Which runlevels are reserved by init for reboot, shutdown, and single-user mode purposes?
(Select all that apply.)
A. 0
B. 1
C. 5
D. 6
A, B, D.

Runlevel 0 is the reserved runlevel for halting the system. Runlevel 1 is reserved
for single-user mode. Runlevel 6 is reserved for rebooting. Runlevel 5 is a regular, userconfigurable runlevel. (Many systems use it for a regular boot with a GUI login prompt.)
11. You type the following command:
$ runlevel
5 3
What can you tell about your runlevel status? (Select all that apply.)
A. The current runlevel is 5.
B. The current runlevel is 3.
C. The previous runlevel is 5.
D. The previous runlevel is 3.
B, C. The first number in the runlevel output is the previous runlevel (the letter N is used
to indicate that the system hasn’t changed runlevels since booting). The second number is the current runlevel.
12 A system administrator types the following command:
# shutdown -c
What is the effect of this command?
A. A previously scheduled shutdown is cancelled.
B. The system shuts down and reboots immediately.
C. The system shuts down and halts immediately.
D. The system asks for confirmation and then shuts down.
A. The -c option to shutdown cancels a previously scheduled shutdown.

Options B and C
describe the effects of the -r and -h options to shutdown, respectively. No shutdown option
asks for confirmation before taking action, although you can delay a shutdown by specifying a shutdown time in the future.
13. Which of the following commands may not be used instead of shutdown in certain circumstances?
A. reboot
B. halt
C. poweroff
D. takedown
D. There is no standard takedown command in Linux. The reboot command is equivalent
to shutdown -r, halt is equivalent to shutdown -H, and poweroff is equivalent to shutdown -P
15. What does runlevel 4 do?
A. It reboots the computer.
B. It starts a multi-user system without X running.
C. It starts a multi-user system with X and an X-based login running.
D. Its purpose isn’t standardized, so it can be used for anything you like.
D. Runlevel 4 isn’t standardized, and most distributions don’t use it for anything specific
(although in practice it will do something if you enter it). You can safely redefine runlevel 4
to achieve specific goals.

Option A describes runlevel 6.

Option B describes runlevel 3 on Red Hat and related distributions.

Option C describes runlevel 5 on Red Hat and related distributions.
16. How would you remove two lines of text from a file using Vi?
A. In command mode, position the cursor on the first line and type 2dd.
B. In command mode, position the cursor on the last line and type 2yy.
C. In insert mode, position the cursor at the start of the first line, hold down the Shift key
while pressing the Down arrow key twice, and press the Delete key on the keyboard.
D. In insert mode, position the cursor at the start of the first line and press Ctrl+K twice.
A. In Vi, dd is the command-mode command that deletes lines. Preceding this command by
a number deletes that number of lines. Although yy works similarly, it copies (yanks) text rather than deleting it. Option C works in many more modern text editors, but not in Vi.
Option D works in Emacs and similar text editors, but not in Vi.
17. In Vi’s command mode, you type :q!. What is the effect?
A. Nothing; this isn’t a valid Vi command.
B. The text :q! is inserted into the file you’re editing.
C. The program terminates and saves any existing files that are in memory.
D. The program terminates without saving your work.
D. The :q! Vi command does as option D states.

Option A is simply incorrect

Option B
would be correct if this command were typed while in Vi’s insert mode, but the question
specifies that command mode is in use.

Option C the command would be :wq,
not :q!.
18. What is an advantage of Vi over Emacs?
A. Vi is X-based and so is easier to use than Emacs.
B. Vi is smaller and so can fit on compact emergency systems and embedded devices.
C. Vi’s mode-based operations permit it to handle non-English languages.
D. Vi includes a built-in Web browser and e‑mail client; Emacs doesn’t.
B. Vi is included on Linux emergency disks, embedded systems, and other systems where
space is at a premium because its executable is tiny. Emacs is, in contrast, a behemoth.

Contrary to option A, Vi isn’t an X-based program (although X-based Vi variants are available); Emacs can be used in text mode or with X. Vi’s modes, referred to in
option C, have nothing to do with non-English language support.
Option D is backward; it’s Emacs that includes a Web browser, e‑mail client, and other add-ons.
19. From Vi’s command mode, you want to enter insert mode. How might you do this? (Select all that apply.)
A. Type R.
B. Type i.
C. Type a.
D. Type :.
A, B, C. Typing R in command mode enters insert mode with the system configured to overwrite
existing text. Typing i or a enters insert mode with the system configured to insert
text. (The i and a commands differ in how they place the cursor; a advances one space.)
Typing : in command mode enters ex mode (you typically type the ex-mode command on
the same command line immediately after the colon).
20. How do you exit Vi’s insert mode in order to type command-mode commands?
A. Press the ~ key.
B. Press the Esc key.
C. Type Ctrl+X followed by Ctrl+C.
D. Press the F10 key.
B. The Esc key exits Vi’s insert mode. Typing a tilde (~) inserts that character into the
file. The Ctrl+X, Ctrl+C key combination exits from Emacs, but it’s not a defined Vi key
sequence. The F10 key also isn’t defined in Vi.
14. You want to change to single-user mode on a running system. What command might you
use to do this?
A. runlevel 1
B. telinit 1
C. shutdown -1
D. single-user
B. The telinit command is used to change runlevels; when it’s passed the 1 parameter,
telinit changes to runlevel 1, which is single-user mode. The runlevel command displays
the current runlevel but doesn’t change runlevels. Although telinit can be used to shut
down or reboot the computer, the shutdown command can’t be used to change runlevels
except to runlevel 0 or 6. There is no standard single-user command
1. When you configure an X server, you need to make changes to configuration files and then start or restart the X server. Which of the following can help streamline this process?
A. Shut down X by switching to a runlevel in which X doesn’t run automatically, and then reconfigure it and use startx to test X startup.
B. Shut down X by booting into single-user mode, and then reconfigure X and use telinit to start X running again.
C. Reconfigure X, and then unplug the computer to avoid the lengthy shutdown process before restarting the system and X along with it.
D. Use the startx utility to check the X configuration file for errors before restarting the X server.
A. On most Linux systems, some runlevels don’t run X by default, so using one of them
along with the startx program (which starts X running) can be an effective way to quickly
test changes to an X configuration.

The telinit program changes runlevels, which is a lengthy process compared to using startx. Unplugging the computer to avoid the shutdown process is self-defeating because you’ll have to suffer through a long startup (if you use a non-journaling filesystem), and it can also result in data loss. The startx utility doesn’t check the veracity of an X configuration file; it starts X running from a text-mode login.
4. In what section of XF86Config or xorg.conf do you specify the resolution that you want to run?
A. In the Screen section, subsection Display, using the Modes option
B. In the Monitor section, using the Modeline option
C. In the Device section, using the Modeline option
D. In the DefaultResolution section, using the Define option
A. Option A describes the correct location for this option.
The Modeline option in the Monitor section (as described in option B) defines one possible resolution, but there are usually several Modeline entries defining many resolutions.
The Modeline option doesn’t exist in the Device section (as suggested by option C), nor is that section where the resolution is set. There is no DefaultResolution section (as referenced in option D).
7. How would you change the text displayed by XDM as a greeting?
A. Click Configure -> Greeting from the XDM main menu, and edit the text in the resulting dialog box.
B. Edit the /etc/X11/xdm/Xresources file, and change the text in the xlogin*greeting line.
C. Edit the /etc/X11/xorg.conf file, and change the Greeting option in the xdm area.
D. Run xdmconfig, and change the greeting on the Login tab.
B. The XDM greeting is a resource set in the /etc/X11/xdm/Xresources file
XDM doesn’t offer many options on its main screen and certainly not one to change its greeting, as described in option A.
Although the xorg.conf file mentioned in option C is real, this file provides no XDM configuration options because XDM is a separate program from the X server.
There is no standard xdmconfig program, as mentioned in option D.
8. Which of the following features do KDM and GDM provide that XDM doesn’t?
A. An encrypted remote X-based access ability, improving network security
B. The ability to accept logins from remote computers, once properly configured
C. The ability to select the login environment from a menu on the main login screen
D. A login screen that shows the username and password simultaneously rather than sequentially
C. KDM and GDM add many features, one of which is a menu that enables users to select their desktop environment or window manager when they log in rather than specifying it in a configuration file, as option C states.
Option A describes one of the advantages of the Secure Shell (SSH) as a remote-access protocol.
Option B describes a feature common to all three XDMCP servers. Option D describes the way both KDM and XDM function; GDM is the one that presents username and password fields in series rather than simultaneously.
12. You manage a computer that’s located in Los Angeles, California, but the time zone is misconfigured
as being in Tokyo, Japan. What procedure can you follow to fix this problem? (Select all that apply.)
A. Run hwclock --systohc to update the clock to the correct time zone.
B. Delete /etc/localtime, and replace it with an appropriate file from /usr/share/zoneinfo.
C. Edit the /etc/tzconfig file so that it specifies North_America/Los_Angeles as the time zone.
D. Use the tzselect program to select a new (Los Angeles) time zone.
B, D. Time zones are determined by the /etc/localtime file, so replacing that one with the correct file (a selection is stored in /usr/share/zoneinfo) will fix the problem. (You may also need to edit /etc/timezone or some other file to keep automatic utilities from becoming confused.) Utilities such as tzselect will make these changes for you after prompting you for your location. The hwclock program mentioned in option A reads and writes data from the system’s hardware clock. Although it relies on time zone data, it can’t adjust your system’s time zone itself. There is no standard /etc/tzconfig file, although the tzconfig
program, like tzselect, can help you set the time zone.
15. Which character set encoding is the preferred method on modern Linux systems?
A. UTF-8
B. ASCII
C. ISO-8859-1
D. ISO-8859-8
A. The Unicode Transformation Format 8 (UTF-8) standard can encode characters for just about any language on Earth, while looking just like ordinary ASCII to programs that only understand ASCII. Thus, UTF-8 is the preferred method for character encoding when a choice is possible. ASCII is an old standard that’s adequate for English and a few other languages, but it lacks some or all characters needed by most languages. ISO-8859 is a standard that extends ASCII, but it requires separate encodings for different languages and so is awkward when a computer must process data from multiple languages.
17. What information about print jobs does the lpq command display? (Select two that apply.)
A. The name of the application that submitted the job
B. A numerical job ID that can be used to manipulate the job
C. The amount of ink or toner left in the printer
D. The username of the person who submitted the job
B, D. The job ID and job owner are both displayed by lpq. Unless the application embeds its own name in the filename, that information won’t be present. Most printers lack Linux utilities to query ink or toner status; certainly lpq can’t do this.
18. You’ve submitted several print jobs, but you’ve just realized that you mistakenly submitted a huge document that you didn’t want to print. Assuming you can identify which job this was, that it’s not yet printing, and that its job ID number is 749, what command would you type to delete it from the okidata print queue?
A. The answer depends on whether you’re using BSD LPD, LPRng, or CUPS.
B. lpdel -Pokidata 749
C. lprm -Pokidata 749
D. None of the above; the task is impossible
C. The lprm command deletes a job from the print queue. It can take the -Pqueue option to specify the queue and a print job number or various other parameters to specify which jobs to delete. BSD LPD, LPRng, and CUPS all implement the lprm command, so you can use it with any of these systems. Option B presents the correct syntax but the wrong command name; there is no standard lpdel command.
Which of the following are legal Linux usernames? (Select all that apply.)
A. larrythemoose
B. 4sale
C. PamJones
D. Samuel_Bernard_Delaney_the_Fourth
A, C. A Linux username must contain fewer than 32 characters and start with a letter, and it may consist of letters, numbers, and certain symbols. Options A and C both meet these criteria.

Option B begins with a number, which is invalid. Option D is longer than 32 characters.
Why are groups important to the Linux user administration and security models?
A. They can be used to provide a set of users with access to files without giving all users
access to the files.
B. They allow you to set a single login password for all users within a defined group.
C. Users may assign file ownership to a group, thereby hiding their own creation of the file.
D. By deleting a group, you can quickly remove the accounts for all users in the group.
A. Groups provide a good method of file-access control. Although they may have passwords, these are not account login passwords; those passwords are set on a per-account basis. Files do have associated groups, but these are in addition to individual file ownership and so they can’t be used to mask the file’s owner. Deleting a group does not delete all the accounts associated
with the group.
An administrator types chage -M 7 time. What is the effect of this command?
A. The time account’s password must be changed at least once every seven days.
B. All users must change their passwords at least once every seven days.
C. All users are permitted to change their passwords at most seven times.
D. The time account’s age is set to seven months.
A. The chage command changes various account expiration options. The -M parameter sets the maximum number of days for which a password is valid, and in the context of the given command, time is a username. Thus, option A is correct. Options B, C, and D are all made up.
What is wrong with the following /etc/passwd file entry? (Select all that apply.)
4sally:x:529:Sally Jones:/home/myhome:/bin/passwd
A. The default shell is set to /bin/passwd, which is an invalid shell.
B. The username is invalid; Linux usernames can’t begin with a number.
C. The home directory doesn’t match the username.
D. Either the UID or the GID field is missing.
B, D. As stated in option B, Linux usernames may not begin with numbers, so the username is invalid. The /etc/passwd entries have third and fourth fields of the UID and the GID, but this line has only one of those fields (which one is intended is impossible to determine); this example line’s fourth field is clearly the fifth field of a valid entry.
Option A is incorrect because, although /bin/passwd is an unorthodox login shell, it’s perfectly valid. This configuration might be used on, say, a Samba file server or a POP mail server to enable users to change their passwords via SSH without granting login shell access.
Option C is a correct observation but an incorrect answer; the username and the user’s home directory name need not match.
You want sally, tom, and dale to be members of the group managers (GID 501). How
would you edit the managers entry in /etc/group to accomplish this goal?
A. managers:501:sally tom dale
B. managers:501:sally:tom:dale
C. managers:x:501:sally:tom:dale
D. managers:x:501:dale,sally,tom
D. Option D shows a valid /etc/group entry that has the desired effect. (Note that the order of users in the comma-separated user list is unimportant.)
Option A has two problems: It’s missing a password field (x in the correct entry), and the usernames are separated by spaces rather than commas.
Option B also has two problems: It’s missing a password field, and its usernames are separated by colons rather than commas.
Option C has just one problem: Its usernames are separated by colons rather than commas.
What types of files might be reasonable files to include in /etc/skel? (Select all that apply.)
A. A copy of the /etc/shadow file
B. An empty set of directories to encourage good file management practices
C. A README or similar welcome file for new users
D. A starting .bashrc file
6. B, C, D. Files in /etc/skel are copied from this directory to new users’ home directories by certain account-creation tools. Thus, files you want in all new users’ home directories should reside in /etc/skel. Options B, C, and D all describe reasonable possibilities, although none is absolutely required. Including a copy of /etc/shadow in /etc/skel would be a very bad idea, though, because this would give all users access to all other users’ encrypted passwords, at least as of the moment of account creation.
What would a Linux system administrator type to remove the nemo account and its home
directory?
A. userdel nemo
B. userdel -f nemo
C. userdel -r nemo
D. rm -r /home/nemo
C. The userdel command deletes an account, and the -r option to userdel causes it to delete the user’s home directory and mail spool, thus satisfying the terms of the question.
Option A deletes the account but leaves the user’s home directory intact. Option B does the same; the -f option forces account deletion and file removal under some circumstances, but it’s only meaningful when -r is also used. Option D’s rm command deletes the user’s home directory (assuming it’s located in the conventional place, given the username) but doesn’t delete the user’s account.
Which of the following system logging codes represents the highest priority?
A. emerg
B. warning
C. crit
D. debug
A. The emerg priority code is the highest code available and so is higher than all the other options. (The panic code is equivalent to emerg but isn’t one of the options.)
From highest to lowest priorities, the codes given as options are emerg, crit, warning, and debug.
Which of the following configuration files does the logrotate program consult for its
settings?
A. /etc/logrotate.conf
B. /usr/sbin/logrotate/logrotate.conf
C. /usr/src/logrotate/logrotate.conf
D. /etc/logrotate/.conf
A. The logrotate program consults a configuration file called /etc/logrotate.conf, which includes several default settings and typically refers to files in /etc/logrotate.d to handle specific log files.
You want to create a log file entry noting that you’re manually shutting down the system to
add a new network card. How might you create this log entry, just prior to using shutdown?
A. dmesg -l “shutting down to add network card”
B. syslog shutting down to add network card
C. rsyslogd “shutting down to add network card”
D. logger shutting down to add network card
D. The logger utility can be used to create a one-time log file entry that you specify. In its simplest form, it takes no special arguments, just a message to be inserted in the log file, as in option D. The dmesg utility in option A is used to review the kernel ring buffer; it doesn’t create log file entries. Option B’s syslog command isn’t a Linux user-mode command, although it is the name of the logging system generically, as well as a programming language command name. Option C’s rsyslogd is the name of one of several system logging daemons; it maintains the system log but isn’t used to manually insert log entries.
Your manager has asked that you configure logrotate to run on a regular, unattended basis. What utility/feature should you configure to make this possible?
A. at
B. logrotate.d
C. cron
D. inittab
C. The logrotate program can be started automatically—and unattended—on a regular basis by adding an entry for it in cron. The at utility would be used if you wanted the program to run only once, whereas logrotate.d defines how the program is to handle specific log files. The inittab file is used for services and startup and not for individual programs.
You’ve set your system (software) clock on a Linux-only computer to the correct time,
and now you want to set the hardware clock to match. What command might you type to
accomplish this goal?
A. date --sethwclock
B. ntpdate
C. hwclock --utc --systohc
D. time --set --hw
C. The hwclock utility is used to view or set the hardware clock. The --utc option tells it to use UTC, which is appropriate for a Linux-only system, and --systohc sets the hardware clock based on the current value of the software clock. Thus, option C is correct.
Option A’s date utility can be used to set the software clock but not the hardware clock; it has no --sethwclock option.
Option B’s ntpdate is used to set the software clock to the time maintained by an NTP server; it doesn’t directly set the hardware clock.
Option D’s time command is used to time how long a command takes to complete; it has no --set or --hw option and does not set the hardware clock.
As root, you type date 12110710. What will be the effect?
A. The software clock will be set to 7:10 a.m. on December 11 of the current year.
B. The software clock will be set to 12:11 p.m. on October 7 of the current year.
C. The software clock will be set to 7:10 a.m. on November 12 of the current year.
D. The software clock will be set to 12:11 p.m. on July 10 of the current year.
13. A. The format of the date command’s date code is [MMDDhhmm[[CC]YY][.ss]]. Given that the question specified an eight-digit code, this means that the ordering of the items, in two-digit blocks, is month-day-hour-minute.
Option A correctly parses this order, whereas options B, C, and D do not.
What will be the effect of a computer having the following two lines in /etc/ntp.conf?
server pool.ntp.org
server tardis.example.org
A. The local computer’s NTP server will poll a server in the public NTP server pool; the
first server option overrides subsequent server options.
B. The local computer’s NTP server will poll the tardis.example.org time server; the
last server option overrides earlier server options.
C. The local computer’s NTP server will poll both a server in the public NTP server pool
and tardis.example.org and use whichever site provides the cleanest time data.
D. The local computer’s NTP server will refuse to run because of a malformed server
specification in /etc/ntp.conf.
C. Multiple server entries in /etc/ntp.conf tell the system to poll all the named servers and to use whichever one provides the best time data. Thus, option C is correct.
(The pool.ntp.org subdomain and numbered computers within that subdomain give round-robin access to a variety of public time servers.) Options A and B both incorrectly state that one server statement overrides another, when in fact this isn’t the case. The server statements shown in the question are properly formed.
You’ve configured one computer on your five-computer network, gateway.pangaea.edu, as an NTP server that obtains its time signal from ntp.example.com. What computer(s) should your network’s other computers use as their time source(s)?
A. You should consult a public NTP server list to locate the best server for you.
B. Both gateway.pangaea.edu and ntp.example.com.
C. Only ntp.example.com.
D. Only gateway.pangaea.edu.
D. Once you’ve configured one computer on your network to use an outside time source and run NTP, the rest of your computers should use the first computer as their time reference. This practice reduces the load on the external time servers, as well as your own external network traffic. Thus, option D is correct. (Very large networks might configure two or three internal time servers that refer to outside servers for redundancy, but this isn’t necessary for the small network described in the question.)
Option A describes the procedure to locate a time server for the first computer configured (gateway.pangaea.edu) but not for subsequent computers. Although configuring other computers to use ntp.example.com instead of or in
addition to gateway.pangaea.edu is possible, doing so will needlessly increase your network
traffic and the load on the ntp.example.com server.
Which of the following tasks are likely to be handled by a cron job? (Select all that apply.)
A. Starting an important server when the computer boots
B. Finding and deleting old temporary files
C. Scripting supervised account creation
D. Monitoring the status of servers and e‑mailing a report to the superuser
B, D. The cron utility is a good tool for performing tasks that can be done in an unsupervised manner, like deleting old temporary files or checking to see that servers are running correctly. Tasks that require interaction, like creating accounts, aren’t good candidates for cron jobs, which must execute unsupervised. Although a cron job could restart a crashed server, it’s not normally used to start a server when the system boots; that’s done through SysV startup scripts or a super server.
Which of the following lines, if used in a user cron job, will run /usr/local/bin/cleanup
twice a day?
A. 15 7,19 * * * tbaker /usr/local/bin/cleanup
B. 15 7,19 * * * /usr/local/bin/cleanup
C. 15 */2 * * * tbaker /usr/local/bin/cleanup
D. 15 */2 * * * /usr/local/bin/cleanup
B. User cron jobs don’t include a username specification (tbaker in options A and C). The */2 specification for the hour in options C and D causes the job to execute every other hour; the 7,19 specification in options A and B causes it to execute twice a day, on the 7th and 19th hours (in conjunction with the 15 minute specification, that means at 7:15 a.m. and 7:15 p.m.).
You’re installing Linux on a laptop computer. Which of the following programs might you want to add to ensure that log rotation is handled correctly?
A. tempus
B. anacron
C. crontab
D. ntpd
B. The anacron program is a supplement to cron that helps ensure that log rotation, /tmp directory cleanup, and other traditional cron tasks are handled even when the computer is shut down (and, hence, when cron isn’t running) for extended periods of time. Thus, this is the program to add to the system to achieve the stated goal. There is no common Linux utility called tempus. Option C’s crontab is the name of a file or program for controlling cron, which is likely to be an unreliable means of log rotation on a laptop computer. The ntpd program is the NTP daemon, which helps keep the system clock in sync with an external source. Although running ntpd on a laptop computer is possible, it won’t directly help with the task of scheduling log rotation.
What do the following commands accomplish? (The administrator presses Ctrl+D after typing the second command.)
# at teatime
at> /usr/local/bin/system-maintenance
A. Nothing; these commands aren’t valid.
B. Nothing; teatime isn’t a valid option to at.
C. Nothing; you may only type valid bash built-in commands at the at> prompt.
D. The /usr/local/bin/system-maintenance program or script is run at 4:00 p.m..
D. The at command runs a specified program at the stated time in the future. This time may be specified in several ways, one of which is teatime, which stands for 4:00 p.m. Thus, option D is correct. The objections stated in options A, B, and C are all invalid.
How might you schedule a script to run once a day on a Linux computer? (Select all that apply.)
A. Place the script, or a link to it, in /etc/cron.daily.
B. Use the at command to schedule the specified script to run on a daily basis at a time of your choosing.
C. Create a user cron job that calls the specified script once a day at a time of your choosing, and install that cron job using crontab.
D. Use run-parts to schedule the specified script to run on a daily basis.
A, C. The contents of /etc/cron.daily are automatically run on a daily basis in most Linux distributions, and the crontab utility can create user cron jobs that run programs at arbitrary time intervals, so both A and C are correct. The at command noted in option B can be used to run a program a single time, but not on a regular basis (such as daily). The run-parts utility is used by some distributions as a tool to help run programs in the /etc/cron.* subdirectories, but it’s not used to schedule jobs.
Which types of network hardware does Linux support? (Select all that apply.)
A. Token Ring
B. Ethernet
C. DHCP
D. Fibre Channel
A, B, D. Ethernet is currently the most common type of wired network hardware for local networks. Linux supports it very well, and Linux also includes support for Token Ring and Fibre Channel network hardware

DHCP is a protocol used to obtain a TCP/IP configuration
over a TCP/IP network. It’s not a type of network hardware, but it can be used over hardware that supports TCP/IP.
Which of the following is a valid IPv4 address for a computer on a TCP/IP network?
A. 202.9.257.33
B. 63.63.63.63
C. 107.29.5.3.2
D. 98.7.104.0/24
B
You want to set up a computer on a local network via a static TCP/IP configuration, but you lack a gateway address. Which of the following is true?
A. Because the gateway address is necessary, no TCP/IP networking functions will work.
B. TCP/IP networking will function, but you’ll be unable to convert hostnames to IP
addresses or vice versa.
C. You’ll be able to communicate with machines on your local network segment but not
with other systems.
D. The computer won’t be able to tell which other computers are local and which are remote.
C. The gateway computer is a router that transfers data between two or more network segments. As such, if a computer isn’t configured to use a gateway, it won’t be able to communicate beyond its local network segment. (If your DNS server is on a different network segment, name resolution via DNS won’t work, although other types of name resolution, such as /etc/hosts file entries, will still work.)
Using a packet sniffer, you notice a lot of traffic directed at TCP port 22 on a local computer.
What protocol does this traffic use, assuming it’s using the correct port?
A. HTTP
B. SMTP
C. Telnet
D. SSH
D. The Secure Shell (SSH) protocol uses port 22
Telnet - 23
HTTP - 80
SMTP - 25
What network port would an IMAP server normally use for IMAP exchanges?
A. 21
B. 25
C. 110
D. 143
D. 143
Which of the following is not a Linux DHCP client?
A. pump
B. dhcpcd
C. dhcpd
D. dhclient
C. Option C, dhcpd, is the Linux DHCP server. The others are all DHCP clients. Any given computer will use just one DHCP client (or none at all), but from one to three of A, B, and D will be available choices.
Which of the following types of information are returned by typing ifconfig eth0? (Select all that apply.)
A. The names of programs that are using eth0
B. The IP address assigned to eth0
C. The hardware address of eth0
D. The hostname associated with eth0
B, C. When used to display information on an interface, ifconfig shows the hardware and IP addresses of the interface, the protocols (such as TCP/IP) bound to the interface, and statistics on transmitted and received packets. This command does not return information
about programs using the interface or the hostname associated with the interface.
Which of the following programs can be used to perform a DNS lookup?
A. host
B. dnslookup
C. pump
D. ifconfig
Which of the following programs can be used to perform a DNS lookup?
A. host
B. dnslookup
C. pump
D. ifconfig
Which of the following commands should you use to add to host 192.168.0.10 a default gateway to 192.168.0.1?
A. route add default gw 192.168.0.10 192.168.0.1
B. route add default gw 192.168.0.1
C. route add 192.168.0.10 default 192.168.0.1
D. route 192.168.0.10 gw 192.168.0.1
B. To add a default gateway of 192.168.0.1, the command would be route add default gw 192.168.0.1. Specifying the IP address of the host system is not necessary and in fact will confuse the route command.
How might you manually bring up an interface on eth1? (Select all that apply.)
A. Type dhclient eth1.
B. Type ifup eth1.
C. Type ifconfig eth1.
D. Type network eth1.
A, B. The dhclient utility, if installed, attempts to configure and bring up the network(s) passed to it as options (or all networks if it’s given no options) using a DHCP server for guidance. Thus, option A may work, although it won’t work if no DHCP server is available.
Option B applies whatever network options are configured using distribution-specific tools and brings up the network. Thus, options A and B both may work, although neither is guaranteed to work.

Option C displays the network status of eth1, but it won’t activate eth1 if it’s not already active. There is no standard network utility in Linux. Thus, options C and D won’t work
What is the purpose of /etc/hostname, if it’s present on the system?
A. It holds the computer’s default hostname.
B. It holds a list of servers that resolve hostnames.
C. It holds a list of IP addresses and associated hostnames.
D. It holds the hostname of the local gateway computer.
A. Although not all systems use /etc/hostname, option A correctly describes it for those systems that use it. Option B describes the purpose of /etc/resolv.conf. Option C describes the purpose of /etc/hosts. Option D doesn’t describe any standard Linux configuration file,
although the gateway computer’s IP address is likely to appear in a distribution-specific configuration file.
Network accesses to parts of the Internet work fine, but several common addresses have stopped responding. Which of the following tools will be most helpful in diagnosing the source of this problem?
A. netstat
B. ping
C. traceroute
D. ifconfig
c
The ping utility responds normally when you use it with an IP address but not when you use it with a hostname that you’re positive corresponds to this IP address. What might cause this problem? (Select all that apply.)
A. The target computer may be configured to ignore packets from ping.
B. Your computer’s DNS configuration may be broken.
C. The DNS configuration on the target system may be broken.
D. The route between your computer and its DNS server may be incorrect.
B, D.
How can you learn what programs are currently accessing the network on a Linux system?
A. Type ifconfig -p eth0.
B. Examine /proc/network/programs.
C. Type netstat -p.
D. Examine /etc/xinetd.conf.
C. The netstat program produces various network statistics, including the process IDs (PIDs) and names of programs currently accessing the network when passed the -p parameter. Thus, option C is correct
To diagnose a problem with an IMAP server (imap.example.com), you type telnet imap.example.com 143 from a remote client. How can this procedure help you? (Select all that apply.)
A. You can verify basic connectivity between the client computer and the server program.
B. By examining the output, you can locate intermediate routers that are misbehaving.
C. By using an encrypted protocol, you ensure that problems aren’t caused by a packetsniffing intruder.
D. Once connected, you can type IMAP commands to test the server’s response to them.
A, D. If you get any response at all, you know that the basic network connection is working, including that the server is responding to the client. With basic knowledge of IMAP commands, telnet enables you to test the server’s responses in more detail than most IMAP clients (mail readers) permit. Thus, options A and D are both correct
You’re configuring a new system, and your network administrator scribbles its IP address (172.25.78.89), netmask (255.255.255.0), gateway address (172.25.79.1), and DNS server address (10.24.89.201) on a piece of paper. You enter this information into your configuration files and type ifup eth0, but you find that you can’t access the Internet with this computer. Which of the following is definitely true?
A. Because the DNS server is on a completely different network, it won’t function properly for your system. You should ask for the local network’s DNS server’s IP address.
B. The netmask identifies the gateway as being on a different network segment than the computer you’re configuring, so the two can’t communicate directly. You most likely misread one address.
C. Because the IP addresses involved are private IP addresses, there’s no way for them to access the Internet. You must ask for public IP addresses for this system or use only your local private network.
D. The computer’s IP address is a Class B address, but the netmask is for a Class C address. This combination can’t work together, so you must obtain a new IP address or netmask.
B. The computer’s IP address (172.25.78.89) and netmask (255.255.255.0) mean that the
computer can directly address computers with IP addresses in the range of 172.25.78.1 to
172.25.78.254; but the gateway address (172.25.79.1) is outside of this range. Thus, either the
IP address or the gateway address is wrong, and option B is correct
What is the purpose of the -n option to route?
A. It causes no operation to be performed; route reports what it would do if -n were omitted.
B. It precedes specification of a netmask when setting the route.
C. It causes machines to be identified by IP address rather than hostname in output.
D. It forces interpretation of a provided address as a network address rather than a host address.
C. The -n option is used when you want to use route to display the current routing table, and it does as option C specifies. There is no route parameter that behaves as option A specifies. Option B describes the purpose of the netmask parameter to route.

Option D describes the purpose of the -net parameter to route.
What is the purpose of /etc/resolv.conf?
A. It sets the computer’s domain and identifies (by IP address) the name servers that the computer may use.
B. It controls whether the computer’s network options are configured statically or via a DHCP server.
C. It specifies the IP address of a DHCP server from which the computer attempts to obtain an IP address.
D. It holds the routing table for the computer, determining the route that network packets take to other computers.
Option A correctly identifies the function of /etc/resolv.conf. Various distributionspecific
configuration files perform the function described in option B, but /etc/resolv.conf
is not one of these files. A DHCP client sends a broadcast to locate a DHCP server; there is
no client configuration file that holds the DHCP server’s address, as option C describes. The
routing table is maintained internally, although basic routing information may be stored in
distribution-specific configuration files, so option D is also incorrect
Which of the following entries are found in the /etc/hosts file?
A. A list of hosts allowed to remotely access this one
B. Mappings of IP addresses to hostnames
C. A list of users allowed to remotely access this host
D. Passwords for remote Web administration
B. The /etc/hosts file holds mappings of IP addresses to hostnames, on a one-lineper-mapping basis. It does not list the users or other hosts allowed to remotely access
this one or affect remote administration through a Web browser.
How can you reconfigure Linux to use DNS queries prior to consulting /etc/hosts?
A. Edit the /etc/resolv.conf file, and be sure the nameserver dns line comes before the nameserver files line.
B. As root, type nslookup dns.
C. Edit the /etc/named.conf file, and change the preferred-resolution option from files to dns.
D. Edit /etc/nsswitch.conf, and change the order of the files and dns options on the hosts: line.
The /etc/nsswitch.conf file controls the order of name resolution, among other things. Option D correctly describes the procedure for changing the order in which Linux performs name resolution.

The /etc/resolv.conf file mentioned in option A controls the DNS servers that Linux consults, but it doesn’t control access to /etc/hosts.
Option B’s nslookup command resolves a hostname, so option B will return the IP address of the computer called dns, if Linux can find such a system.
The /etc/named.conf file of option C is the configuration
file for the standard name server. This server isn’t likely to be installed on most Linux systems, and even if it is, the procedure described in option C is invalid.