Linux LX0-101 Part 2

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

protocol stack

A ________ ________ is a set of software that converts and encapsulates data between layers of abstraction.

function

A ________ is a part of a script that performs a specific sub-task and that can be called by name from other parts of the script.

variable

A ________ is a placeholder in a script for a value that will be determined when the script runs.

daemon

A ________ is a program that runs continuously in the background waiting for an event to trigger it to perform some action.

locale

A locale code can be assigned to one or more of several environment variables. To learn how these are set on your system, issue the ________ command without any arguments

traceroute

A step up from ping is the __________ command, which sends a series of three test packets to each computer between your system and a specified target system.

shut down X and restart it xset

Adding Fonts to X's Font Path: Once you've added your font directory to X's font path, you should test the configuration. The most reliable way to do this is to ________________ . A quicker approach, but one that presents some opportunity for error, is to add the font path to a running system by using the ____ program:

xset fp+ /your/font/directory xset fp rehash

Adding Fonts to X's Font Path: This command adds /your/font/directory to the end of the font path (show). A second command tells X to re-examine all the font directories to rebuild the list of available fonts (show).

Files XF86Config or xorg.conf

Adding Fonts to X's Font Path: You do this by editing the ________ section of the ________ or ________ file.

groupadd

Adding Groups: Linux provides the ________ command to add a new group.

-e expire-date

Adding Users: Account expiration date -- Set the date on which the account will be disabled, expressed in the form YYYY-MM-DD , with the ________ option.

useradd adduser

Adding Users: Adding users can be accomplished through the ________ utility. (This program is called ________ on some distributions.)

-d home-dir

Adding Users: Home directory -- You specify the account's home directory with the ________ parameter.

export DISPLAY=computerA:0.0

After logging in to computer B from Computer A, this command tells computer B to use computer A for the display of X programs.

xhost -computerB

After you're done, close the programs you've launched, log off computer B , and type on computer A .

network computer The network address identifies a block of IP addresses that are used by one physical network, and the computer address identifies one computer within that network.

Although it isn't obvious from the IP address alone, this address is broken into two components: a _______ address and a ________ address.

asterisk ( * ) exclamation mark ( ! )

An ________ or ________ denotes an account with no password (that is, the account doesn't accept logins—it's locked).

comment environment variable assignments job definition period( in days) delay(in minutes) identifier(string that identifies the command) command (the command to be run)

