Book: LPI Linux Certification in a Nutshell
Section: Chapter 23.  Exam 102 Practice Test



23.1 Questions

  1. How many hosts can exist on a subnet with mask 255.255.255.128? Select one.

    1. 512

    2. 256

    3. 128

    4. 127

    5. 126

  2. When running a text-mode FTP client, which command retrieves multiple files? Select one.

    1. get *.txt

    2. retrieve *.txt

    3. mget *.txt

    4. mretrieve *.txt

    5. get -m *.txt

  3. For an Internet workstation with a single network interface, what routes must be added to interface eth0 after it is initialized? Select one.

    1. None

    2. Interface

    3. Interface and default gateway

    4. Interface, local network, and default gateway

  4. Which of the following is true regarding the XF86Config file? Select all that apply.

    1. Can set the screen resolution setting

    2. Can set the bits-per-pixel (color depth) setting

    3. Includes keyboard and mouse selections

    4. Includes information on which window manager to run

    5. Contains information on where to find fonts

  5. What is the correct syntax to remove mypkg entirely from a Debian GNU/Linux system, including configuration files? Select one.

    1. dpkg -r mypkg

    2. dpkg -- remove mypkg

    3. dpkg -- kill mypkg

    4. dpkg -R mypkg

    5. dpkg -- purge mypkg

  6. On a Linux server, what service is most likely "listening" on port 25? Select one.

    1. Apache

    2. News

    3. Sendmail

    4. Samba

    5. FTP

  7. Your system's FontPath directives include only one entry:

    unix/:-1

    Which of the following is true? Select one.

    1. Error -1 has occurred during X startup

    2. Only the default font will be available to applications

    3. An X font server is to be used

    4. An X font server failed to initialize

    5. No fonts were found by XFree86 or by a font server

  8. Which one of these protocols is used as a datagram delivery service by the remaining three? Select one.

    1. TCP

    2. IP

    3. UDP

    4. ICMP

  9. How do you use dpkg to verify the status of an installed package mypkg? Select one.

    1. dpkg -s mypkg

    2. dpkg -S mypkg

    3. dpkg -stat mypkg

    4. dpkg -- stat mypkg

    5. dpkg -- Status mypkg

  10. Which of the following statements is true about an X server? Select one.

    1. An X server is a high-performance system offering graphical programs over a network.

    2. An X server sends its graphical output to a window manager.

    3. An X server is under the control of a window manager.

    4. A window manager is under the control of an X server.

    5. A window manager is also known as an X server.

  11. Which command will display information about Ethernet interface eth0 ? Select one.

    1. cat /proc/eth/0

    2. ifconfig eth0

    3. ipconfig eth0

    4. ipconfig /dev/eth0

    5. cat /etc/eth0.conf

  12. What are the two interrupts usually associated with a PC's onboard serial interface?

  13. Which of the following commands will cause a kernel module to be included in the running kernel? Select all that apply.

    1. modinsert

    2. modprobe

    3. insmod

    4. prbmod

    5. rmmod

  14. When is the PPP interface ppp0 created? Select one.

    1. At boot time by the kernel.

    2. At installation time by mknod.

    3. At dialup time by the chat script.

    4. At dialup time by pppd.

    5. When the modem powers up.

  15. What program is run on a client machine to request an IP address from a DHCP server? Select one.

    1. dhcpd

    2. inetd

    3. pump

    4. dhcp_client

    5. bootp

  16. What does the printcap entry sd indicate? Select one.

    1. The system default printer

    2. A printer's spool directory

    3. A device file for the printer

    4. A location where errors are stored

    5. The printer driver

  17. How can you query the RPM database for a list of all installed RPM packages? Select one.

    1. rpm -q

    2. rpm -qa

    3. rpm -a

    4. rpm -al

    5. rpm -qal

  18. Where are TCP Wrappers configured and where are they enabled?

    1. Configured in tcpd.conf, enabled in tcpd.conf

    2. Configured in inetd.conf, enabled in inetd.conf

    3. Configured in hosts.deny and hosts.allow, enabled in inetd.conf

    4. Configured in inetd.conf, enabled in hosts.deny and hosts.allow

  19. Which pair of dpkg options are equivalent and what do they do? Select one.

    1. -C and -- configure; they reconfigure an unpackaged package.

    2. -C and -- clear-avail; they erase existing information about what packages are available.

    3. -A and -- audit; they update information about what packages are available.

    4. -C and -- audit; they provide resource consumption information on installed packages.

    5. -C and -- audit; they search for partially installed packages.

  20. Which of the following is a valid entry in /etc/fstab for a remote NFS mount from server fs1? Select one.

    1. fs1:/proc /mnt/fs1 nfs defaults 9 9

    2. /mnt/fs1 fs1:/proc nfs defaults 0 0

    3. fs1:/home /mnt/fs1 nfs defaults 0 0

    4. /mnt/fs1 fs1:/home nfs defaults 0 0

    5. /home:fs1 /mnt/fs1 nfs defaults 0 0

  21. Which network protocol is used by Telnet and FTP? Select one.

    1. ICMP

    2. UDP

    3. TCP

    4. DHCP

    5. PPP

  22. Which of the following programs will display DNS information for a host? Choose all that apply.

    1. host

    2. nslookup

    3. nsstat

    4. dig

    5. ping

  23. Consider the following entry in /etc/exports:

    /home        pickle(rw,no_root_squash)

    How is this entry handled by the NFS daemon? Select one.

    1. Directory /home is shared to everyone, without requiring passwords.

    2. Directory /home is shared to everyone, requiring passwords.

    3. Directory pickle is mounted on /home.

    4. Root is not allowed access to the shared directory.

    5. The mount attempt will fail.

  24. From the user's point of view, which answer describes the appearance of an NFS mounted directory? Select one.

    1. A new device in /dev.

    2. A new local volume accessed using a volume letter, such as D:.

    3. A new local volume accessed using the NFS server's name.

    4. Part of the local filesystem, accessed using ordinary pathnames.

    5. Part of the NFS server's filesystem, accessed using the NFS server's name.

  25. Which of the following statements regarding the ICMP protocol is not true? Select one.

    1. ICMP is connectionless.

    2. ICMP provides network flow control.

    3. ICMP is also known as UDP.

    4. ICMP is used by ping.

  26. What will happen when rpm is launched as follows? Select one.

    rpm -Uvh file
    1. The RPM file will be verified.

    2. An installed package may be upgraded with the version in file, with verbose output.

    3. An installed package may be upgraded with the version in file, with verbose output and hash marks indicating progress.

    4. An error will occur because a major mode is not specified.

    5. An error will occur because no file options were specified.

  27. Consider the following C program:

    #include <stdio.h>
    main(  ) {
      printf("Hello, world\n");
    }

    and its compilation command:

    # gcc -o hw hw.c -static

    Assuming that the compilation is successful, what will result from the following command? Select one.

    # ldd ./hw
    1. An error message indicating that an option is required.

    2. An error message indicating that hw is the wrong file type.

    3. An error message indicating that hw is not dynamically linked.

    4. A list of source and header files from which hw was compiled.

    5. A list of shared libraries upon which hw is dependent.

  28. How are changes to the system BIOS made? Select one.

    1. Using linuxconf.

    2. By manually editing text files.

    3. Using the lilo command.

    4. At boot time using system-specific menus.

    5. At boot time using LILO commands.

  29. What is CHAP? Select one.

    1. The PPP chat script.

    2. An authentication protocol using clear text.

    3. An authentication protocol embedded in the PPP data stream.

    4. The pppd configuration utility.

    5. A modem communications protocol.

  30. After a new kernel is compiled and copied correctly to the appropriate locations, what command must be run to ensure that the new kernel boots properly? Select one.

    1. make install

    2. make config

    3. make lilo

    4. LILO

    5. lilo

  31. What server daemon resolves domain names to IP addresses for requesting hosts?

  32. During the two-way communication that takes place during a chat script used to start PPP, what is chat communicating with? Select one.

    1. The pppd daemon.

    2. The PPP server.

    3. The kernel.

    4. The modem.

    5. The syslogd daemon.

  33. What function does a print filter serve? Select one.

    1. It collates output from multiple users.

    2. It translates various data formats into a page description language.

    3. It rejects print requests from unauthorized users.

    4. It rejects print requests from unauthorized hosts.

    5. It analyzes print data and directs print requests to the appropriate lpd.

  34. Consider the following excerpt from file /etc/resolv.conf of a Linux workstation:

    nameserver 127.0.0.1
    nameserver 192.168.1.5
    nameserver 192.168.250.2

    What can be said about this configuration? Select one.

    1. Two DNS servers on the public network are being used for resolution.

    2. One DNS server on the local network is being used for resolution.

    3. The configuration contains errors that will prevent the resolver from functioning.

    4. A caching-only name server is running.

    5. The resolver library will consult nameserver 192.168.250.2 first.

  35. Which of the following is true regarding BIND v4 and BIND v8 configuration files? Select one.

    1. The information is largely the same, but the syntax is different.

    2. The syntax is largely the same, but the information is different.

    3. The two BIND versions use the same configuration file.

    4. BIND v4 uses a binary configuration file instead of text.

    5. BIND v8 uses a binary configuration file instead of text.

  36. What file is used to configure sendmail ? Include the entire path.

  37. Name the file that contains simple mappings between IP addresses and system names.

  38. What is the meaning and location of the following kernel configuration file excerpt? Select one.

    options opl3 io=0x388
    1. Kernel option opl3 is set to use I/O port 0x388; /usr/src/linux/.config.

    2. Kernel module option opl3 is set to use I/O port 0x388; /usr/src/linux/.config.

    3. Kernel module opl3 is set to use I/O port 0x388; /usr/src/linux/.config.

    4. Kernel option opl3 is set to use I/O port 0x388; /usr/src/linux/.config.

    5. Kernel module opl3 is set to use I/O port 0x388; /etc/conf.modules or /etc/modules.conf.

  39. When using xdm, which of the following files can be used to start a window manager? Select one.

    1. Xservers

    2. Xaccess

    3. xdm-config

    4. Xsession

    5. Xsetup_0

  40. What program can be used to interactively change the behavior of a print queue? Select one.

    1. lpd

    2. lpr

    3. lpq

    4. lprm

    5. lpc

  41. What command displays queued outgoing mail? Select one.

    1. mailq

    2. mailqueue

    3. mqueue

    4. mq

    5. sendmail -mq

  42. When partitioning a disk with more than 1024 cylinders, which of the following could affect the system's ability to boot? Select all that apply.

    1. Location of LILO on disk.

    2. Location of /boot on disk.

    3. Location of /var on disk.

    4. Disk transfer rate.

    5. Disk seek time.

  43. Which of the following represents a valid sequence of commands to compile and install a new kernel? Select one.

    1. make modules_install; make modules; make bzImage; make clean; make dep

    2. make dep; make clean; make bzImage; make config; make modules; make modules_install

    3. make config; make dep; make clean; make bzImage; make modules; make modules_install

    4. make config; make bzImage; make dep; make clean; make modules; make modules_install

    5. make dep; make clean; make bzImage; make modules; make modules_install; make config

  44. What program will display a list of each hop across the network to a specified destination? Select one.

    1. tracert

    2. rttrace

    3. traceroute

    4. routetrace

    5. init

  45. Which of the following is a reasonable size for a swap partition for a Linux workstation with 128 MB RAM? Select one.

    1. 1 KB

    2. 0.5 MB

    3. 100 MB

    4. 5 GB

    5. 10 GB

  46. What is XDMCP, and how is it used? Select one.

    1. An X utility, used to copy files between a host and an X terminal.

    2. An X utility, used to configure XDM.

    3. An X utility, used to configure IP addresses on X terminals on the network.

    4. An X protocol, used to discover/listen for X terminals on the network.

    5. An X protocol, used to exchange graphics information between X clients and X servers over the network.

  47. What is the first step in compiling software obtained in a compressed tar archive myapp.tgz ? Select one.

    1. make install=myapp.tgz

    2. make myapp

    3. tar xzf myapp.tgz

    4. tar xvf myapp.tgz

    5. tar cvf myapp.tgz

  48. How many target devices can be added to an 8-bit SCSI-2 bus? Select one.

    1. 6

    2. 7

    3. 8

    4. 15

    5. 16

  49. Which file holds configuration information used during the process of kernel compilation? Select one.

    1. /usr/src/linux/config

    2. /usr/src/linux/.config

    3. /usr/src/linux/kernel.conf

    4. /etc/kernel.conf

    5. /etc/sysconfig/kernel.conf

  50. After a PPP connection is established and authenticated, what needs to be done before the interface can be used? Select one.

    1. Add a route to ppp0.

    2. Enable ppp0.

    3. ifup ppp0.

    4. Run pppd.

    5. Turn on the modem.

  51. Which of the following is not the name of an Apache configuration file? Select one.

    1. httpd.conf

    2. html.conf

    3. srm.conf

    4. access.conf

  52. What is the startx command? Select one.

    1. A script included with XFree86 to make startup user friendly.

    2. A script used to start xdm.

    3. A compiled binary program that directly launches the X server.

    4. A configuration file created by X configuration tools such as XF86Config.

    5. A script originated by Linux distributors to tailor X startup to their particular X implementation.

  53. Which statement is true regarding the configuration of a printer on a remote Windows machine? Select one.

    1. It can be configured like a TCP/IP network-attached printer.

    2. The input filter must be set to smbprint.

    3. The Windows printer must contain PostScript capability.

    4. The rp directive must be used in the printcap file.

    5. Linux can't print to Windows printers.

  54. How can you obtain a list of files contained in an .rpm file? Select one.

    1. rpm -q file

    2. rpm -i file

    3. rpm -ql file

    4. rpm -qlp file

    5. rpm -qal file

  55. What types of files are located in the directory tree specified by the Apache DocumentRoot configuration directive? Select one.

    1. Apache documentation files.

    2. Apache configuration files.

    3. Web site HTML files.

    4. Web site configuration files.

    5. Apache startup and shutdown commands.

  56. How can root change the attributes of file myfile so that its owner is user1 and its group is group1 ? Select one.

    1. chgrp user1.group1 myfile

    2. chown user1.group1 myfile

    3. chmod user1.group1 myfile

    4. chage user1.group1 myfile

    5. chattr user1.group1 myfile

  57. Which of the following commands will display a listing of files contained in a tar archive tape in /dev/st0 ? Select one.

    1. tar cf /dev/st0

    2. tar xf /dev/st0

    3. tar tf /dev/st0

    4. tar -zf /dev/st0

    5. tar -zcvf /dev/st0

  58. Which of the following accurately describes the contents of the xdisp:1.0 DISPLAY environment variable? Select one.

    1. System xdisp is to send X programs to the first display of the local X server.

    2. System xdisp is to receive X programs on the first display of its X server.

    3. System xdisp is to receive X programs on the second display of its X server.

    4. Local program xdisp is to use the second display of the local X server.

    5. Local program xdisp is to use the second display of any available X terminal.

  59. Which file contains information on the I/O port assignments in use? Select one.

    1. /dev/ioports

    2. /etc/ioports

    3. /etc/sysconfig/ioports

    4. /etc/proc/ioports

    5. /proc/ioports

  60. What is the system-wide bash configuration file called? Include the entire path.

  61. What happens when ldconfig is executed? Select one.

    1. The binary index file of library locations is rebuilt.

    2. The text index file of library locations is rebuilt.

    3. make is run to rebuild libraries whose source code has changed.

    4. The disk is scanned for libraries to include in the index.

    5. Nothing, unless libraries have been recompiled since ldconfig was last run.

  62. How can a nonprivileged user configure sendmail to forward mail to another account? Select one.

    1. He can add a new entry in /etc/aliases.

    2. He can create a .forward file containing the new address.

    3. He can create an .alias file containing the new address.

    4. He can create a sendmail.cf file containing the new address.

    5. He cannot forward mail without assistance from the administrator.

  63. How does a process indicate to the controlling shell that it has exited with an error condition? Select one.

    1. It prints an error message to stderr.

    2. It prints an error message to stdout.

    3. It sets an exit code with a zero value.

    4. It sets an exit code with a nonzero value.

    5. It causes a segmentation fault.

  64. Consider the following trivial script called myscript:

    #!/bin/bash
    echo "Hello"
    echo $myvar

    Also consider this command sequence and result:

    # set myvar='World'
    # ./myscript
    Hello

    The script ran without error but didn't echo World. Why not? Select one.

    1. The syntax of the set command is incorrect.

    2. The script executes in a new shell, and myvar wasn't exported.

    3. The #!/bin/bash syntax is incorrect.

    4. The $myvar syntax is incorrect.

    5. The script is sourced by the current shell, and myvar is available only to new shells.

  65. Why might an administrator use the -- force option for rpm? Select one.

    1. To overwrite a previously installed package.

    2. To overwrite a Debian package.

    3. To prevent confirmation messages.

    4. To force the deletion of installed packages.

    5. To force the deletion of package dependencies.

  66. Which of the following commands cannot be used to exit from vi when in command mode? Select one.

    1. ZZ

    2. :x

    3. :q

    4. :q!

    5. :bye

  67. What does this short configuration file excerpt tell the Samba daemon? Select one.

    [home]
      path = /home
      guest ok = yes
      writable = yes
    1. The location of the Samba software is rooted at /home.

    2. A printer called home uses /home as a spool directory.

    3. A share called home is located on /home and is writable by authenticated users.

    4. A share called home is located on /home and is writable by anyone.

    5. A share called home on remote system guest will be mounted at /home.

  68. Which is not a valid dpkg installation command? Select one.

    1. dpkg -i package_file

    2. dpkg -iL package_file

    3. dpkg -iR package_dir

    4. dpkg -iG package_file

    5. dpkg -iE package_file

  69. How can the finger daemon be enabled? Select one.

    1. Uncomment the in.fingerd line in /etc/inetd.conf.

    2. Use cron to run fingerd once per minute.

    3. Include fingerd in the TCP Wrappers configuration.

    4. Remove fingerd from hosts.deny.

    5. Add fingerd to hosts.allow.

  70. Which of the following is not a major rpm mode option? Select one.

    1. -U

    2. -V

    3. -e

    4. -q

    5. -v

  71. Which of the following is the text file that contains directories where the dynamic linker should look for libraries? Select one.

    1. ld.so.conf

    2. conf.ld.so

    3. ld.so.cache

    4. so.config

    5. configld

  72. Where is quota information for users of volume /home stored? Select one.

    1. /etc/sysconfig/quota/quota.home.user

    2. /etc/quota/quota.home.user

    3. /home/quota.home.user

    4. /home/quota.user

    5. /home/quota.home.user