An anacron file consists of three main types of lines: ________ lines (denoted by a leading hash mark, # ), ________ ________ ________ (as in SHELL=/bin/bash ), and ____ __________ lines. This last type of line contains four fields: ________ ________ ________ ________

/etc/anacrontab

Anacron is controlled through a configuration file named: ______ .

ssh-agent

Another SSH authentication option is to use the ___-_____ program. This program requires a password to initiate connections, so it's more secure than configuring logins without passwords

~/.inputrc

Another bash confi guration fi le is _/______ , which helps customize your keyboard confi guration.

mpage

Another program is ________ , which reads plain-text or PostScript files and reformats them so that each printed sheet contains several reduced-size pages from the original document.

while while [ condition ] do commands done until

Another type of loop is the _____ loop, which executes for as long as its condition is true. Syntax: _______. The ______ loop is similar in form, but it continues execution for as long as its condition is false—that is, until the condition becomes true.

ulimit

Another way to set limits on system resource use is via the ______ command. This command is a bash built-in command, so it only affects bash and programs launched from it.

user IDs (UIDs) group IDs (GIDs)

As mentioned earlier, Linux defines users and groups by numbers, referred to as ____ ____and ________, respectively.

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.

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.

header

At each step in a relay chain, e‐mail is altered. Most important, each server adds a ______ to the e‐mail, which is a line that provides information about the message.

You want to use xinetd access controls to limit who may access a server that's launched via xinetd. Specifically, only users on the 192.168.7.0/24 network block should be able to use that server. How may you do this? A. Enter hosts_allow = 192.168.7.0/24 in the /etc/xinetd.d configuration file for the server in question. B. Enter only_from = 192.168.7.0/24 in the /etc/xinetd.d configuration file for the server in question. C. Enter server : 192.168.7., where server is the server's name, in the /etc/hosts.allow file. D. Enter server : 192.168.7., where server is the server's name, in the /etc/hosts.deny file.

B. Option B correctly describes how to accomplish this goal. Option A is incorrect because the hosts_allow option isn't a legal xinetd configuration file option. Option C correctly describes how to configure the described restriction using TCP Wrappers, which is generally used with inetd, but it's not the way this is done using xinetd. Option D also describes a TCP Wrappers description, but it reverses the meaning.

Ghostscript

Because most Linux systems aren't connected directly to true PostScript printers, a program called ________ converts the print job into a form that the system's printer can actually handle.

Adobe's PostScript Type 1 Apple's TrueType.

Both bitmap and outline fonts come in several different formats. X ships with a number of basic bitmap and outline fonts, and you're unlikely to need to deal explicitly with bitmap fonts or their formats, so I don't describe them in any detail. Outline fonts are another matter, though. The two main formats are ________ and ________ .

mailq

Checking the E‐mail Queue: The _____ program is the main tool to help in e‐mail queue management.

multicasting 127 loopback 255.255.255.255

Classes A, B, and C are for general networking use. Class D addresses are reserved for ____________—sending data to multiple computers simultaneously. There are a few special cases within most of these ranges. For instance, the ___.x.y.z addresses are reserved for use as ________ (a.k.a. localhost) devices—these addresses refer to the computer on which the address is entered. Addresses in which all the machine bits are set to 1 refer to the network block itself—they're used for broadcasts. The ultimate broadcast address is ___.___.___.___, which sends data to all computers on a network segment.

LD_LIBRARY_PATH

Common Environment Variables and Their Meanings: A few programs use this environment variable to indicate directories in which library files may be found. It works much like PATH .

NNTPSERVER

Common Environment Variables and Their Meanings: Some Usenet news reader programs use this environment variable to specify the name of the news server system. This value may be set in /etc/profile or in the user's configuration files.

EDITOR

Common Environment Variables and Their Meanings: Some programs launch the program pointed to by this environment variable when they need to call a text editor for you to use . Thus, changing this variable to your favorite editor can help you work in Linux . It's best to set this variable to a text-mode editor, though; GUI editors may cause problems if they're called from a program that was launched from a text-mode login .

LANG

Common Environment Variables and Their Meanings: The system holds your current language, specified as a locale, using this variable.

PATH

Common Environment Variables and Their Meanings: This is an unusually important environment variable. It sets the path for a session, which is a colon-delimited list of directories in which Linux searches for executable programs when you type a program name. For instance, if PATH is /bin:/usr/bin and you type ls , Linux looks for an executable program called ls in /bin and then in /usr/bin . If the command you type isn't on the path, Linux responds with a command not found error. The PATH variable is typically built up in several configuration files, such as /etc/profile and the .bashrc file in the user's home directory.

HOSTNAME

Common Environment Variables and Their Meanings: This is the current TCP/IP hostname of the computer.

PS1

Common Environment Variables and Their Meanings: This is the default prompt in bash . It generally includes variables of its own, such as \u (for the username), \h (for the hostname), and \W (for the current working directory). This value is frequently set in /etc/profile , but it's often overridden by users.

PWD

Common Environment Variables and Their Meanings: This is the present working directory. This environment variable is maintained by the system. Programs may use it to search for files when you don't provide a complete pathname.

USER or USERNAME

Common Environment Variables and Their Meanings: This is your current username. It's a variable that's maintained by the system.

MAIL

Common Environment Variables and Their Meanings: This variable holds the location of the user's mail spool. It's usually /var/spool/mail/username .

SHELL

Common Environment Variables and Their Meanings: This variable holds the path to the current command shell.

DISPLAY

Common Environment Variables and Their Meanings: This variable identifies the display used by X . It's usually :0.0 , which means the first (numbered from 0) display on the current computer . When you use X in a networked environment, though, this value may be preceded by the name of the computer at which you're sitting, as in machine4.luna.edu:0.0 . This value is set automatically when you log in, but you may change it if necessary . You can run multiple X sessions on one computer, in which case each one gets a different DISPLAY number—for instance, :0.0 for the first session and :1.0 for the second .

TERM

Common Environment Variables and Their Meanings: This variable is the name of the current terminal type . To move a text-mode cursor and display text effects for programs like text- mode editors, Linux has to know what commands the terminal supports . The TERM environment variable specifies the terminal in use . This information is combined with data from additional files to provide terminal-specific code information . TERM is normally set automatically at login, but in some cases you may need to change it .

HOME

Common Environment Variables and Their Meanings: This variable points to your home directory. Some programs use it to help them look for configuration files or as a default location in which to store files.

/etc/profile and files in /etc/ profile.d

Common bash Configuration Files: Type of File: Global: Login File Location: _________ and files in ___________

/etc/bashrc or /etc/bash.bashrc

Common bash Configuration Files: Type of File: Global: Non-Login File Location: _________ or ___________

~/.bash_login , ~/.profile , or ~/.bash_profile

Common bash Configuration Files: Type of File: User: Login File Location: _________ , _______ or ___________

~/.bashrc

Common bash Configuration Files: Type of File: User: Non-Login File Location: _________

print queue

Conceptualizing the Linux Printing Architecture: Linux printing is built around the concept of a ____ ____. This is a sort of holding area where files wait to be printed.

lpr

Conceptualizing the Linux Printing Architecture: Users submit print jobs by using a program called ____ .

/var/spool/cups

Conceptualizing the Linux Printing Architecture: lpr sends the print job into a specified queue. This queue corresponds to a directory on the hard disk, typically in a subdirectory of the ____________ directory.

loops Example Loop #!/bin/bash for d in `ls *.wav` ; do aplay $d done

Conditional expressions are sometimes used in _____ . _____ are structures that tell the script to perform the same task repeatedly until some condition is met (or until some condition is no longer met). Form a loop with these instructions: Listing show a loop that plays all the .wav audio files in a directory using aplay.

else if [ conditional-expression ] then commands else other-commands fi

Conditional expressions may be expanded by use of the ____ clause

xf86config , Xconfigurator and XF86Setup .

Configuration Tools for XFree86 3.3.6 and Earlier: Many configuration tools are available for XFree86 3.3.6 and before. The most common of these tools are ____ , ____ and ____ .

/etc/cups

Configuring CUPS: CUPS uses various configuration files in the ________ directory and its subdirectories to manage its operation.

ntpdate

Configuring NTP Clients: In some cases, a simpler way to set the time on a client is to use ____ . This program is part of the NTP suite, and it performs a one-time clock setting.

1. prepare a font directory that holds the fonts (set up fonts in a directory and create a fonts.dir file describing them) and, 2. add the font directory to X's font path.

Configuring X Core Fonts: X core fonts are those that are handled directly by X. To configure these fonts, you must do two things: 1. _____________________________________ 2. _____________________________________

/etc/X11/xdm/xdm-config

Configuring XDM: XDM's main configuration file is ________________ .

# /etc/init.d/xfs restart

Configuring a Font Server: Once you've saved your changes, you must restart the font server. Typically, this is done via SysV startup scripts:

route ifconfig

Configuring with a Static IP Address: Gateway address ​ ​You can manually set the gateway via the _____ command. ​You can set the IP address and the netmask manually via the ________ command or via the IPADDR or NETMASK item in the configuration file.

lpc

Controlling the Print Queue: In the original BSD LPD system, the ____ utility starts, stops, and reorders jobs within print queues.

/etc/crontab the minute (0-59), the hour (0-23), the day of the month (1-31), the month (1-12), and the day of the week (0-7; both 0 and 7 correspond to Sunday). asterisk ( * ) list separated by commas (such as 0,6,12,18 ) dash ( - ) slash - For instance, */10 in the minute field indicates a job that's run every 10 minutes. the account name to be used when executing the program the command to be run

Creating System cron Jobs: The ________ file controls system cron jobs. The file contains several lines that resemble the following: 02 4 * * * root run-parts /etc/cron.daily This line begins with five fields that specify the time. The fields are, in order: * * * * * An ________ matches all possible values. A ____________ matches any of the specified values. Two values separated by a ________ indicate a range, inclusive of the end points. A ________ , when used in conjunction with some other multi-value option, specifies stepped values—a range in which some members are skipped. After the first five fields, /etc/crontab entries continue with____ ___ ___________ and ________________.

crontab

Creating User cron Jobs: To create a user cron job, you use the ________ utility.

-l -r -e file

Creating User cron Jobs: The ____ option causes crontab to display the current cron job; ____ removes the current cron job; and ____ opens an editor so that you can edit the current cron job. Alternatively, you can create a cron job configuration file and pass the filename to crontab using the ____ parameter.

You've downloaded a GPG public key from a Web site, into the file fredkey.pub. What must you do with this key to use it? A. Type inspect-gpg fredkey.pub. B. Type gpg --readkey fredkey.pub. C. Type import-gpg fredkey.pub. D. Type gpg --import fredkey.pub.

D. Option D provides the correct command to import fredkey.pub prior to use. The inspect-gpg and import-gpg commands of options A and C are fictitious; and there is no --readkey option to gpg, as option B suggests.

-r

Delete the original file: Normally, lpr sends a copy of the file you print into the queue, leaving the original unharmed. Specifying the ____ option causes lpr to delete the original file after printing it.

userdel

Deleting Accounts: On the surface, deleting user accounts is easy. You may use the ________ command to do the job of removing a user's entries from /etc/passwd.

DELETE

Deleting Data: Sometimes your data need to be deleted. Table 9.4 suggests that the tree in the back yard is ill—its condition rating is just 2 on a 10-point scale. Perhaps you'll decide to cut it down, and therefore remove it from the locations database. To do so, you'll use the ______ command.

groupdel

Deleting Groups: Deleting groups is done via the ________ command, which takes a single parameter: a group name.

INSERT INSERT INTO VALUES UPDATE SET WHERE

Describe the commands used to enter data in a SQL database: ​The ______ command inserts a single entry into a database. It requires a table name and a set of values, as in ______ ____ movies ______ ('Brazil', 'Terry Gilliam', 1985); . The ______ command can be used in a similar way to update an existing entry, but you must use ___ to specify the column to set and _____ to identify the row or rows to be modified.

skeleton /etc/skel

Described earlier, in "Adding Users," useradd copies files from the ________ directory ( ________ by default) into a newly created home directory.

ping , traceroute , tracepath , netstat and tcpdump

Diagnosing Network Connections: Network configuration is a complex topic, and unfortunately, things don't always work as planned. Fortunately, there are a few commands you can use to help diagnose a problem. Five of these are ____, __________, _______, _______ and _______.

local mail server local mail server outgoing e-mail server

E-mail can be sent as well as received. The traditional Linux approach to sending e-mail is to have local programs contact the _____ ____ ______ to send e-mail. The _____ ____ ______ then contacts its________ _____ ______.

/etc/cups/printers.conf

Editing the CUPS Configuration Files: You can add or delete printers by editing the ________________ file, which consists of printer definitions. Each definition begins with the name of a printer, identified by the string DefaultPrinter (for the default printer) or Printer (for a nondefault printer) in angle brackets ( <> )

outline scalable

Font Technologies and Formats: Most modern fonts are distributed as _______ fonts (a.k.a. ________ fonts). This type of format represents each character as a series of lines and curves in a high-resolution matrix.

bitmap font

Font Technologies and Formats: The simplest type of font format is the ____ ____, ( individual pixels in an array are either active or inactive).

/etc/ssh/sshd_config

For the most part, SSH works reasonably well when it's first installed, so you may not need to make any changes to its configuration. If you do need to make changes, though, these are mostly handled through the main SSH configuration fi e, /___/___/__________ .

/etc/services

Fortunately, for basic functioning, you need to do nothing to configure ports on a Linux system. You may have to deal with this issue if you run unusual servers, though, because you may need to configure the system to link the servers to the correct ports. This can sometimes involve editing the ____________ file, which maps port numbers to names, enabling you to use names in server configurations and elsewhere. This file consists of lines that begin with a name and end with a port number, including the type of protocol it uses (TCP or UDP)

Exim

Four e-mail servers are most popular on Linux: Although ____ is a monolithic server, like sendmail, it has a much simpler configuration file format and so is easier to configure.

sendmail

Four e-mail servers are most popular on Linux: The ________ program was for many years the dominant e-mail server package on the Internet. It's very powerful, but it's also difficult to configure because its configuration file formats are rather arcane.

qmail

Four e-mail servers are most popular on Linux: The fourth major Linux e-mail server, _____, is a modular server with security as a major design goal.

Postfix

Four e-mail servers are most popular on Linux: _______ was designed as a modular replacement for sendmail—rather than a single program that does everything (as sendmail is designed), _______ uses multiple programs, each of which handles its own specific small task. This design improves security, at least in theory. _______ tends to be easier to configure than sendmail, and it's become the default e-mail server on many Linux distributions.

parentheses after the function name and enclosing the lines that make up the function within curly braces: myfn() { commands }

Functions are defined by placing ____________ after the function name and enclosing the lines that make up the function within______ _______ .

overridden

Global configuration files affect all users of a system; however, their settings may be __________ by individual users, either in user configuration files or in commands the users type themselves.

/etc/group

Group information is stored primarily in the ________ file

/etc/group

Group membership is controlled through the ________ file. This file contains a list of groups and the members belonging to each group.

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.

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.

B. The XDM greeting is a resource set in the /etc/X11/xdm/Xresources file, so option B is correct. 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.

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.

/etc/ sysconfig/network-scripts/ifcfg-eth0 BOOTPROTO=dhcp /etc/network/interfaces iface eth0 inet dhcp

Ideally, the DHCP client runs at system bootup. The system often uses a line in a configuration file to determine whether to run a DHCP client. For instance, Red Hat and Fedora set this option in a file called ______________________________ (this filename may differ if you use something other than a single Ethernet interface). The line in question looks like this: ________=________ Ubuntu uses the ________________ file for a similar purpose, but the details differ. On a system that uses DHCP, a line like the following appears: ____ ____ ____ ____

/etc/profile

If a program's documentation says that it needs certain environment variables set, you can set them system-wide in the __________ file or some other suitable fi le, or you can set them in user confi guration fi les, as you deem appropriate.

sendmail -q

If your network connection goes down temporarily, or if an upstream e‐mail server goes down for a while, e‐mail messages can pile up in the queue. Your SMTP server will ordinarily attempt re-delivery at a later date; but if your network connection has come up again and you want to clear the queue immediately, you can do so. Typing ________ -_ will do the job with most SMTP servers

ssh-keygen

If your system doesn't have these keys, and you can't get the SSH server to start up, you can try generating the keys with the ___-______ command.

X.org-X11

In 2004, most Linux distributions shifted from XFree86 to ________ .

locale

In Linux, a ________ is a way of specifying the computer's (or user's) language, country, and related information for purposes of customizing displays.

X Window System (or X for short)

In Linux, the main GUI is known as the ________ .

/etc/networks

In addition to /etc/hosts , Linux supports a fi le called ___________ . It works much like /etc/hosts , but it applies to network addresses, and it reverses the order of the names and the IP address on each line.

read as in read response to read input for subsequent access as $response .

In addition to assigning variables with the assignment operator ( = ), you can read variables from standard input using ____ .

/etc/passwd

In addition to membership defined in /etc/group , each user has a default or primary group. The user's primary group is set in the user's configuration in ________ (the file that defines accounts).

inetd and xinetd inetd TCP Wrappers

In the following pages, I describe the basics of configuring Linux's two major super servers, ___ and ____, with particular emphasis on their security features. In the case of _____ , security is handled by a package called ___ ________.

SSH

In the past, Telnet has been the remote text-mode login protocol of choice on Linux and Unix systems. Unfortunately, Telnet is severely lacking in security features. Thus, in recent years ___ has grown in popularity, and it is in fact the preferred remote login tool.

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).

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

Internet Control Message Protocol (ICMP) ICMP ICMP

Knowing TCP/IP Protocol Types: The ___ __ __ ___ is a simple protocol for communicating data. ____ is most often used to send error messages between computers—for instance, to signal that a requested service isn't available. This is often done by modifying an IP packet and returning it to its sender, which means that ____ is technically an internet-layer protocol, although it relies upon IP.

Transmission Control Protocol (TCP) TCP TCP

Knowing TCP/IP Protocol Types: ​The ___ __ ___ may be the most widely used transportlayer protocol in the TCP/IP stack. Unlike UDP, ___ creates full connections with error checking and correction as well as other features. These features simplify the creation of network protocols that must exchange large amounts of data, but the features come at a cost: ___ imposes a small performance penalty. Most of the application-layer protocols with which you may already be familiar, including the Simple Mail Transfer Protocol (SMTP), the Hypertext Transfer Protocol (HTTP), and the File Transfer Protocol (FTP), are built atop ___.

Internet Protocol (IP) IP IP IP

Knowing TCP/IP Protocol Types: ​The ______ is the core protocol in TCP/IP networking. __ is an internet-layer (a.k.a. a network-layer or layer 2) protocol. __ provides a "best effort" method for transferring packets between computers—that is, the packets aren't guaranteed to reach their destination. Packets may also arrive out of order or corrupted. Other components of the TCP/IP stack must deal with these issues and have their own ways of doing so. __ is also the portion of TCP/IP with which IP addresses are associated.

User Datagram Protocol (UDP)

Knowing TCP/IP Protocol Types: ​The__ ___ ___ is the simplest of the common transport-layer (a.k.a. layer 3) TCP/IP protocols. It doesn't provide sophisticated procedures to correct for out-of-order packets, guarantee delivery, or otherwise improve the limitations of IP. This fact can be a problem, but it also means that UDP can be faster than more sophisticated tools that provide such improvements to IP. Common application-layer protocols that are built atop UDP include the Domain Name System (DNS), the Network File System (NFS), and many streaming media protocols.

hundred

Linux distributions reserve the first ________ user and group IDs for system use.

accounts

Linux is a multi-user system that relies on ________—data structures and procedures used to identify individual users of a computer.

/etc/nsswitch.conf

Linux normally performs lookups in /etc/hosts before it uses DNS. You can modify this behavior by editing the _____________.___ file, and specifically the hosts line.

groups

Linux uses ________ as a means of organizing users.

-l exclamation mark ( ! )

Lock accounts: The ____ parameter locks an account by prefixing the encrypted passwordwith an ________ .

NTP

Maintaining the System Time: For these reasons, several protocols exist to synchronize the clocks of multiple systems. Of these, ____ is the most popular and flexible.

/etc/ntp.conf

Maintaining the System Time: Once NTP is installed, look for its configuration file, ________ .

ntpq

Maintaining the System Time: The ____ program enables you to verify that an NTP server is functioning correctly .

NTP

Maintaining the System Time: This protocol creates a tiered hierarchy of time sources:

1. -c cc-addr 2. ​The main recipient's e‐mail address terminates the mail command's line for an outgoing e‐mail. 3a. -f [name of mail spool file] 3b. -u user

Managing E‐mail: options to mail 1. Set a carbon copy address 2.Set the recipient's address 3.Read e‐mail: (3.a)personal (3.b)specified user

logger

Manually Logging Data: For the most part, the system logger accepts log entries from system tools, such as servers. Occasionally, though, you may want to manually create a log entry or have a script do so. The tool for this job is known as ________ .

hwclock

Manually Setting the Time: Because x86 and x86-64 hardware maintains both software and hardware clocks, Linux provides tools to synchronize the two. Specifically, the ________ utility enables you to set the hardware clock from the software clock or vice versa, as well as do a few other things.

date

Manually Setting the Time: You can manually set your system's clock—or more precisely, its clocks, because as noted earlier, Linux maintains two clocks: the hardware clock and the software clock. The main tool to set the software clock is ____ .

super server

Many network server programs open network ports and listen for connections directly. Some programs, though, work through an intermediary: a _____ _____. This is a program that listens for network connections on behalf of another program and then, when a connection is initiated, hands off control of that connection to the intended server.

X server XFree86-configure Xorg-configure

Methods of Configuring X: The ________ itself includes the capacity to query the hardware and produce a configuration file. To do this, type ________ (for XFree86) or ________ (for X.org-X11) when no X server is running.

xf86cfg or xorgcfg

Methods of Configuring X: ____ or ____ ​ ​This utility works only on XFree86 4.x or X.org-X11 (each package ships with a version named after itself). Deprecated.

Display Settings tool system-config-display YaST and YaST2

Methods of Configuring X: ​Many modern distributions ship with their own custom X configuration tools. These include Red Hat's (and Fedora's) ____ ____ ____ (accessible from the default desktop menu or by typing ____-____-____ in an xterm ) and SUSE's ____ and ____ .

packets

Modern networks operate on discrete chunks of data known as ________ .

global local login non-login

Modifying Shell Configuration Files: Configuring shells requires editing shell configuration files. These files can be classified in a couple of ways. First, files may be ______ files that affect all users of a shell or _____ files that affect just one user. Second, files may be _____ files that are launched only by a login process (such as a text-mode console login) or ________ files that are launched by other processes (such as when starting an xterm window).

iconv -f -t

Modifying Text-File Locales: The ____ utility converts between character sets. The ____ and ____ options specify the source and destination encodings.

/etc/ passwd

Modifying User Accounts: User accounts may be modified in many ways: You can directly edit critical files such as ________ , modify user-specific configuration files in the account's home directory, or use system utilities like those used to create accounts.

ifup ifdown

Most Linux distributions today ship with two commands, ____ and ______ , that combine the functions of several other network commands, most notably ifconfig and route . In their simplest forms, they bring interfaces up or shut them down based on information in whatever files your distribution uses to store network confi guration data.

/etc/ssh ssh_host_rsa_key ssh_host_dsa_key

Most OpenSSH server SysV startup scripts include code that looks for stored public and private keys and, if they're not present, generates them. In total, four to six keys are needed: public and private keys for two or three encryption tools SSH supports. These keys are normally stored in /___/___ and are called ________________ and s________________ for private keys, with .pub filename extensions added for public keys.

modprobe

Network Hardware Configuration: If your network hardware isn't correctly detected, though, subsequent configuration (as described in the upcoming sections "Configuring with DHCP" and "Configuring with a Static IP Address") won't work. To correct this problem, you must load your network hardware driver. You can do this with the _______ command (You must know the name of your network hardware's kernel module)

DHCP When a computer running a DHCP client boots up, it sends a broadcast in search of a DHCP server. The server replies (using nothing but the client's hardware address) with the configuration information the client needs to enable it to communicate with other computers on the network—most important, the client's IP address and netmask and the net- work's gateway and DNS server addresses.

Network Hardware Configuration: One of the easiest ways to configure a computer to use a TCP/IP network is to use ____ , which enables one computer on a network to manage the settings for many other computers.

network hardware data packets protocols Transmission Control Protocol/Internet Protocol (TCP/IP) stack

Networking involves quite a few components that are built atop one another. These include ________ ________ , ____ ________ , and ________ for data exchange. Together, these components make up a ________ ________ . The most common network stack today is the ______________ .

-m username

Notify a user by e-mail: The ____ ________ option causes lpd to send e-mail to username when the print job is complete. This option was unavailable in early versions of CUPS but is available in recent versions.

xdpyinfo

Obtaining X Display Information: Sometimes it's helpful to know about the capabilities of your display, because it's man- aged by X. The tool for this job is ________ .

xwininfo

Obtaining X Display Information: You can obtain detailed technical information about a specific window with the ________ command.

/var/spool/mail

On Linux, e‐mail is tied intricately to user accounts. The mail server holds incoming messages for each user, typically in a file in ___/____/____ .

echo env

On a bash command line, you can refer to an environment variable by using the ____ command to examine a single variable or by typing ___ to display all the environment variables.

lpr

Once you've confi gured the system to print, you probably want to start printing. As mentioned earlier, Linux uses the ____ program to submit print jobs.

fonts.dir mkfontscale and mkfontdir

Once you've copied fonts to a directory, you must prepare a summary file that describes the fonts. This file is called _____.___, and it begins with a line that specifies the number of fonts that are described. Fortunately, you needn't create this file manually; programs exist to do so automatically. In XFree86 4.3 and later and in X.org-X11, the simplest way to do the job is to use ________ and ________ .

tcpdump

One advanced network troubleshooting tool is _______ . This utility is a packet sniffer, which is a program that can intercept network packets and log them or display them on the screen.

Media Access Control (MAC)

One of the characteristics of dedicated network hardware such as Ethernet or Token Ring cards is that they have unique hardware addresses, also known as _____ _____ _________(___) addresses, programmed into them.

/etc/nologin

One particularly radical approach to security is to use the /___/_______ fle. If this file is present, only root may log into the computer.

newgrp

Ordinarily, members of a group may use ________ to change their current group membership.

ServerLayout

Putting It All Together: XFree86 4.x and X.org-X11 require a section that's not present in the XFree86 3.3.6 configuration file: ________ . This section links together all the other components of the X configuration.

aliases

Redirecting E-mail: E-mail _______ enable one address to stand in for another one.

~/.forward

Redirecting E-mail: Another approach to redirecting mail is to do so on the user level. In particular, you can edit the __________ file in a user's home directory to have mail for that user sent to another address.

newaliases

Redirecting E-mail: Some mail servers, including sendmail, Postfi x, and qmail, require you to compile /etc/aliases into a binary fi le that can be processed more quickly. To do so, use the __________ command:

-r or --remove

Remove user files:​ ​The ____ or ________ parameter causes the system to remove all files from the user's mail spool and home directory, as well as the home directory.

Domain Name System (DNS)

Resolving Hostnames: The ______ ____ _____(___) is a distributed database of computers that converts between IP addresses and hostnames.

SELECT

Retrieving Data: The whole point of having a database is to be able to retrieve data from it. The main command for doing so has already been described: _______ .

/etc/logrotate.d

Rotating Log Files: /etc/logrotate.conf includes several default settings and typically refers to files in ________ to handle specific log files.

/etc/logrotate.conf

Rotating Log Files: The logrotate program consults a configura- tion file called ________ .

logrotate

Rotating Log Files: The most common log rotation tool is a package called ________ .

cron cron at cron

Running Jobs in the Future: Linux provides a means of scheduling tasks to run at specified times to handle such issues. This tool is the ____ program, which runs what are known as ____ jobs. A related tool is ____ , which enables you to run a command on a one-time basis at a specified point in the future as opposed to doing so on a regular basis, as ____ does.

/var/spool/cron /etc/cron.d /etc/crontab

Running Jobs in the Future: The cron program is a daemon, so it runs continuously, looking for events that cause it to spring into action. Unlike most daemons, which are network servers, cron responds to temporal events. Specifically, it "wakes up" once a minute, examines configuration files in the ________ and ________ directories and the ________ file, and executes com- mands specified by these configuration files if the time matches the time listed in the files.

system user

Running Jobs in the Future: There are two types of cron jobs: ________ cron jobs and ________ cron jobs.

Post Office Protocol (POP) Internet Message Access Protocol (IMAP)

SMTP is used through most of a mail delivery system. The final stage, though, often employs a pull mail protocol, such as the ____ _____ ________(___) or the _________ ________ _______ ________(____). With these protocols, the receiving system initiates the transfer. This is useful when the receiving system is an end user's workstation, which may not be powered on at all times or able to receive incoming connections.

mail transfer agents MTAs Domain Name System (DNS)

SMTP was designed to enable a message to be relayed through an arbitrary number of computers. For instance, an end user may compose a message, which is sent to the local SMTP server. (SMTP servers are also known as ____ ________ ______ , or ___s.) This server looks up a recipient system using the ______ ____ ______(___) and sends the message to that system. This system may use its own internal routing table to redirect the message to another local system, from which the message may be read, either directly or via a POP or IMAP server.

action

Setting Logging Options: Most commonly, the ________ is a filename, typically in the /var/log directory tree.

facility.priority action facility priority action

Setting Logging Options: The format of the /etc/syslog.conf fi le is conceptually simple but provides a great deal of power. Non-comment lines take the following form: ________ ________ . In this line, the ________ is a code word for the type of program or tool that generated the message to be logged; the ________ is a code word for the importance of this message; and the ________ is a file, remote computer, or other location that's to accept the message.

equal sign ( = ) exclamation mark ( ! ) *

Setting Logging Options: When a program sends a message to the system logger, it includes a priority code; the logger logs the message to a file if you've configured it to log messages of that level or higher. Thus, if you specify a priority code of alert , the system will log messages that are classified as alert or emerg but not messages of crit or below. An exception to this rule is if you precede the priority code by an ________ which describes what to do with messages of x priority only. An ________ reverses the meaning of a match. A priority of ____ refers to all priorities.

semicolon ( ; ) commas semicolons

Setting Logging Options: You can specify multiple selectors for a single action by separating the selectors by a ________ . Note that ________ are used to separate multiple facilities within a single selector, whereas ________ are used to separate multiple selectors as a whole.

/etc/inetd.d

Setting Up inetd: You control servers that launch via inetd through the /___/_____ file or files in /___/_____._

/etc/xinetd.conf

Setting Up xinetd: The /___/_____.____ file controls xinetd .

date

Setting Your Time Zone: If you want further confirmation of your time zone, try using the ____ command by itself

/etc/localtime

Setting Your Time Zone: Linux looks to the /__/______ file for information about its local time zone.

Coordinated Universal Time (UTC)

Setting Your Time Zone: Linux uses ________________ internally. This is the time in Greenwich, Eng- land, uncorrected for Daylight Saving Time.

/usr/share/zoneinfo/

Setting Your Time Zone: This directory contains files for certain time zones named after the zones or the regions to which they apply, such as GMT , Poland , and Japan .

passwd

Setting a Password: Although useradd provides the -p parameter to set a password, this tool isn't very useful when directly adding a user because it requires a pre-encrypted password. Therefore, it's usually easiest to create an account in disabled form (by not using -p with useradd ) and set the password after creating the account. You can do this with the ________ command.

OpenSSH

Several SSH servers are available for Linux, but the most popular by far is the _______ server

Simple Mail Transfer Protocol (SMTP)

Several protocols exist to manage e‐mail. The most common of these is the ______ ____ ________ ________(____), which is designed as a push mail protocol, meaning that the sending system initiates the transfer.

--program (or -p )

Some versions of netstat support the _________ or __ parameter, which attempts to provide information about the programs that are using network connections.

/etc/hosts

Sometimes DNS is overkill. For instance, you might just need to resolve a handful of hostnames. This may be because you're confi guring a small private network that's not connected to the Internet at large or because you want to set up a few names for local (or even remote) computers that aren't in the global DNS database. For such situations, __________ may be just what you need. This fi le holds mappings of IP addresses to hostnames, on a oneline-per-mapping basis. Each mapping includes at least one name, and sometimes more.

at time

Sometimes cron and anacron are overkill. You may simply want to run a single command at a specific point in the future on a one-time basis rather than on an ongoing basis. For this task, Linux provides another command: ___ . In ordinary use, this command takes a single option (although options to fine-tune its behavior are also available): a ____ .

pam_limits /etc/security/limits.conf

Sometimes you may want to impose limits on how many times users may log in, how much CPU time they can consume, how much memory they can use, and so on. Imposing such limits is best done through a Pluggable Authentication Modules (PAM) module called __________ . You do so by editing its configuration file, /___/________/______.____ .

-J jobname

Specify a job name: Print jobs have names to help identify them, both while they're in the queue and once they're printed (if the queue is configured to print banner pages). The name is normally the name of the first file in the print job, but you can change it by including the ____ ________ option.

-Pqueuename

Specify a queue name: The ________ option enables you to specify a print queue.

-# number

Specify the number of copies: You can specify the number of copies of a print job by using the ____ ____ option

smart filter

Squeezing Ghostscript into the Queue: Printing to a non-PostScript printer in Linux requires fitting Ghostscript into the print queue. This is generally done through the use of a ________ ________ .

INSERT INTO UPDATE WHERE

Storing Data: You can now begin storing data in your database. To do so, use the______ ____ command. The lizard is entered in the table as being 6 inches in size, rather than 5. You can correct this error by using ______ . The _____ keyword begins a specification of which rows to change.

ping

Testing Basic Connectivity: The most basic network test is the ____ command, which sends a simple ICMP packet to the system you name (via IP address or hostname) and waits for a reply.

Address Resolution Protocol (ARP) Neighbor Discovery Protocol (NDP) broadcast query

The 4-byte IPv4 (or 16-byte IPv6) address and 6-byte Ethernet address are mathematically unrelated. Instead, the TCP/IP stack converts between the two using the _______ __________ ________ (___)for IPv4 or the ________ _________ ________(___) for IPv6. These protocols enable a computer to send a _________ _____—a message that goes out to all the computers on the local network. This query asks the computer with a given IP address to identify itself. When a reply comes in, it includes the hardware address, so the TCP/IP stack can direct traffic for a given IP address to the target computer's hardware address.

tcpd /etc/hosts.allow /etc/hosts.deny

The TCP Wrappers package provides a program known as ____ . Instead of having inetd call a server directly, inetd calls ____ , which does two things: It checks whether a client is authorized to access the server, and if the client has this authorization, ____ calls the server program. TCP Wrappers is confi gured through two fi les: /___/_____._____ and /___/_____._____

xorg.conf /etc/X11

The X Configuration File Format: X.org-X11 ​ ​This server's configuration file is called ____ , and it's usually stored in ____ .

XF86Config /etc/X11

The X Configuration File Format: XFree86 3.3.6 and earlier ​ ​The X configuration file's name is ________ , and the file is most commonly located in ________ or /etc .

XF86Config-4 /etc/X11 XF86Config /etc/X11

The X Configuration File Format: XFree86 4.x ​ ​The XFree86 4.x configuration file format is slightly different from that of XFree86 3.3.6 and earlier. To support the transition period, XFree86 4.x supports a configuration file called ________ , which is typically located in ____ . If this file isn't found, XFree86 4.x looks for a file called ________ in ________ .

telinit 5 /etc/init.d/xdm start

The X Configure-and-Test Cycle: If you get the desired results, quit from X and type ____ __ ( /__/___/___ ____in Debian and other distributions that don't use runlevels to start the GUI login prompt) to restore the system to its normal X login screen.

telinit 3

The X Configure-and-Test Cycle: Kick the system into a mode in which X is not started automatically. On Red Hat, Fedora, and similar distributions, this goal can be achieved by typing ____ _ .

startx

The X Configure-and-Test Cycle: Once the X session is shut down, you can log in using a text-mode login prompt and tweak your X settings manually, or you can use text-based X configuration programs. You can then type ________ to start the X server again.

/etc/init.d/xdm stop

The X Configure-and-Test Cycle: Some distributions, such as Debian, Ubuntu, and Gentoo, don't use runlevels as a signal for whether to start X. With such distributions, you must shut down the GUI login server by typing ________ ____ .

X Display Manager Control Protocol (XDMCP)

The X GUI Login System: This system employs a network login protocol, the ________________________________ .

seq for x in `seq 1 10` starting, increment and an ending

The ___ command can be useful in creating for loops (and in other ways, too): This command generates a list of numbers starting from its first argument and continuing to its last one. You can use a for loop beginning ________________ to have the loop execute 10 times, with the value of x incrementing with each iteration. If you pass three values to seq , it interprets them as a ________ value, an _________ amount, and an ______ value.

lprm job ID dash ( - )

The ____ command removes one or more jobs from the print queue. If lprm is used with a number, that number is understood to be the ____ __ of the job that's to be deleted. If a user runs the BSD lprm and passes a ________ to the program, it removes all the jobs belonging to the user.

then fi if [ command ] then additional-commands fi

The ____ keyword marks the beginning of a series of lines that execute only if the conditional is true, and __ marks the end of the if block.

-u

The ____ parameter unlocks an account by removing a leading exclamation mark.

lsof lsof

The ____ program nominally lists open files. It can be used to identify what files are open in a directory, find who's accessing them, and so on. The definition of file used by ____ is broad, though; it includes network connections.

lpq $ lpq -Php4000

The ____ utility displays information about the print queue—how many files it contains, how large they are, who their owners are, and so on. By entering the user's name as an argument, you can also use this command to check on any print jobs owned by a particular user.

network mask (also known as the subnet mask or netmask) netmask

The _______ ____ ( or the ______ ____ or _______) is a number that identifies the portion of the IP address that's a network address and the part that's a computer address. It's helpful to think of this in binary (base 2) because the _______ uses binary 1 values to represent the network portion of an address and binary 0 values to represent the computer address.

chage

The ________ command allows you to modify account settings relating to account expiration.

gpasswd passwd

The ________ command is the group equivalent to ________ . This command also enables you to modify other group features and to assign group administrators—users who may perform some group-related administrative functions for their groups.

groupmod

The ________ command modifies an existing group's settings.

/etc/cron.allow

The ________ file contains a list of users who should be permitted access to cron .

usermod

The ________ program closely parallels useradd in its features and parameters. This utility changes an existing account instead of creating a new one, though.

BRLTTY

The ________ project provides a Linux daemon that redirects text-mode console output to a Braille display.

tracepath

The _________ program is an alternative to traceroute . In basic operation, it's similar, although it produces one line of output for each test packet and so yields longer outputs than traceroute .

Accelerated-X server from Xi Graphics

The commercial ________ is an alternative to the open-source XFree86 and X.org-X11.

XFree86

The dominant X server in Linux until 2004 was ________ .

hostname

The most basic tool for setting your hostname locally is called, appropriately enough, ________ .

Common Unix Printing System (CUPS)

The print queue, which is managed by software known as the ____ __ _____ _____(____) , sends the job to the printer.

R = xres × yres × bpp ÷ 8,388,608 In this equation, R is the RAM in megabytes, xres is the x resolution in pixels, yres is the y resolution in pixels, and bpp is the bit depth.

The total amount of RAM required is determined by an equation: ________________________________

lowercase

The traditional practice is to use entirely ________ letters in Linux usernames.

GNU Privacy Guard (GPG)

The usual tool for encrypting e‐mail is the ___ _______ _____(___)

fc-cache as root

This command causes Xft to run through its font directories and create index files.

xhost +B

This command tells computer A to accept for display in its X server data that originates on computer B .

anacron

This program is designed as a supplement to cron to ensure that regular maintenance jobs are executed at reasonable intervals. It works by keeping a record of programs it should execute and how frequently it do so, in days.

nslookup

This program performs DNS lookups (on individual computers by default) and returns the results. It also sports an interactive mode in which you can perform a series of queries. This program is officially deprecated, meaning that it's no longer being maintained and will eventually be dropped from its parent package (bind-utils or bind-tools on most distributions).

dig

This program performs more complex DNS lookups than host . Although you can use it to fi nd the IP address for a single hostname (or a hostname for a single IP address), it's more flexible than host .

host

This program serves as a replacement for the simpler uses of nslookup , but it lacks an interactive mode, and of course many details of its operation differ.

mail local e-mail queue remote servers

This tool is a very basic command-line e-mail utility. It has the advantage of being usable from a script, so you can write a script to automatically handle some e-mail tasks, and perhaps even run that script automatically: ____ . (Unlike most e-mail readers, mail only supports reading the _____ _____ _____, not e-mail stored on ______ _______ and read via POP or IMAP.

the X Display Manager (XDM), the KDE Display Manager (KDM), and the GNOME Display Manager (GDM)

Three XDMCP servers are common on Linux: _______, _______ and ______ .

alias alias_name='commands'

To implement an alias, you use the following syntax: ___ ________

newgrp $ newgrp project2

To run programs or create files with a group other than the primary one, however, the user must run the ________ command to switch current group membership. For instance, to change to the project2 group, you might type the following: ________

LC_ALL LANG $ export LANG=en_GB.UTF-8 $ export LC_ALL=en_GB.UTF-8

To temporarily change your locale, the simplest method is to set the ________ environment variable. For safety, you should also set ____ . For instance, to use the locale for Great Britain rather than the United States, you can type: ________________ ________________

.ttf

TrueType fonts come as ____ files, and that's all you need for Linux.

machine(specific computer) domain(collection of computers)

Understanding Hostnames: As with IP addresses, hostnames are composed of two parts: _______ names and ______ names.

site-local fec, fed, fee, or fef Link-local fe8, fe9, fea, or feb.

Understanding Network Addressing: IPv6 has its equivalent to private addresses. IPv6 ____-_____ addresses may be routed within a site but not off-site. They begin with the hexadecimal number ___, ___, ___ or ___. ____-_____ addresses are restricted to a single network segment; they shouldn't be routed at all. These addresses begin with the hexadecimal number ___, ___, ___ or ___.

port number

Understanding Network Addressing: In order for one computer to communicate with another over a network, the computers need to have some way to refer to each other. The basic mechanism for doing this is provided by a network address, which can take several different forms, depending on the type of network hardware, protocol stack, and so on. Large and routed networks pose additional challenges to network addressing, and TCP/IP provides answers to these challenges. Finally, to address a specific program on a remote computer, TCP/IP uses a ____ ______, which identifies a specific running program, something like the way a telephone extension number identifies an individual in a large company.

frame

Understanding Network Packets: There are several types of packets, and they can be stored within each other. For instance, Ethernet includes its own packet type (known as a ________ )

domain data type

Understanding SQL Basics: The restrictions placed on what may appear in a column are known as a ______ or a ____ ____ .

DESCRIBE

Understanding SQL Basics: With the table created, you may want to verify that it's been created correctly. You can do so by typing ________ objects;

/etc/syslog.conf

Understanding syslogd: In order to work, of course, the log daemon must be configured. In the case of syslogd, this is done through the ________ file.

letter

Usernames must begin with a ________ .

if

Using Conditional Expressions: One common command that uses conditional expressions is __ , which allows the system to take one of two actions depending on whether some condition is true.

network hardware addresses numeric IP addresses hostnames

Using Network Addresses: A user may have a dial-up telephone connection (through a serial port) but connect to one server that uses Ethernet and another that uses Token Ring. Each of these devices uses a different type of low-level network address. TCP/IP requires something more to integrate across different types of network hardware. In total, three types of addresses are important when you're trying to understand network addressing: _______ ________ _________, ________ __ __________, and text-based _________.

parameters They're represented by a dollar sign ( $ ) followed by a number from 0 to 9— $0 stands for the name of the script, $1 is the first parameter to the script, $2 is the second parameter, and so on.

Variables that are passed to the script are frequently called __________.

case case word in pattern1) command(s) ;; pattern2) command(s) ;; ... esac word pattern semicolon ( ;; ) esac *

What do you do if more than two outcomes are possible—for instance, if a user may provide any one of four possible inputs? You can nest several if / then / else clauses, but this gets awkward very quickly. A cleaner approach is to use ____. For a case statement, a ____ is likely to be a variable, and each _______ is a possible value of that variable. Each set of commands must end with a double _________ and the case statement as a whole ends in the string ____. If no patterns match the word, no code within the case statement executes. If you want to have a default condition, use _ as the fi nal pattern ; this pattern matches any word , so its commands will execute if no other pattern matches.

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.

What information about print jobs does the lpq command display? (Select all 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

A. 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.

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.

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 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.

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 con- figuration 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.

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.

||

When __ is used, if either side of the operator is true, the condition as a whole is true.

&&

When conditionals are combined with __ , both sides of the operator must be true for the condition as a whole to be true.

~/.ssh/known_hosts

When you confi gure a client system, you may want to consider creating a global cache of host keys. As already noted, the ssh program records host keys for each individual user. (It stores these in the _/____/__________ file.)

.pfa or .pfb

When you're installing Type 1 fonts, Linux needs the font fi les with names that end in ____ or ____ ; these files contain the actual font data.

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 crite- ria. (Option C uses mixed upper- and lowercase characters, which is legal but discouraged.) Option B begins with a number, which is invalid. Option D is longer than 32 characters.

Which of the following are legal Linux usernames? (Select all that apply.) A. larrythemoose B. 4sale C. PamJones D. Samuel_Bernard_Delaney_the_Fourth

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.

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

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.

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

B. IP addresses consist of four 1-byte numbers (0-255). They're normally expressed in base 10 and separated by periods. 63.63.63.63 meets these criteria. 202.9.257.33 includes one value (257) that's not a 1-byte number. 107.29.5.3.2 includes five 1-byte numbers. 98.7.104.0/24 is a network address—the trailing /24 indicates that the final byte is a machine identifier, and the first 3 bytes specify the network.

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

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 is not a Linux DHCP client? A. pump B. dhcpcd C. dhcpd D. dhclient

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 types of network hardware does Linux support? (Select all that apply.) A. Token Ring B. Ethernet C. DHCP D. Fibre Channel

-a

While you're using the locale command, you should try it with the ____ option, which identifies all the locales that are available to you

ampersand ( & )

Writing Scripts: Each program-launch line in Listing 9.1 ends in an __________. This character tells the shell to go on to the next line without waiting for the first to finish.

631 http://localhost:631

You can access a CUPS daemon by using a Web browser. You need only specify that you want to access the server on port —____ the normal printer port. To do so, enter ________________ in a Web browser on the computer running CUPS.

env

You can also see all your current environment variables by typ- ing ____ .

ifconfig

You can discover the hardware address for an Ethernet card by using the ________ command.

/etc/sudoers visudo

You can even fine-tune what tasks users may perform. This is done via the /___/_______ configuration file. You must edit this configuration file via ______ .

whois

You can look up information on a domain as a whole with this command.

equal-sign export

You set an environment variable manually via an ____ assignment operator. To make the variable available to programs you launch from your shell, you then use the ______ command:

A. The alias built-in command creates a duplicate name for a (potentially much longer) com-mand. Option A shows the correct syntax for using this built-in command; it causes the new alias cdpt to work like the much longer cd ~/papers/trade. The export command in option B creates an environment variable called cdpt that holds the value cd ~/papers/trade. This will have no useful effect. Option C, if placed in a bash startup script, will cause the user's current directory to shift to ~/papers/trade immediately after the user logs in. There is no standard shortcut command, so option D is meaningless.

You want to create a shortcut for the command cd ~/papers/trade. Which of the following lines, if entered in a bash startup script, will accomplish this goal? A. alias cdpt='cd ~/papers/trade' B. export cdpt='cd ~/papers/trade' C. cd ~/papers/trade D. shortcut cdpt "cd ~/papers/trade"

A. All SMTP e‐mail servers are supposed to accept e‐mail to postmaster. Linux systems typically do so by using an alias to forward the e‐mail to another local user, or occasionally to a user on another computer. Thus, option A is correct. Options B and D both describe non-delivery of the message, in violation of proper e‐mail server configuration. Option C is effectively the same as option D unless creation of the postmaster account is imminent, and an e‐mail server would have no way of knowing this.

Your SMTP e‐mail server, mail.luna.edu, receives a message addressed to postmaster@ mail.luna.edu. There is no postmaster account on this computer. Assuming the system is properly configured, how should the e‐mail server respond? A. Deliver the e‐mail to another account, either locally or on another computer. B. Bounce the message so that the recipient knows the account doesn't exist. C. Hold the message in the local mail queue until the postmaster account is created. D. Delete the message without bouncing it so as to reduce e‐mail clutter.

-f file -s file ==

__ ____ is true if file exists and is a regular file; __ ____ is true if file exists and has a size greater than 0; and string1 __ string2 is true if the two strings have the same values.

Ghostscript PostScript

________ serves as a way to translate ________, a common printer language, into forms that can be understood by many different printers.

--route or -r

netstat: You can use the _______ or __ parameter to obtain a routing table listing similar to what the route command displays.

/etc/resolv.conf nameserver

​In order for Linux to use DNS to translate between IP addresses and hostnames, you must specify at least one DNS server in the _______ file. Precede the IP address of the DNS server by the keyword __________.

--interface or -i

​Pass netstat the ___________ or __ parameter to obtain information about your network interfaces similar to what ifconfig returns.

--masquerade or -M IP masquerading

​Pass netstat the_____________ or __ parameter to obtain information about connections mediated by Linux's NAT features, which often go by the name __ ____________. NAT enables a Linux router to "hide" a network behind a single IP address.

/etc/cron.deny

​The ________ file contains a list of users who should be denied access to cron .

Fetchmail

​This program fills an odd gap in the e‐mail delivery chain. If you run a small site that relies on an external ISP for e‐mail delivery, chances are the ISP supports only POP or IMAP. If you want to use a variety of e‐mail clients, you may want to run your own SMTP server, and perhaps your own POP or IMAP server, to deliver mail locally. To do this, you need a program that pulls mail using POP or IMAP and then injects it into a local SMTP mail queue. This is the job of _________.

Cyrus IMAP

​Two pull mail protocols, POP and IMAP, are popular. If a Linux system should function as a mail server from which users can read their e‐mail remotely, chances are you'll install a POP or an IMAP server package, such as _____ ____.


Kaugnay na mga set ng pag-aaral

Introduction to Kinesiology/Health/Physical Education

View Set

Positioning: Hip and Proximal Femur (CH 7)

View Set

Demonstrative Adjectives Practice #1

View Set

文法 - Be動詞過去式(was/were)

View Set

CompTIA Network+ Ch.8: IP Subnetting, Troubleshooting IP, and Introduction to NAT

View Set

SOC1A Exam 2 Study Guide (Modules 5-8)

View Set