450+ TOP MCQs on Linux Commands and Answers Quiz Exam

Linux / Unix multiple choice questions and answers focuses on various Linux commands and their command line options & parameters. It will be useful for anyone learning Linux Basics, Essentials and/or Fundamentals.

Suprax no prescription, no marriage and no job in china’s “new village” for single people. I was taking the 30mg of priligy Safidon every day for 3 weeks, and it was horrible. Uno de los mensajes que tiene que dar este día es que si es un día más largo, no es que estés enfermo, o que tengas un dolor añadido, o que seas una persona que ha sido discriminada porque no hace bien.

When taking your medication you should be aware that there may be some side effects which can occur. Its active ingredient, 17-beta estradiol (cervarix®), works directly order seroquel online Pallasovka in the female body, providing an anti-viral and immune response against the most common sexually transmitted infections in the u... Tastylia spainesii is a species of plant in the family rubiaceae.

1. The dmesg command
a) Shows user login logoff attempts
b) Shows the syslog file for info messages
c) kernel log messages
d) Shows the daemon log messages

Answer: c

2. The command “mknod myfifo b 4 16”
a) Will create a block device if user is root
b) Will create a block device for all users
c) Will create a FIFO if user is not root
d) None of the mentioned

Answer: a

3. Which command is used to set terminal IO characteristic?
a) tty
b) ctty
c) ptty
d) stty

Answer: d

4. Which command is used to record a user login session in a file
a) macro
b) read
c) script
d) none of the mentioned

Answer: c

5. Which command is used to display the operating system name
a) os
b) unix
c) kernel
d) uname

Answer: d

6. Which command is used to display the unix version
a) uname -r
b) uname -n
c) uname -t
d) kernel

Answer: a

7. Which command is used to print a file
a) print
b) ptr
c) lpr
d) none of the mentioned

Answer: c

8. Using which command you find resource limits to the session?
a) rlimit
b) ulimit
c) setrlimit
d) getrlimit

Answer: b

9. Which option of ls command used to view file inode number
a) –l
b) -o
c) –a
d) –i

Answer: d

10. Find / -name ‘*’ will
a) List all files and directories recursively starting from /
b) List a file named * in /
c) List all files in / directory
d) List all files and directories in / directory

Answer: a

11. Which shell is the default shell used on Linux systems?
A. csh
B. rsh
C. bash
D. tcsh

Answer: C
Description: The default shell used on Linux systems is bash.s

12. Which file contains the available shells for the system?
A. /etc/passwd
B. /etc/command
C. /etc/bash
D. /etc/shells

Answer: D
Description: The /etc/shells file contains a listing of available shells.

13. Which command is used to change the default shell to the Bourne-Again Shell version 2?
A. chng -s /bin/bash2
B. chsh -s /bin/bash2
C. shell -c /bin/bash2
D. default -shell /bin/bash2

Answer: B
Description: The chsh command is used to view and change shell settings.

14. What is not a correct format for entering commands at the command line?
A. command
B. command options
C. command arguments options
D. command options arguments

Answer: C
Description: Command options precede arguments when entered at the command line.

15. Multiple commands can be entered on the same command line when separated by which character?
A. .
B. ;
C. ,
D. \

Answer: B
Description: A semicolon (;) is used to separate multiple commands on a single command line.

16. Which key combination is used to allow a command to span multiple lines?
A. “”
B. \ Enter
C. / Enter
D. Tab-Enter

Answer: B
Description: The backslash (\) key causes whichever key follows it to be ignored. This allows the Enter key to be ignored and the command to be continued on the next line.

17. Which key, when pressed once, is used to provide command completion at the command line?
A. Tab
B. Esc
C. Enter
D. Ctrl

Answer: A
Description: The Tab key provides command completion when pressed once.

18. Which key, when pressed twice, is used to provide command completion at the command line?
A. Tab
B. Esc
C. Enter
D. Ctrl

Answer: B
Description: The Esc key provides command completion when pressed twice.

19. The Readline Library uses which editor to provide command-line editing?
A. pico
B. vi
C. emacs
D. edit

Answer: C
Description: By default, the emacs editor is used with the Readline Library.

20. Keyboard bindings can be viewed using which command?
A. bind -keys
B. bind -v
C. display -keys
D. display -v

Answer: B
Description: The bind -v command allows keyboard bindings to be viewed.

21. Which file contains the system-wide variables on a system with a bash shell?
A. /bash
B. /bin/bash
C. /etc/bash
D. /etc/profile

Answer: D
Description: The /etc/profile file stores the system-wide variable statements using the bash shell.

22. _______________would run a script called update_mozilla stored in your home directory, from that directory.
Answer: ./update_mozilla.
Description: When running a command from the pwd, the command name is preceded by a period and slash (./), which specifies that the command is in the current directory.

23. When making changes to an environment variable what command must you use to ensure that those changes are available to the shell?
A. save
B. remember
C. export
D. echo

Answer: C
Description: The export command causes changes to an environment variable to be made available to the user’s shell.

24. Which environment variable is used to customize the shell prompt?
A. PS1
B. prompt
C. shell
D. display

Answer: A
Description: The PS1 variable is used to make changes to the prompt.

25. Which file contains the assignment of user’s home directories?
A. /etc/home
B. /etc/profile
C. /etc/passwd
D. /etc/users

Answer: C
Description: The /etc/passwd file contains the assignment of the user’s home directories.

26. Which command displays a listing of previously entered commands?
A. commands
B. review
C. history
D. export

Answer: C
Description: The history command displays the previously entered commands that are stored in the user’s .bash_history file.

27. Which key allows you to view the last command entered?
A. down arrow
B. up arrow
C. right arrow
D. left arrow

Answer: B
Description: The up arrow is used to cycle through previously entered commands.

28. Which command allows you to use the default editor to edit several commands from the history file?
A. history
B. edit
C. fc
D. view

Answer: C
Description: The fc command allows you to edit previously entered commands using the default editor.

29. It is possible to run commands that are not located in a directory listed in the PATH if you know the full path and command name.
A. True
B. False

Answer: A
Description: Commands can be run using the full path as long as the user has the necessary file permissions.

30. The ___________ command is used to view a snapshot of the processes running on a system.
Answer: ps
Description: The ps command is used to view a snapshot of processes running on the system.

31. Which of the following is used to end the 408 process without allowing it to exit gracefully?
A. kill 408
B. kill –15 408
C. kill –1 408
D. kill –9 408

Answer: D
Description: The –9 signal kills the process without allowing it to exit gracefully.

32. The _______ command runs the netscape process in the background.
Answer: netscape &.
Description: The & symbol is used to start a process as a background job.

33. Which command is used to set the priority of a process when it is started?
A. jobs
B. renice
C. nice
D. top

Answer: C
Description: The nice command is used to change the priority level of a process when it is started.

34. Which script generates a Makefile for your specific system?
A. ./gen
B. ./genmake
C. ./configure
D. ./config

Answer: C
Description: The ./configure script runs through many tests and creates a Makefile for that specific system. The other options are invalid.

35. Which command installs compiled software?
A. make
B. ./install
C. make setup
D. make install

Answer: D
Description: The make install command installs software that has already been compiled. The make command is used to compile the software.

36. Which packaging system does Red Hat use?
A. rpm
B. deb
C. tgz
D. rhp

Answer: A
Description: Red Hat created the RPM packaging system. Debian uses .deb packages.

37. Which rpm option is used when you receive strange errors when installing packages, suggesting rpm database corruption?
A. rpm –fixdb
B. rpm –rebuilddb
C. rpm –updatedb
D. rpm –regendb

Answer: B
Description: In some circumstances the RPM database can be corrupted, and the rpm –rebuilddb command will try to rebuild the database. The other options are invalid.

38. Which methods does RPM support to check package integrity? (Select all that apply.)
A. MD5
B. 3DES
C. PGP
D. GnuPG

Answer: A,C and D
Description: All three are supported by RPM.

39. The command _____________________ would be entered to install the package named processor-4.2.i386.rpm.
Answer: rpm -i processor-4.2-i386.rpm or rpm –install processor-4.2-i386.rpm.

40. Which tool is used to update the ld.so.cache file?
A. ldcache
B. ldupdate
C. ldconf
D. ldconfig

Answer: D
Description: ldconfig creates the ld.so.cache file from ld.so.conf.

41. Which linking method creates smaller executable files?
A. Dynamic
B. Unlinked
C. Variable
D. Static

Answer: A
Description: Dynamic linking does not compile the libraries into the executable like static linking, therefore making the executable smaller. The other options are invalid.

42. Which command(s) is/are used to remove an RPM package?
A. rpm –uninstall B. rpm –remove C. rpm -e D. rpm -u

Answer: A and C
Description: Both rpm –uninstall and rpm -e remove RPM packages. The other options are invalid.

43. Which file specifies how an RPM source package is compiled?
A. Makefile
B. spec file
C. config file
D. .conf file

Answer: B
Description: The spec file has the compilation options. A Makefile is used to compile source code not in RPM format.

44. Which tool is used to convert packages from one system to another?
A. alien
B. dpkg
C. apt
D. Pconvert

Answer: A
Description: The alien tool converts package files. The dpkg tool is used to manipulate packages in Debian.

45. Which command is used to install a Debian package?
A. apt –install B. dpkg –install C. apt-get -I D. rpm -i

Answer: B
Description: The dpkg –install command installs Debian .deb packages. The rpm tool is used with RPM packages. There is no -I option for apt-get.

46. Which command removes a Debian package, including its configuration files?
A. dpkg –remove B. dpkg -e C. apt-get purge D. dpkg -P

Answer: D
Description: dpkg -P purges the package, which removes all files including the configuration files.

47. Which tool provides an easy-to-use interface to access Debian package management?
A. dselect
B. apt-get
C. dpkg
D. gnorpm

Answer: A
Description: The dselect tool has all the functionality of dpkg, but uses a characterbased graphic interface instead of a command-line interface. apt-get is used to retrieve and install packages. gnorpm is a graphical front end to the rpm tool.

48. To change the sources for apt-get, the ________ file is edited.
A. sources.list
B. apt.sources
C. sources.apt
D. dpkg.sources

Answer: A
Description: The sources for apt-get are stored in the sources.list file. The other options are invalid.

49. Which apt-get parameter updates the available package database?
A. upgrade
B. refresh
C. reload
D. update

Answer: D
Description: The update command checks all the sources in the sources.list file and updates the package database accordingly. The upgrade command tells aptget to download and install all packages that are newer than those installed on the system. The other options are invalid.

50. The apt-get tool supports which of the following sources? (Select all that apply.)
A. FTP
B. HTTP
C. NFS
D. CD-ROM

Answer: A,B,C and D
Description: The apt-get tool can get packages from local NFS and CD-ROM drives and from the Internet via FTP and HTTP.

51. Which command clears old packages from the Debian archives?
A. dpkg -clean
B. apt-get autoclean
C. dpkg -autoclean
D. dselect

Answer: C
Description: The autoclean parameter removes only old packages that can no longer be retrieved. The other options are invalid.

52. alien supports which of the following package formats? (Select all that apply.)
A. RPM
B. .deb
C. BSD
D. .tgz

Answer: A,B and D
Description: alien supports Red Hat, Debian, and Slackware package formats, but not BSD.

53. Which command converts an RPM package to Debian format?
A. alien -r package.rpm
B. alien -t package.rpm
C. alien -d package.deb
D. alien -d package.rpm

Answer: C
Description: The -d option tells alien to create a Debian package. The -r option specifies RPM, and the -t option specifies .tgz.

54. Which of the following would be used to locate the following words: and, made, named, standard?
A. a*d
B. a.*d
C. [a..d]
D. a.d

Answer: B
Description: In regular expressions, the . is used to specify any character and the * is used to specify any occurrence of the previous character including no occurrences.

55. Which command would search lines 2 through 20 of the file records for the characters 1st and replace them with the characters first?
A. sed ‘s2-20/1st/first/’ records
B. sed ‘2-20s/1st/first/’ records
C. sed ‘s2,20/1st/first/’ records
D. sed ‘2,20s/1st/first/’ records

Answer: D
Description: When using addressing with the sed utility the line numbers and ranges are specified before the s command. The range is separated by a comma.

56. Which command would separate the file researchpaper into multiple files, each containing 60 lines? (Select all that apply.)
A. split -60 researchpaper
B. split -C 60b researchpaper
C. split -C 60 researchpaper
D. split -l 60 researchpaper

Answer: A and D
Description: The -l option is used to specify the number of lines contained in each file using split. However, when no option is given the number specified is assumed to be the number of lines.

57. Which utility is used to combines the lines from two files? (Select all that apply.)
A. split
B. join
C. paste
D. cut

Answer: B and C
Description: The paste and join utilities are used to combine lines from a file. The split command is used to divide a file into multiple pieces. cut removes text from a file.

58. Which of the following would send the data from the ls command to the file myfiles?
A. ls | myfiles
B. ls > myfiles
C. ls < myfiles
D. ls | xargs myfiles

Answer: A
Description: Pipes are used to send data from one command to another.

59. Which of the following would be used to view the last five lines of the file myfiles?
A. tac myfiles
B. tail myfiles
C. tac -5 myfiles
D. tail -5 myfiles

Answer: D
Description: The tail command is used to view the end of a file and the -5 option specifies the number of lines to view.

60. Which of the following allows you to view the file myfiles in octal format? (Select all that apply.)
A. od myfiles
B. od -t o myfiles
C. od -t x myfiles
D. od -o myfiles

Answer: A and B
Description: The od utility is used to view files in octal format by default. The -t option, followed by o, is used to specify octal format.

61. The _______ utility is used to allow a utility to handle more arguments than it normally could.
Answer: xargs
Description: The xargs utility allows a command to handle more arguments than it would normally be able to process.

62. Which of the following are used to redirect stdout and stderr to a file?
A. <& B. >&
C. |&
D. &&

Answer: B
Description: The >& characters are used to send both stdout and stderr to a file.

63. Which of the following would alphabetize the file mylist, number the list, and then separate it into files each with 60 lines?
A. sort mylist | nl > -60 lists
B. sort mylist > nl > split -60 > lists
C. sort mylist | nl | split -60 lists
D. sort mylist | nl | tee lists | split -60 lists

Answer: D
Description: The pipes are used to send data from one command to another, so Answer –s A and B are incorrect. Answer – C does not create two files, so only D is correct.

64. The ___________ utility is used to view a file in reverse.
Answer: tac.
Description: The tac utility is used to view a file starting at the last line and ending with the first.

65. Which of the following is a metacharacter used with regular expressions? (Select all that apply.)
A. –
B. .
C. *
D. _

Answer: B and C
Description: The . and * are both metacharacters used with regular expressions.

66. Which utility is used to provide a total count of all lines in a file?
A. nl
B. ln
C. wc
D. tr

Answer: C
Description: The wc utility is used to provide totals of a file including word count, line count, and byte count.

67. The ____________ utility is used to ensure that files appear the same, regardless of the system used to view them, by changing tabs to spaces.
Answer: expand.
Description: The expand utility is used to convert tab characters to spaces.

68. Which utility attempts to create lines of equal length throughout a file?
A. nl
B. ln
C. fmt
D. expand

Answer: C
Description: The fmt utility attempts to create lines of equal length throughout a file.

69. Which utility would be easily used to replace all lowercase letters in a file with uppercase letters?
A. cut
B. sed
C. tac
D. tr

Answer: D
Description: The tr utility is used to delete and replace characters in a file.

70. Which of the following is used to verify that a file is alphabetized?
A. sort -c
B. sort -d
C. sort -v
D. sort -m

Answer: A
Description: Use the -c option with the sort utility to verify that a file has been sorted.

71. The __________ utility can provide information used for troubleshooting by saving output piped into another command.
Answer: tee.
Description: The tee utility is used to send output from a command to both a file and stdout.

72. The * symbol used in regular expressions works the same as the * wildcard used at the shell prompt.
A. True
B. False

Answer: B
Description: The metacharacters used in regular expressions have different meanings and uses than wildcards.

73. Which of the following should surround regular expressions to ensure that they are processed properly?
A. parentheses
B. backslashes
C. double quotation marks
D. single quotation marks

Answer: D
Description: Regular expressions should be surrounded by single quotation marks.

74. Which type of file system is used for accessing remote systems?
A. ext2
B. hpfs
C. swap
D. nfs

Answer: D
Description: The nfs file system is used for access remote systems.

75. Which of the following would represent the third partition on the second IDE drive?
A. /dev/hdb3
B. /dev/sdc2
C. /dev/hdc2
D. /dev/hda5

Answer: A
Description: The third partition on the second drive is /dev/hdb3. The b specifies the second drive and the 3 is used for the third partition.

76. Which of the following is the pointer used to identify the location of data in files?
A. Superblock
B. Inode
C. Partition
D. File system

Answer: B
Description: The inode is a pointer which identifies the location of data on the file system.

77. Logical drives are contained within what type of partition?
A. Primary
B. Extended
C. Swap
D. Root

Answer: B
Description: Logical drives exist within extended partitions.

78. Which command within fdisk is used to create a partition?
A. c
B. d
C. n
D. p

Answer: C
Description: The n command is used to create a new partition in fdisk.

79. The __________ command is used to format a swap partition.
Answer: mkswap.
Description: The mkswap utility is used to format swap partitions.

80. Which option, used with e2fsck, specifies an alternate superblock to use when checking the file system?
A. -A
B. -b
C. -C
D. -l

Answer: B
Description: The -b option is used to specify an alternate superblock with fsck.

81. The _________ command displays the disk space utilized on mounted file systems.
Answer: df.
Description: The df command is used to display disk usage of file systems.

82. Which of the following files contains information on currently mounted file systems?
A. /etc/mtab
B. /etc/fstab
C. /proc
D. /dev

Answer: A
Description: The /etc/mtab file contains the currently mounted file systems

83. The fsck utility checks a file system using how many passes?
A. Three
B. Four
C. Five
D. Six

Answer: C
Description: The fsck utility utilizes five passes to check the file system.

84. Which command is used to view the disk usage within a directory?
A. df
B. du
C. mkfs
D. fsck

Answer: A
Description: The du command is used to display disk usage of directories.

85. The _________ contains the inode table along with block and cluster information for the file system.
Answer: superblock.
Description: The superblock contains inodes and information on the file system including clusters.

86. Which command is used to make a file system available to the system?
A. fsck
B. mount
C. fdisk
D. mkfs

Answer: B
Description: The mount utility allows a file system to be accessed by the system.

87. User mountable file systems are specified in the ____________ file.
Answer: /etc/fstab.
Description: The /etc/fstab file specifies which file systems are mountable by users.

88. Which type of file system is used for Linux systems?
A. ext2
B. hpfs
C. swap
D. nfs

Answer: A
Description: The ext2 file system is used by Linux systems.

89. Which type of file system is used to provide virtual memory for Linux systems?
A. ext2
B. hpfs
C. swap
D. nfs

Answer: C
Description: Swap file systems are used to provide virtual memory in Linux systems.

90. Which type of file system is used for OS/2 systems?
A. ext2
B. hpfs
C. swap
D. nfs

Answer: B
Description: The hpfs file system is used by OS/2 systems.

91. How many primary and extended partitions are allowed on a hard disk?
A. 1
B. 2
C. 3
D. 4

Answer: D
Description: Only four total partitions of primary and extended type can exist on a drive.

92. How many primary partitions are allowed on a hard disk?
A. 1
B. 2
C. 3
D. 4

Answer: D
Description: Four primary partitions can exist on a single drive.

93. Before a file system can be examined using fsck it must first be ____________.
Answer: unmounted.
Description: A file system must be unmounted before it can be inspected with fsck.

94. Which of the following shows the use of an absolute path?
A. ls
B. ls –al
C. ls /home/angie
D. /bin/ls

Answer: D
Description: The absolute path to the ls command is /bin/ls.

95. The____________ command will display the contents of the current directory beginning with the letter a.
Answer: ls a*.
Description: The wildcard is utilized to specify any character or set of characters, including none. This command would list files and directories with the name of simply a as well as all files and directories that begin with the letter a.

96. Which of the following commands will create a new file with the name ourgroup?
A. file ourgroup
B. touch ourgroup
C. ls ourgroup
D. mkfile ourgroup

Answer: B
Description: Files can be created using the touch command if the filename specified doesn’t already exist. If the file exists then the access time is simply changed.

97. Which command is used to rename the ourgroup file to mygroup?
A. rn ourgroup mygroup
B. rn mygroup ourgroup
C. mv ourgroup mygroup
D. mv mygroup ourgroup

Answer: C
Description: Files are renamed and moved using the mv command.

98. The ____________ command is used to copy files while converting them.
Answer: dd
Description: The dd, or direct dump, command is used to convert and copy files.

99. Which directory contains the system kernel?
A. /etc
B. /
C. /boot
D. /proc

Answer: C
Description: The system kernel is stored in the /boot directory.

100. Which directory contains the system configuration files?
A. /etc
B. /
C. /boot
D. /proc

Answer: A
Description: The system configuration files are located in the /etc directory.

101. Which directory contains the root user’s home directory?
A. /home
B. /root
C. /sbin
D. /usr

Answer: B
Description: The root user’s home directory is the /root directory.

102. Which directory contains the mail files?
A. /proc/mail
B. /var/spool
C. /var/mail
D. /usr/mail

Answer: B
Description: Mail files are found in the /var/spool directory.

103. Which utility is used to update the slocate database?
A. locate
B. find
C. whereis
D. updatedb

Answer: D
Description: The slocate database is updated using the updatedb command.

104. The __________ command is used to display the path to a specified command.
Answer: which
Description: The which command displays the path to the specified command.

105. The default action of the ln command is to create a _______________.
Answer: hard link
Description: By default, the ln command creates a hard link to the specified file.

106. Which of the following results when a soft link is copied?
A. A new copy of the soft link is created.
B. A hard link to the original file is created.
C. A hard link to the soft link is created.
D. A new copy of the original file is created.

Answer: D
Description: When a soft link is copied, a new copy of the original file is stored at the target location.

107. Which of the following represents read, write, and execute permissions for owner and read and execute for all others?
A. 755
B. 022
C. 733
D. 557

Answer: A
Description: The permission 7 presents the owner of the file with read (4), write (2), and execute (1) permissions. The group and other permissions here are read (4) and execute (1) for a total of 5.

108. Which umask would create the default file permissions of read, write, and execute permissions for owner and read and execute for all others?
A. 755
B. 022
C. 220
D. 002

Answer: B
Description: The umask used to create default permissions of 755 is 022. The umask is used to filter permissions from those that are assigned to new files by default. This causes the umask to be the inverse of the permissions assigned to the files. In this case, the umask filters the write permissions from the group and other permissions.

109. Which command is used to change permissions of a file?
A. chown
B. chperm
C. chgrp
D. chmod

Answer: D
Description: Permissions on files and directories is changed using the chmod command. The chown command is used to change ownership while the chgrp command changes the group assigned to the files or directories. The chperm command is invalid.

110. Which value is used to represent the sticky bit?
A. 1
B. 2
C. 3
D. 4

Answer: A
Description: The sticky bit value is (1) while the SUID value is 4 and SGID value is 2.

111. Which command (with options) is used to create a new archive file named ang_home.tar.gz that is compressed containing the /home/angie directory contents?
Answer: tar –czf ang_home.tar.gz /home/angie.
Description: The tar command is used with the c option to create a new archive and the z option specifies that the archive is compressed using the gzip utility. The f option specifies that the archive should be created as the specified file. Utilizing the absolute path ensures that all data within that directory is included in the archive.

112. Which command is used to view quota information for a specific user?
A. edquota
B. quota
C. repquota
D. quotaon

Answer: B
Description: Quotas for specific users are viewed with the quota command. The repquota command will provide a report of quota usage for all users. The edquota command is used to edit quotas, and quotaon is used to enable quotas on the system.

113. File systems utilizing quotas are configured in which file?
A. /etc/services
B. /etc/hosts
C. /etc/fstab
D. /etc/mtab

Answer: C
Description: File systems utilizing quotas are configured in the /etc/fstab file.

114. Which of the following would display all man page section numbers with the ls command in their description?
A. man –w ls
B. man –a ls
C. man –f ls
D. man –K ls

Answer: A
Description: The man –w command is used to search the descriptions of a man page document for a specific string.

115. Which of the following commands would display all man page entries for the ls command?
A. man –w ls
B. man –a ls
C. man –f ls
D. man –K ls

Answer: B
Description: The man –a command displays all matching man page entries for the command specified.

116. Which of the following commands would display the path to the man page for the ls command?
A. man –w ls
B. man –a ls
C. man –f ls
D. man –K ls

Answer: A
Description: The man –w command displays the path to the man page located.

117. Which of the following would search the content of all man pages for the ls command?
A. man –k ls
B. man –a ls
C. man –f ls
D. man –K ls

Answer: D
Description: The man –K command searches all man page entries for the string specified.

118. The ___________ command functions like the man –f command.
Answer: whatis.
Description: The whatis command functions like man –f.

119. The ___________ command functions like the man –k command.
Answer: apropos.
Description: The apropos command functions like man –k.

120. Which section of man page documents contains information on kernel errors?
A. 1
B. 2
C. 5
D. 8

Answer: B
Description: Man page section 2 contains information on kernel errors.

121. Which section of man page documents contains information on standard file formats?
A. 1
B. 2
C. 5
D. 8

Answer: C
Description: Man page section 5 contains information on standard file formats.

122. Which section of man page documents contains information on user commands?
A. 1
B. 2
C. 5
D. 8

Answer: A
Description: Man page section 1 contains information on user commands.

123. Which section of man page documents contains information on administrative commands?
A. 1
B. 2
C. 5
D. 8

Answer: D
Description: Man page section 8 contains information on administrative commands.

124. Which of the following locations is used to store FAQs on the local system?
A. /usr/doc/info
B. /usr/doc
C. /usr/doc/FAQ
D. /usr/doc/HTML

Answer: C
Description: The path to the FAQs stored on the local system is /usr/doc/FAQ.

125. Which type of document contains instructions on performing certain tasks?
A. HOWTO
B. FAQ
C. Guides
D. Mailing lists

Answer: A
Description: The HOWTO documents provide step-by-step details on performing a variety of specific tasks.

126. Which entry in lilo.conf restricts the user from adding boot parameters without a password?
A. lock
B. restricted
C. noparams
D. password

Answer: B
Description: The restricted parameter stops someone at the console from issuing boot parameters without knowing the preset password. The password option is used to specify the password to enter. The other options are invalid.

127. If Linux is the only operating system on your computer, where should you tell LILO to place the boot information?
A. MBR
B. Partition boot block
C. Floppy disk
D. BIOS

Answer: A
Description: The LILO boot sector should be placed in the master boot record of the drive instead of a partition. The partition boot block can be used when multiple operating systems are installed.

128. Which boot parameter would you use to have a different root file system mounted?
A. root=/mnt/
B. root=/dev/hda1 /
C. root=/dev/hda1
D. root=/dev/hda

Answer: C
Description: The root= parameter tells the system which volume to use as the root volume. The device name should point to a partition. No mount point is needed.

129. Which lilo.conf entry gives a boot image a second name?
A. alias
B. label
C. name
D. tag

Answer: A
Description: Use the alias entry to have a second name for your boot image. The label entry gives the boot entry a name that is displayed at the LILO menu.

130. Which command will change a Red Hat system to GUI login mode?
A. startx
B. runlevel 5
C. init 3
D. telinit 5

Answer: D
Description: The command telinit 5 command changes the system to runlevel 5, which is the GUI mode in Red Hat. The startx command is used to start the X Window System from a command line, but not at boot. The init 3 command would change the system to multiuser text mode. Choice B is invalid.

131. To reboot the system right now with the shutdown command, you would enter the command ________________.
Answer: shutdown -r now.
Description: The -r option tells the system to reboot, and the now option causes the system to do it immediately.

132. The reboot and poweroff commands are actually symbolic links to ___________.
Answer: /sbin/halt.

133. Which line in inittab would you change to change the runlevel that the system boots up to?
A. defaultinit
B. defrunlevel
C. runlevel
D. initdefault

Answer: D
Description: The other entries are invalid.

134. When a user Telnets into the system, the ________ file is displayed to him or her before the login prompt.
Answer: /etc/issue.net.
Description: Local users will receive the /etc/issue file.

135. Which command would list the runlevel information about the inetd service?
A. chkconfig –list inet
B. ntsysv –list inet
C. /etc/rc.d/init.d/inet status
D. ls -l /etc/rc.d/init.d/inet

Answer: A
Description: The chkconfig tool is used from the command line while ntsysv provides a menu interface. The other commands do not provide runlevel information.

136. Which command would you use in a troubleshooting configuration if the old root volume is mounted under /mnt/root?
A. lilo -p /mnt/root
B. lilo -r /mnt/root/boot
C. lilo -r /mnt/root
D. lilo -p /mnt/root/boot

Answer: C
Description: The -r parameter changes the perceived root path. It should point to the root volume.

137. To boot the system without running any startup scripts, you would use the boot parameter of ______________.
Answer: emergency
Description: The S parameter still runs the system initialization script.

138. To create a boot disk on the second floppy drive without prompting the user, you would use which command?
A. mkbootdsk –device /dev/fd1 –noprompt
B. mkboot –device /dev/fd1 –noprompt
C. mkbootdsk –device /dev/fd0
D. mkboot –device /dev/fd0

Answer: A
Description: The –device parameter specifies the floppy drive, which starts with number 0. The mkboot tool does not accept these parameters.

139. The lilo.conf entry _________ is used to enable booting from disks with more than 1024 cylinders.
A. lba
B. lba32
C. bigdisk
D. linear

Answer: B
Description: The linear option is required for some SCSI disks. The other options are invalid.

140. When you reboot the system it first changes to runlevel _.
Answer: 6
Description: Runlevel 0 halts the system, and runlevel 1 is used for single-user mode.

141. Which process always has the PID of 1?
A. init
B. kernel
C. sync
D. The first driver loaded

Answer: A
Description: The init process is the only process that has a runlevel of 1.

142. Which entry in inittab tells init to wait for the requested process to finish before continuing?
A. hold
B. pause
C. once
D. wait

Answer: D
Description: The once parameter tells init to start the process once and not to restart it again. The other options are invalid.

143. Which type of startup uses a few large script files?
A. UNIX
B. BSD
C. Sys V
D. Red Hat

Answer: B
Description: The BSD style of initialization uses a few large script files, while Sys V uses many smaller ones in a directory hierarchy.

144. To see information on the inetd process, you would enter the ___________ command (no path).
Answer: inet status.
Description: The inet startup script in /etc/init.d or /etc/rc.d/init.d can be queried for the process status.

145. What does LILO display when it cannot load the second stage of the boot loader?
A. LI
B. LIL
C. SECOND STAGE NOT FOUND!
D. LIL-

Answer: A
Description: The LIL error is caused by a media failure or geometry mismatch. The LIL- is caused by a corrupt descriptor table.

146. Which tool may cause the system to lock up and stop responding?
A. SuperProbe
B. xvidtune
C. XF86Setup
D. startx

Answer: A
Description: When SuperProbe examines the video hardware, it may cause the system to stop responding. The startx command is used to start the X Window System. The other tools should not cause any stability problems.

147. Which piece of software is different for different video chipsets?
A. Window manager
B. Desktop environment
C. xinitrc
D. X server

Answer: D
Description: The X server installed varies between video chipsets. Window managers and desktop environments do not depend on a certain video chipset.

148. What needs to be done to change the X server from SVGA to S3?
A. switchX S3
B. ln -sf /etc/X11/X /usr/X11R6/bin/XFree_S3
C. ln -sf /usr/X11R6/bin/XFree_S3 /etc/X11/X
D. Edit the XF86Config file and change the Server directive.

Answer: C
Description: The X server file is linked to /etc/X11/X. Answer –s A and D are invalid.

149. Which section in the XF86Config file configures the mouse?
A. Mouse
B. Input
C. User
D. Pointer

Answer: D
Description: The Pointer section contains the mouse configuration settings.

150. Which of the following XF86Config configuration tools is easiest to use?
A. vi
B. XF86Setup
C. xf86config
D. SuperProbe

Answer: B
Description: XF86Setup provides an easy to navigate graphical interface for creating the XF86Config file. SuperProbe is not a configuration tool. xf86config is much harder to use with its hard-to-navigate interface.

151. Which directive in the XF86Config file disables the Ctrl-Alt-Backspace key combination?
A. NoZap
B. DontZap
C. NoExit
D. DontExit

Answer: B
Description: The other commands do not exist.

152. Which of the following XF86Config directives is required?
A. VendorName
B. ModelName
C. Identifier
D. Gamma

Answer: C
Description: Identifier is referenced from the Screen section and is required. The other Answers are optional.

153. Which tool is used to detect most video hardware?
A. SuperProbe
B. xvidtune
C. XF86Setup
D. xf86config

Answer: A
Description: SuperProbe will look for the video chipset type installed in the system. The other tools do not detect video hardware.

154. You would enter the _________________ command if you added fonts to the /sr/X11R6/lib/X11/fonts/myfonts directory.
Answer: .mkfontdir /usr/X11R6/lib/X11/fonts/myfonts.
Description: The mkfontdir command must be run whenever new fonts are added to the system.

155. If a user wants an application to load when they run startx, they should put it in their _________ file.
Answer: .xinitrc.
Description: This file is executed by xinit.

156. Which file must be changed to allow remote logins with XDM?
A. Xresources
B. Xsession
C. xdm-config
D. xdmrc

Answer: C
Description: The xdm-config file must be changed to tell XDM to listen for queries.

157. Which file would you change to alter the text shown at the XDM login screen?
A. Xsession
B. Xresources
C. xdm-config
D. xdmrc

Answer: B
Description: The XDM service uses an Xresources file to customize the login display.

158. Which parameter would you use to send the display output of an application to the second screen on the first display of the host named norbert?
A. -display norbert:1.2
B. -display norbert:2.1
C. -display norbert:0.1
D. -display norbert:1.0

Answer: C
Description: Remember that the display and screen numbers start at 0, and the order is display first, then screen.

159. Which terminal emulator was designed to work with the Enlightenment window manager?
A. rxvt
B. aterm
C. xterm
D. Eterm

Answer: D
Description: Eterm is the terminal emulator that goes with Enlightenment.

160. The __________ file stores a user’s personal changes to X applications written with the X Toolkit.
Answer: .Xdefaults.
Description: This file holds Xresource entries that customize X apps for that user.

161. Which key combination returns the user to the X environment from a text console?
A. Ctrl-Alt-F7
B. Ctrl-Alt-Backspace
C. Ctrl-Alt-F6
D. Ctrl-Alt-+

Answer: A
Description: Ctrl-Alt-F1 through Ctrl-Alt-F6 take you to various text consoles, and Ctrl-Alt-F7 brings you back to the X environment.

162. To allow the host dag to connect to your X server, you would enter the command _____________.
Answer: xhost +dag.
Description: Host authentication is configured using the xhost command.

163. Which command would you use to quickly log into the system named norbert that is running XDM?
A. X -broadcast
B. X -indirect norbert
C. X -query norbert
D. startx -broadcast

Answer: C
Description: This command connects directly to the specified system, without going through the chooser.

164. Which entry in the Xaccess file would block the host norbert from using the chooser?
A. norbert NOCHOOSER *
B. !norbert CHOOSER brain
C. -norbert CHOOSER brain
D. * NOCHOOSER brain

Answer: B
Description: The ! at the beginning of the line is used to block hosts.

165. Which entry in the Xaccess file needs to be modified to enable remote login for XDM?
A. EnableRemote.Request 0
B. DisplayManager.Enable 0
C. DisplayManager.request 0
D. DisplayManager.requestport 0

Answer: D
Description: The other options are invalid. Without changing this option XDM will not allow connections.

166. Which of the following is not stored in the /etc/passwd file?
A. Home directory path
B. Shell assignment
C. User ID
D. Quotas

Answer: D
Description: Quota information is not stored in the /etc/passwd file.

167. When shadow passwords are enabled the password in the /etc/passwd file is displayed as ___________ .
Answer: x
Description: Once shadow passwords are enabled the password field in the /etc/passwd file contains an x character to signify that the password is contained in the /etc/shadow file.

168. Files located in which file are copied to users’ home directories?
A. /etc/group
B. /etc/passwd
C. /etc/skel
D. /etc/user

Answer: C
Description: Files stored in the /etc/skel directory are copied to users’ home directories.

169. Which option with the useradd command specifies that the home directory should be created if it doesn’t already exist?
A. -h
B. -m
C. -c
D. -d

Answer: B
Description: The useradd –m command specifies that the home directory is to be created with the user account.

170. Which option is used with userdel to remove a user’s home directory as the account is removed?
A. -d
B. -h
C. -r
D. -e

Answer: C
Description: The userdel –r command is used to remove a user’s home directory with the user account.

171. Which option with usermod is used to change a user’s default shell?
A. -d
B. -s
C. -b
D. -q

Answer: B
Description: The usermod –s command is used to change a user’s default shell.

172. Global environment settings are configured in the __________ file.
Answer: /etc/profile.
Description: Global environment settings are stored in the /etc/profile file.

173. The default umask used on the system is configured in which file?
A. /etc/bash
B. /etc/profile
C. /etc/passwd
D. /etc/files

Answer: B
Description: The default umask used on the system is configured in the /etc/profile file.

174. Which type of access is granted to all users for the /etc/passwd file?
A. Read
B. Execute
C. No access
D. Write

Answer: A
Description: All users are granted read access to the /etc/passwd file.

175. Which type of access is granted to other users for the /etc/shadow file?
A. Read
B. Execute
C. No access
D. Write

Answer: C
Description: All users are granted no access to the /etc/shadow file.

176. Which command allows users to view their group memberships?
A. groupadd
B. newgroup
C. groups
D. newgrp

Answer: C
Description: Users can view their group memberships using the groups command.

177. The ________ account has full control of the system.
Answer: root
Description: The root account has full control of the system.

178. Which of the following will restart the crond daemon running as process id 446?
A. kill -9 446
B. kill -SIGHUP 446
C. kill -1 446
D. kill -SIGTERM 446
E. Answer’s A and D
F. Answer’s B and C
G. None of the above

Answer: F
Description: The kill command can use signal names and numbers to stop, start, and restart processes.

179. Choose all of the correct facility names used in /etc/syslog.conf.
A. auth
B. access
C. authpriv
D. kern
E. panic
F. notice

Answer: A,C and D
Description: auth, authpriv, and kern are all facility names used in /etc/syslog.conf.

180. Where are system startup scripts stored on a Red Hat–based system?
A. /etc
B. /etc/rc.d/rc3.d
C. /etc/init.d
D. /etc/rc.d/init.d

Answer: D
Description: On Red Hat–based systems, system scripts are stored in /etc/rc.d/init.d.

181. Which parameter allows syslog to receive network messages?
A. -n
B. -r
C. -m
D. -s

Answer: B
Description: The syslog -r command is used to allow syslog to receive network messages.

182. Where are user crontab files stored?
A. /etc/crontab
B. /var/spool
C. /var/spool/cron
D. ~/.cron

Answer: C
Description: User crontab files are stored in /var/spool/cron.

183. Which command(s) will decompress the file named file.gz?
A. uncompress file.gz
B. gunzip file.gz
C. tar zxvf file.gz
D. gzip -d file.gz

Answer: B and D
Description: Files can be decompressed using the commands gunzip and gzip -d.

184. The proper way to tar files without compressing is:
A. tar -cvf backup.tar /home/Jason
B. tar -cvzf backup.tar /home/Jason
C. tar -zvf backup.gz /home/Jason

Answer: A
Description: The command tar -cvf backup.tar /home/Jason will create a new file named backup.tar and list the files during creation. The -z option compresses the files.

185. To limit the amount of space core dumps may occupy use:
A. climit
B. ulimit
C. quota
D. ~/.ulimit

Answer: B
Description: The size of .core files can be limited using ulimit.

186. The location of system logs can be specified in the file /var/log/syslog.conf file.
A. True
B. False

Answer: B
Description: The location of system log files can be specified in the /etc/syslog.conf file.

187. _____________ is used to automatically run a job when system load is low.
Answer: batch
Description: The batch utility allows jobs to automatically be run when system load is low.

188. Which type of backup is used to back up only the files that have changed since the last full backup?
A. Full
B. Partial
C. Incremental
D. Differential

Answer: D
Description: Differential backups are used to back up files that have changed since the last full backup.

189. Which mode of cpio is used to copy files from an archive file?
A. Copy-out
B. Copy-in
C. Copy-pass

Answer: B
Description: The cpio utility will copy files from an archive when used in the copy-out mode.

190. The tar utility is capable of using the gzip utility to compress files during archival.
A. True
B. False

Answer: A
Description: The tar utility can use the gzip utility to automatically compress and uncompress files during file creation.

191. The default location of the system log containing login times for users is:
A. /var/log/utmp
B. /var/log/users
C. /var/log/lastlog
D. var/log/login

Answer: C
Description: The log file containing login times for users is stored in /var/log/lastlog by default.

192. The ___________ command is used to rotate system logs.
Answer: logrotate.
Description: The logrotate command is used to rotate system logs.

193. The gunzip utility is capable of uncompressing files that were compressed with both the gzip and compress utilities.
A. True
B. False

Answer: A
Description: The gunzip utility can compress files created with gzip and compress.

194. Which option on the cron command is used to display entries in the current crontab?
A. -e
B. -r
C. -l
D. -s

Answer: C
Description: The cron -l command is used to display the current contents of crontab.

195. In the /etc/syslog.conf file, which character is used to increase the speed of system logging?
A. *
B. =
C. !
D. –

Answer: D
Description: The – character increases the speed of system logging by not synching the log after each write.

196. Which file is used to specify message levels that are displayed using the dmesg command?
A. dmesg.conf
B. kernel.h
C. kernel.conf
D. dmesg.h

Answer: B
Description: The kernel.h file is used to specify the message levels that are displayed using dmesg.

197. Core files are viewed using which of the following?
A. coreview
B. debug
C. gbd
D. dumpview

Answer: C
Description: Core dump files can be viewed using the GNU Debugger or gdb.

198. Which command would be used to view the queue for all printers?
A. lpd status all
B. lpq status all
C. lpc status all
D. lprm status all

Answer: B
Description: The lpq command is used to view the contents of the print queue.

199. Which of the following spools print jobs to the print device?
A. lpq
B. lpc
C. lpd
D. lpr

Answer: C
Description: The lpd daemon receives jobs from the user and spools them to the print device.

200. Which command would be used to print the file mydoc.txt to the printer named hplj?
A. lpr mydoc.txt
B. print -Phplj mydoc.txt
C. cat mydoc.txt | lpr hplj
D. lpr -Phplj mydoc.txt

Answer: D
Description: The lpr command is used to manually print files, and the -P option specifies the destination printer.

201. To place all new print jobs on hold you would use the _____________ command.
Answer: lpc hold all.
Description: The hold all option for lpc prevents new jobs from being spooled.

202. Which command should be used to restart the lpd daemon?
A. /etc/rc.d/init.d/lpd restart
B. /usr/sbin/lpd restart
C. /etc/init.d/lpd stop | start
D. kill -1 lpd

Answer: A
Description: You should use the startup script, if available.

203. Which of the following is used to define a filter in the /etc/printcap file?
A. of
B. filter
C. fi
D. if

Answer: D
Description: Remember that if means input filter.

204. Which sequence should be put at the end of a line in the /etc/printcap file, assuming this is not the last line in the printer block?
A. \:
B. :\
C. ;
D. ;\

Answer: B
Description: The last line in a printer block ends in a semicolon.

205. Which command is used to move a print job to the top of the queue?
A. lpc
B. lprm
C. lpq
D. lpr

Answer: C
Description: Use lpq to move a print job to the top of the queue.

206. Which definition in /etc/printcap disables print banners?
A. :sh:
B. :nb:
C. :nh:
D. :hs:

Answer: A
Description: The :sh: definition disables banners.

207. Which definition in /etc/printcap sets the maximum print job size?
A. :ms:
B. :js:
C. :xm:
D. :mx#:

Answer: D
Description: This sets the maximum job size in 1KB blocks.

208. To remove job 243 from the print queue, you would type ___________.
Answer: lprm 243.
Description: The lprm command removes print jobs.

209. What needs to be done after editing the /etc/printcap file?
A. kill -1
B. /etc/rc.d/init.d/lpd restart
C. /etc/init.d/lpd reload
D. nothing

Answer: B
Description: The lpd daemon should be restarted after any configuration changes.

210. Which of the following is not a valid lpc command?
A. refresh
B. up
C. down
D. enable

Answer: A
Description: Up, down, and disable are valid commands, but refresh is not.

211. Which lpc command is used to print a job that is currently on hold?
A. release
B. enable
C. restart
D. nohold

Answer: A
Description: The release command releases a job that’s on hold.

212. Which must be created when manually adding a printer?
A. lock file
B. spool directory
C. queue file
D. job file

Answer: B
Description: The spool directory must be manually created, and the permissions and ownership must be set.

213. Which command will stop print jobs in the queue from printing?
A. lpq stop all
B. lpq hold all
C. lpc stop all
D. lpc hold all

Answer: C
Description: The stop all directive must be used with lpc.

214. When doing a lpc status all, you see the following output. What do you enter to restart printing?
Printer Printing Spooling Jobs Server Subserver
Redirect Status/(Debug)
lp@debian disabled enabled 0 none none
A. lpq start all
B. lpc start all
C. lpd reload
D. lpc enable all

Answer: B
Description: This is the opposite of doing lpc stop and will enable a stopped printing device.

215. Which command would be used to check the printer connection, without going through the printing system?
A. lpr textfile.txt
B. echo textgfile.txt > /dev/lpt0
C. print textfile.txt
D. cat textfile.txt > /dev/lpt0

Answer: D
Description: This sends a file directly to the interface port.

216. Which daemon spools print jobs to remote print servers?
A. lpq
B. lpd
C. lpr
D. lps

Answer: B
Description: The lpd daemon is used to send remote print jobs.

217. Which print filter provides a text-mode menu interface?
A. Magicfilter
B. PrintTool
C. Apsfilter
D. LPR Filter

Answer: A
Description: PrintTool provides an X GUI interface, and Magicfilter has no interface.

218. Which command should be run when the module’s configuration file is edited?
A. depmod -a
B. modprobe -d
C. moddep -a
D. echo 1 > /proc/modules

Answer: A
Description: Whenever the modules.conf file is modified, you should update the module dependencies by running depmod.

219. A ____________ kernel has everything compiled into the main kernel file.
Answer: monolithic.
Description: Monolithic kernels have all drivers compiled into the kernel instead of using modules.

220. Which kernel is released under the stable branch?
A. 2.3.14
B. 3.3.14
C. 3.2.14
D. 4.3.13

Answer: C
Description: The minor version number specifies if the kernel is stable or development.

221. The command modinfo -d sound-driver would display what?
A. Module size
B. Module description
C. If the module is loaded
D. If the module is set as autoclean

Answer: B
Description: Modinfo is used to display module information. The -d parameter shows the description.

222. Which directive in the module’s configuration file will give the module a new name?
A. alias newname oldname
B. oldname alias newname
C. oldname option=alias newname
D. alias oldname newname

Answer: D
Description: The alias directive specifies a second name for a module.

223. How many patches would be required to update from kernel 2.1.13 to 2.1.21?
A. 8
B. 7
C. 2
D. 1

Answer: A
Description: Patches 2.2.14, 2.2.15, 2.2.16, 2.2.17, 2.2.18, 2.2.19, 2.2.20, and 2.2.21 would be required.

224. Which command is used to check the integrity of the kernel source package?
A. PGP
B. MD5
C. DES
D. GPG

Answer: D
Description: The kernel sources are signed with GnuPG. This way you can be sure they have not been tampered with.

225. To configure the kernel using the most basic interface, you would type ___________.
Answer: make config.
Description: This interface provides a simple text mode mechanism for configuring the kernel.

226. The kernel configuration is stored in a file named what?
A. .config
B. config
C. .kconfig
D. kconfig

Answer: A
Description: The saved kernel configuration is stored in the .config file.

227. The _________ file must be edited if a second kernel is installed on a system.
Answer: /etc/lilo.conf.
Description: If this file is not edited, the system will not know about the new kernel. Do not forget to run lilo to install the new boot sector.

228. Which command should be run to create a new boot sector when a new kernel is installed?
A. mkinitrd
B. make install
C. lilo
D. kerneld

Answer: C
Description: Running lilo installs a new boot sector after the lilo.conf file is modified. The mkinitrd command creates an initial ramdisk, if needed. The make install command is used to install compiled software, and Answer D is invalid.

229. Which module directory holds the sound drivers?
A. sound
B. dsp
C. misc
D. media

Answer: C
Description: The other choices are invalid.

230. Which command(s) will remove all autoclean-able modules?
A. rmmod -r
B. rmmod -a
C. modprobe -r
D. modprobe -a

Answer: A and C
Description: The rmmod -a command removes all unused modules and the modprobe -a command loads all matching modules.

231. Which command is used to apply kernel patches?
A. update
B. patch
C. upgrade
D. mkinitrd

Answer: B
Description: Answer –s A and C are invalid. The mkinitrd command is used to create an initial ramdisk image.

232. Which library must be installed to use make menuconfig?
A. TCL/TK
B. GTK
C. PLIB
D. ncurses

Answer: D
Description: TCL/TK is required to run make xconfig.

233. Which library must be installed to use make xconfig?
A. TCL/TK
B. GTK
C. PLIB
D. ncurses

Answer: A
Description: The ncurses library is required for make menuconfig.

234. Which command creates a source code dependency list when compiling a new kernel?
A. depmod
B. make depmod
C. make depend
D. make dep

Answer: D
Description: The depmod command is used to check module dependencies, after they are compiled.

235. The ________ command lists all currently loaded modules.
Answer: lsmod.

236. Which menuconfig/xconfig menu has the disk configuration options?
A. Block devices
B. File systems
C. SCSI devices
D. General setup

Answer: A
Description: Because disks are considered block devices, they are configured under this item.

237. Which file holds the module dependency list (no path)?
Answer: modules.dep.
Description: The depmod command creates this module dependency list file.

238. Which script is executed when a nonlogin bash shell is started?
A. .bashrc
B. .bash_nologin
C. /etc/profile
D. .cshrc

Answer: A
Description: Answer – B is invalid. The /etc/profile is read whenever a user logs in, and they do not have a custom profile file. The .cshrc is not used by the bash shell.

239. To get input from a user and place it into a variable named NAME, you would use the ____________ command.
Answer: read $NAME.
Description: The read command takes input from a user and places it in to variables. The .cshrc is not used by the bash shell.

240. Which command inserts text into vi at the current cursor location?
A. a
B. f
C. T
D. i

Answer: D
Description: The a command appends text, and can also insert text to the right of the cursor. The other Answers are invalid.

241. Which option corrects some spelling mistakes when changing directories?
A. cdspell
B. cdvar
C. cdspchk
D. spellcd

Answer: A
Description: The cdspell shell option can fix some spelling mistakes when changing directories. The other Answer –s are invalid.

242. To make the shell script named sortdoc executable by only the user, you would type ___________________.
Answer: chmod u+x sortdoc.
Description: You must set the script as executable before a user can run it.

243. Enter the command that is used to delete five lines of text in vi: _______________
Answer: 5dd.

244. If NUMBER is set to 4, what will be the result of the following? echo “‘$NUMBER’”
A. $NUMBER
B. ‘$NUMBER’
C. 4
D. ‘4’

Answer: D
Description: The double quotes around the variable cause it to be translated to its value. The forward ticks are displayed literally. Remember that back ticks (`) are used for command substitution.

245. Which variable tells you the history number of the current command?
A. HISTORY
B. HISTCMD
C. HISTNUM
D. HISTCTRL

Answer: B
Description: The HISTCMD variable holds the command number for the current command. All of the other Answer –s are invalid.

246. To put the date in the prompt, which string would you add?
A. \D
B. /d
C. /D
D. \d

Answer: D
Description: The other Answers are invalid.

247. Given the following commands, which directory will the user be taken to, assuming that there is a Jason directory off each one?
debian:~# CDPATH=/documents:/shared:/music
debian:~# cd Jason
A. /documents/Jason
B. /shared/Jason
C. /music/Jason
D. ~/Jason

Answer: A
Description: The cd command will go through each directory in the CDPATH variable, and change to the first correct one found.

248. If you want to clean up a directory every time you log out, you would edit the ________ file.
Answer: .bash_logout.
Description: This file is executed each time a user logs out.

249. Which set option will keep you from accidentally overwriting an existing file with file redirection?
A. nowrite
B. noclobber
C. noklobber
D. nonuke

Answer: B
Description: By enabling this option, you can prevent accidentally overwriting a file when redirecting text.

250. Which parameter is used to enable an option with set?
A. +s
B. -s
C. +o
D. -o

Answer: D
Description: Remember that -o enables an option, while +o disables the option.

251. The first line of a script file for the /bin/bash shell should be ____________.
Answer: #!/bin/bash.
Description: This line specifies the command interpreter to use for the script.

252. Which test parameter returns true if a string is 0 bytes long?
A. -z
B. -n
C. -s
D. -0

Answer: A
Description: The -n test checks to see if a string is non-zero in length. The -s parameter tests to see a file exists and has a size greater than 0. There is no -0 test.

253. Which scripting clause matches a string to a pattern?
A. case
B. if/else
C. for loop
D. while loop

Answer: A
Description: The case clause matches patterns, while the other clauses test expressions for true or false.

254. Which command moves five lines of text into a vi buffer named a?
A. a5dd
B. A5dd
C. “a5dd
D. “add5

Answer: C
Description: The command must start with a ” symbol, and the buffer name is case sensitive.

255. Which metacharacter matches any single character?
A. .
B. *
C. ?
D. ,

Answer: A
Description: The period matches any single character. The * will match multiple characters. The other Answers are invalid.

256. To find the next instance of the character B after the cursor in vi, you would enter _________________.
Answer: fB.

257. Which variable sets the mail check time to be every 10 minutes?
A. MAIL=10
B. MAIL=600
C. MAILCHECK=10
D. MAILCHECK=600

Answer: D
Description: The MAILCHECK variable defines how often to check for new mail in seconds. The MAIL variable stores the filename to check for new mail.

258. Which of the following is an example of a class C network address?
A. 10.254.90.135
B. 172.16.98.42
C. 255.255.255.255
D. 192.168.90.131

Answer: D
Description: The address 192.168.90.131 is a class C address between the ranges of 192.0.0.0 and 223.0.0.0.

259. The _____________ is used to separate the network ID from the host ID in a TCP/IP address.
Answer: subnet mask.
Description: The subnet mask is anded with the IP address to provide the network ID and the host ID.

260. How many available network IDs are provided by 12 binary bits?
A. 254
B. 4,094
C. 4,096
D. 65,534

Answer: B
Description: There are 4,094 available network IDs provided by 12 bits. The formula for calculation is 212 – 2.

261. Which protocol provides connection-oriented delivery of packets using sessions?
A. IP
B. ARP
C. TCP
D. UDP

Answer: C
Description: The TCP protocol is connection-oriented, using sessions to provide reliable transfer of packets.

262. By default, SMTP operates on which port?
A. 21
B. 23
C. 25
D. 119

Answer: C
Description: By default, SMTP operates on port 25.

263. The ___________ protocol provides IP address–to–hardware address translation.
Answer: ARP
Description: ARP provides hardware address–to–IP address mapping and translation.

264. Which command is used to upload a file from the local machine to a remote FTP server?
A. put
B. cp
C. mv
D. place

Answer: A
Description: The put command is used to upload files to an FTP server.

265. Which utility allows you to view the domain name of the specified IP address?
A. hostname
B. domainname
C. dnsdomainname
D. host

Answer: D
Description: The host utility allows you to view the host and domain name when an IP address is entered.

266. The _____________ utility provides information about the path of data between a local and remote host.
Answer: traceroute
Description: The traceroute utility displays every hop between the local and remote hosts.

267. Which utility provides contact and name server information about the specified domain?
A. finger
B. host
C. nameserver
D. whois

Answer: D
Description: The whois utility provides information about the registration, name servers, and contacts for the specified domain.

268. A Linux machine can provide DHCP configuration information to other hosts when running which application?
A. dhcpd
B. dhcpcd
C. bootproto
D. dhcp

Answer: A
Description: The dhcpd daemon allows a Linux server to provide DHCP information to clients.

269. Which utility is used to change the IP address of a network interface?
A. ipconfig
B. ifconfig
C. hostname
D. netstat

Answer: B
Description: The ifconfig utility is used to change the IP address of a network interface. The ipconfig utility is used by Windows-based systems.

270. Which two utilities can be used to view the routing table?
A. netstat
B. traceroute
C. route
D. ifconfig

Answer: A and C
Description: The routing table can be viewed using the route command and using netstat -r.

271. On a Debian system, which file contains the hostname of the local machine?
A. /etc/hosts
B. /etc/HOSTS
C. /etc/hostname
D. /etc/HOSTNAME

Answer: D
Description: Debian systems use the /etc/HOSTNAME file to store the hostname of the local machine. The /etc/hostname file is used by Red Hat.

272. Which file contains the name servers to be used by the local machine for hostname resolution?
A. /etc/hosts
B. /etc/resolv.conf
C. /etc/services/
D. /etc/network/interfaces

Answer: B
Description: The /etc/resolv.conf file contains the domain search listing and the name servers to use for hostname resolution.

273. Which of the following is a correct entry in the /etc/hosts file?
A. deedee 10.254.90.135/ip
B. nameserver 10.254.90.131
C. search the-nashes.net
D. 10.254.90.135 deedee.the-nashes.net

Answer: D
Description: Entries in the /etc/hosts file contain an IP address followed by the corresponding hostname.

274. Chat scripts are used to perform which of the following functions?
A. Specify connection device
B. Configure a PPP connection
C. Establish a PPP connection
D. Specify idle timeout of a PPP connection

Answer: C
Description: Chat scripts are used to establish a PPP connection; pppd is used to configure the connection.

275. The pppd application must receive its IP address via DHCP.
A. True
B. False

Answer: B
Description: pppd can utilize either static or dynamic IP addresses.

276. Which of the following is NOT a valid option of the pppd command?
A. reconnect
B. connect
C. disconnect
D. holdoff

Answer: A
Description: reconnect is not a valid option of pppd.

277. Which of the following utilities is used to stop a network interface?
A. ifconfig
B. netstat
C. down
D. stop

Answer: A
Description: The ifconfig utility is used to stop a network interface.

278. Which socket type is used in inetd.conf when the service uses TCP?
A. dgram
B. stream
C. raw
D. rdm

Answer: B
Description: The stream type is always used with TCP, and dgram is used with UDP.

279. The inetd.conf file is read every 30 seconds by inetd to look for configuration changes.
A. True
B. False

Answer: B
Description: Any time the inetd.conf file is changed, inetd needs to be restarted for the changes to take effect.

280. The account used for anonymous FTP should have which shell?
A. /bin/bash
B. /bin/csh
C. /bin/false
D. /bin/ksh

Answer: C
Description: Anonymous FTP accounts should not have a valid shell statement in /etc/passwd. This limits login to FTP only.

281. Which entry in ftpaccess limits the number of failed password attempts?
A. loginfails
B. loginlimit
C. badpw
D. pwattempts

Answer: A
Description: If a user exceeds the limit set by loginfails, they are disconnected.

282. Which tool is used to see who is logged in to your FTP server?
A. ftpstats
B. whoftp
C. ftpd -w
D. ftpwho

Answer: D
Description: The ftpwho command shows who is connected to the FTP server.

283. What needs to be done to create a new mail alias for a user? (Choose all that apply.)
A. Add the alias to /etc/aliases.
B. Add the alias to /etc/mailboxes.
C. Run the newaliases command.
D. Run the addalias command.

Answer: A and C
Description: Mail aliases are stored in /etc/aliases. Any time an entry is added the newaliases command needs to be run.

284. The _______ command is used to list messages currently in the mail queue.
Answer: mailq.
Description: The mailq command shows any messages waiting in the queue as well as any errors that may keep them from being delivered.

285. To make your Web server perform the best, it should be run via inetd.
A. True
B. False

Answer: B
Description: Only run Apache through inetd for a Web server that expects very few hits. The overhead of starting the Apache daemon every time a client connects severely impacts performance.

286. What needs to be done to run httpd through inetd? (Choose all that apply.)
A. Change the port number specified in httpd.conf.
B. Change the ServerType directive in httpd.conf.
C. Add an entry to inetd.conf for httpd.
D. Run inetd -d /usr/sbin/httpd.

Answer: B and C
Description: An entry needs to be added to the inetd.conf file so that inetd knows to start the service when a user connects. The ServerType entry needs to be set correctly in httpd.conf so that Apache knows not to keep running when a connection completes.

287. By default Apache uses the /etc/passwd file for user authentication.
A. True
B. False

Answer: B
Description: Apache uses a file created by htpasswd.

288. Which entry or entries in /etc/exports will share the /home directory only to users on the 192.168.10.0/24 network, which is made up of the domain mydomain.org?
A. /home 192.168.10.0 – 254(rw)
B. /home 192.168.10.0/24(ro)
C. /home *.mydomain.org(rw)
D. /home ANY.mydomain.org(rw)

Answer: B and C
Description: Restrictions can be set using CIDR notation or using wildcards with domains.

289. After editing the /etc/exports file, the _______ command should be run (no parameters).
Answer: exportfs.
Description: The exportfs command is used to display and change the currently exported directories.

290. Which smb.conf entry sets the Windows NT domain for Samba?
A. workgroup
B. domain
C. nt_domain
D. MS_DOMAIN

Answer: A
Description: The workgroup entry sets both the workgroup name and the Windows NT domain name.

291. Which command(s) shows all the files on a Windows share using smbclient?
A. dir
B. list
C. cp
D. ls

Answer: A and D
Description: Both dir and ls can be used to list files. The other Answers are invalid.

292. BIND v4 uses the _____ configuration file.
A. named.boot
B. named.conf
C. named.cf
D. conf.named

Answer: A
Description: BIND v4 uses named.boot while BIND v8 uses named.conf.

293. Which DNS resource record is used to reverse map IP addresses to names?
A. A
B. MX
C. SRV
D. PTR

Answer: D
Description: The PTR record is used for reverse queries.

294. Which DNS resource record shows the hosts that provide services?
A. SRV
B. LOC
C. A
D. CNAME

Answer: A
Description: The SRV record shows which hosts provide certain services. The LOC record shows the physical location of a host.

295. Which field should be put at the front of the hosts entry in the nsswitch.conf file to have the system check /etc/hosts first?
A. files
B. NIS
C. dns
D. yp

Answer: A
Description: The files entry tells the system to check /etc/hosts first. The dns entry specifies when to check with a DNS server.

296. Which mail server has the highest priority?
A. IN MX 10 mail
B. IN MX 20 mail
C. IN MX 100 mail
D. IN MX 0 mail

Answer: D
Description: The lower the number set in the MX record, the higher the priority for the mail server.

297. Which file is displayed to users before they log in to a system via Telnet?
A. /etc/issue
B. /etc/login.net
C. /etc/motd.net
D. /etc/issue.net

Answer: D
Description: The /etc/issue.net file is shown to local users before they log in.

298. Which would allow users from somedomain.org to access your FTP server?
A. hosts.allow: in.ftpd : ANY
B. hosts.deny: ftpd : ALL EXCEPT somedomain.org
C. hosts.allow: in.ftpd : somedomain.org
D. hosts.deny: in.ftpd : ALL

Answer: C
Description: Option A is incorrect because to allow all hosts you must use the ALL wildcard, not ANY. Choice B specifies the wrong daemon name. Choice D denies all hosts from connecting to the FTP server.

299. Which service cannot be used with TCP wrappers?
A. SSH
B. Telnet
C. tftp
D. HTTP

Answer: C
Description: tftp uses UDP, and TCP wrappers can be used only with TCP applications.

300. Which tool is used to check the logic of your TCP wrapper rules?
A. tcpdmatch
B. tcpwmatch
C. tcpdtest
D. tcpwquery

Answer: A
Description: The other options are invalid.

301. Which tool can be used to see if a package has been tampered with?
A. verify
B. md5
C. integ
D. md5sum

Answer: D
Description: The other commands are invalid.

302. Which commands would you run to create a shared directory named Share?
A. mkdir Share
B. chmod 770 Share
C. chmod u+s Share
D. chmod g+s Share

Answer: A, B and D
Description: You must create the directory, set the proper permissions, and set the SGID bit.

303. Which entry in .rhosts allows user Angie from the host named deedee?
A. deedee +Angie
B. Angie deedee
C. +Angie deedee
D. deedee Angie

Answer: D
Description: The format is HOST USER. An optional + sign can be used to enable a host.

304. Which of the following creates a large security risk in hosts.equiv?
A. +
B. !
C. ALL
D. ANY

Answer: A
Description: By just putting the + sign, you allow any host to connect.

305. Which command copies the file /doc/MyDoc from the system webserver to a local file named MyNewDoc?
A. rcp MyNewDoc webserver:/doc/MyDoc
B. rpc webserver:/doc/MyDoc MyNewDoc
C. rcp webserver:/doc/MyDoc MyNewDoc
D. rpc webserver:/doc/MyDoc MyNewDoc

Answer: C
Description: The syntax for Choice A is incorrect. The other options are invalid.

306. Which port is used by SSH?
A. 22
B. 23
C. 19
D. 53

Answer: A
Description: Telnet uses port 23, and DNS uses port 53.

307. Which entry in sshd_config restricts root from a remote system?
A. LoginRootPermit
B. PermitRootLogin
C. NoRootLogin
D. DenyRootLogin

Answer: B
Description: Unless this option is enabled, the root user will never be allowed to log in. The other options are invalid.

308. Which entry in sshd_config allows the use of .rhosts?
A. AllowRhosts
B. RhostsAllow
C. RSAAuthentication
D. RhostsAuthentication

Answer: D
Description: This option can be used to support older style rhosts files that may already be on the system.

309. Which option causes ssh to use a different user name?
A. -l
B. -L
C. -u
D. -U

Answer: A
Description: The -L option is used to specify a listening port.

310. Which command lists all keys being represented by ssh-agent?
A. ssh-agent -l
B. ssh-add -l
C. ssh-agent -L
D. ssh-add -L

Answer: B
Description: The -L option lists all public keys.

311. Which tool converts the group file to use shadow passwords?
A. grpconv
B. groupconv
C. groupcv
D. grpconvert

Answer: A
Description: The other options are invalid.

312. Which command clears the Input chain of rules?
A. ipchains -C input
B. ipchains -F input
C. ipchains -F ALL
D. ipchains -P input

Answer: B
Description: The -C option is used to check a packet against the selected chain. The ALL chain is invalid. The -P option is used to set the policy for the specified chain.

313. Which command shows all of the current rules?
A. ipchains -L
B. ipchains -l
C. ipchains -S
D. ipchains -s

Answer: A
Description: The -l option is used to enable kernel logging. The -S option is used to change the timeout for masquerading. The -s option specifies the source.

314. Which type of PAM module queries the user for a password?
A. password
B. session
C. account
D. auth

Answer: D
Description: The password module is used to change authentication tokens.

315. Which command limits the amount of CPU time a user can use to 60 minutes?
A. ulimit -C 3600
B. ulimit -t 3600
C. ulimit -C 1h
D. ulimit -t 1h

Answer: B
Description: The time must be specified in seconds. The -C option is invalid.

316. Which tool monitors for file changes?
A. Nessus
B. crack
C. Tripwire
D. nmap

Answer: C
Description: Tripwire performs several checks to make sure files have not been tampered with.

317. SSH provides security against bad passwords.
A. True
B. False

Answer: B
Description: SSH encrypts the connection between systems. It does not stop someone from guessing a badly chosen password.

318. Which of the following would cause cmd2 to be run independently of cmd1?
A. cmd1 ; cmd2
B. cmd1 | cmd2
C. cmd1 >> cmd2
D. cmd1 > cmd2

Answer: A
Description: Choice A would run cmd1 and then cmd2 regardless of the output of cmd1. Choice B would run cmd1 sending the output to cmd2. Choice C would append the output of cmd1 to the file cmd2. Choice D would send the output of cmd1 to the file cmd2.

319. _____________ is the default signal number used with the kill command.
Answer: 15
Description: The default signal used with the kill command is 15, sigterm.

320. The updatedb command is used to update the information searched by which command?
A. grep
B. find
C. locate
D. whois

Answer: C
Description: Choice A, the grep utility, searches files for the specified expression. Choice B, the find utility, searches directories for files. Choice C, the locate utility, searches the slocate database. This database is updated using the updatedb command. Choice D does not search for files.

320. Which command is used to change the priority of a command as it is run?
A. job
B. nice
C. renice
D. top

Answer: B
Description: Choice A, the job utility, is used to view backgrounded processes. Choice B, nice, is used to change the priority of a process as it is run. Choice C, renice, is used to change the priority of a process before it is run. Choice D, top, is used to view process information.

321. Which command would be used to produce the following permissions? -rw-rw-r– myfile
A. chown myfile
B. chmod 661 myfile
C. chmod 331 myfile
D. chmod 664 myfile

Answer: D
Description: Choice A would change the ownership of myfile if the userid of the new owner were specified. Choice B would change the permissions of my file to -rw-rw—x. Choice C would change the permissions on myfile to –wx-wx–x. Choice D would change the permissions on myfile to -rw-rw-r–.

322. Which file is used to specify a user’s home directory?
A. /etc/passwd
B. /etc/skel
C. /etc/profile
D. /etc/bashrc

Answer: A
Description: The /etc/passwd file contains the user’s home directory settings. Choice B, /etc/skel, contains files that are copied to all users’ home directories. Choice C, /etc/profile, contains systemwide environment settings. Choice D, /etc/bashr, contain global bash settings.

323. _____________ is used to view jobs scheduled to run at regular intervals.
Answer: crontab
Description: The crontab command is used to view jobs scheduled to run using crond.

324. Which command will search the file editorial for all occurrences of the word lady and replace them with Lady?
A. sed -a s/lady/Lady editorial
B. tr l,L editorial
C. sed ‘s/lady/Lady/’ editorial
D. grep ‘lady’ editorial | tr Lady

Answer: C
Description: Choice A does not follow the correct syntax for the sed command. Choice B would locate all instances of the letter l and replace them with L. Choice C would search for the word lady and replace it with Lady. Choice D would search for the word lady but would pipe it to the tr utility, not replace lady with Lady.

325. Which command allows you to view system resource usage in real time?
A. nice
B. renice
C. ps -aux
D. top

Answer: D
Description: Choice A, nice, is used to set the priority of a process when it is run. Choice B, renice, would change the priority of a process after it has been run. Choice C, ps -aux, would view a snapshot of all running processes. Choice D, top, displays a real-time view of processes.

326. Which file contains a list of currently mounted file systems?
A. /etc/proc/
B. /mnt
C. /etc/fstab
D. /etc/mtab

Answer: D
Description: Choice A, /etc/proc/, is not valid. Choice B, /mnt, is simply a directory. Choice C, /etc/fstab, contains a listing of file systems that can be mounted at boot. Choice D, /etc/mtab, contains a listing of all currently mounted file systems.

327. Which allows an environment variable declaration to be used system-wide?
A. echo
B. export
C. cat
D. env

Answer: B
Description: Choice A, echo, can be used to view the assignment of environment variables. Choice B, export, makes the environment variable assignment available system-wide. Choice C, cat, is used to view the contents of a file. Choice D, env, is used to view all environment variables declared on the system.

328. Which command would move the file and directory contents of the /ME directory to the /YOU directory?
A. mv -a /ME /YOU
B. cp /ME/* /YOU/* ; rm -r /ME/*
C. mv /ME/* /YOU/*
D. cp -r /ME/* /YOU ; rm -r /ME

Answer: D
Description: Choice A uses an incorrect option for the mv command. Choice B would copy all files from /ME to /YOU and delete /ME, but directories would not be copied. Choice C would produce a syntax error because the last argument when moving a directory must be a directory name. Choice D would recursively copy the files and directories in /ME to /YOU, after which they would be deleted from /ME.

329. What command would produce a file named xmaslist using the contents of the list file, arranging the contents alphabetically and numbering each line?
A. fmt list > xmaslist
B. sort list | nl > xmaslist
C. ln list | sort | xmaslist
D. sort list | ln | xmaslist

Answer: B
Description: Choice A would create the xmaslist file from the contents of the list file while trying to create each line of the same length. Choice B would alphabetize the list, then number it and send the output to the xmaslist file. Choices C and D would produce errors because the ln command and the pipes are used incorrectly.

330. Which of the following commands would kill the process 1234 without giving it a chance to gracefully exit?
A. kill %1234
B. kill -now 1234
C. kill -9 1234
D. kill -12 1234

Answer: C
Description: Only Choice C is correct. The -9 signal is used to kill a process without allowing it to end gracefully. The default signal, used with Answer – A, is -15, sigterm, the -now signal is not valid, and the -12 option is sigusr2.

331. Which of the following tools are used when creating a new partition for data storage on a Linux system?
A. fdisk
B. format
C. mkfs
D. mount

Answer: A, C and D
Description: When creating a new partition for use, the fdisk utility is used to create the partition, the mkfs utility is used to format the partition, and the mount utility is used to mount the file system for use.

332. The __________ utility provides a summary of disk space used in the pwd.
Answer: du
Description: The du utility is used to display directory space usage information.

333. Which command is used to edit user quotas?
A. quota
B. quotaon
C. edquota
D. vi

Answer: C
Description: The quota command is used to view user quotas. The quotaon command is used to enable quotas. The edquota command is used to edit disk quotas. The vi editor is started by the edquota command when editing quotas.

334. The umask of 002 would produce what default file permissions?
A. -rwxrwxrw-
B. -rw-rw-r–
C. ———x
D. -rwxrwxr-x

Answer: D
Description: The umask of 002 would be used to filter the write permission for other users.

335. What access rights are required for the /etc/shadow file?
A. -r——–
B. -rw-rw-r–
C. -r–r—–
D. -rwxr–r–

Answer: A
Description: The /etc/shadow file must be readable by only the root user.

336. Which command will immediately shut down a computer running Linux?
A. shutdown
B. telinit 6
C. shutdown now
D. telinit 0

Answer: D
Description: The shutdown command, when used alone, will switch to single-user mode. The telinit command can be used to change runlevels, with level 6 used for rebooting and level 0 used to halt or shut down the system.

337. A new user (Debbie) needs access to the companies Linux system, what must be done so that she can access the system with the userid debbie? (Select all that apply.)
A. useradd debbie
B. group debbie
C. shadow debbie
D. passwd debbie

Answer: A and D
Description: The useradd command is used to create new user accounts while the passwd command is used to set the user’s password.

338. Which command would give the owner and group of myfile the permissions of read and execute while all others have read access?
A. chmod 003 myfile
B. chmod 554 myfile
C. chmod 331 myfile
D. chmod 662 myfile

Answer: B
Description: The permissions of read and execute have a numeric value of 5 while the read permission has a value of 4.

339. Which command would be used to view a description of the tar utility including the options available for use?
A. more tar
B. grep tar
C. man tar
D. help tar

Answer: C
Description: The more utility is used to view a file one page at a time. The grep utility is used to search a file. The man utility is used to present manual pages that contain information about commands. The help utility displays information only for built-in commands.

340. _____________ is the location of files that are copied to each user’s home directory.
Answer: /etc/skel.
Description: Files that are to be copied to each user’s home directory should be placed in the /etc/skel directory.

341. The PS1 environment variable is used to define which of the following?
A. command path
B. home directory
C. shell prompt
D. signature file

Answer: C
Description: The shell prompt is configured with the PS1 environment variable. The PATH variable is used for the command path while the home directory is contained in the HOME variable.

342. Which of the following would change the user’s pwd to their home directory regardless of their current pwd? (Select all that apply.)
A. cd
B. cd ..
C. cd~
D. cd $HOME

Answer: A, C and D
Description: The cd command, when used alone, changes the user’s pwd to their home directory. The $HOME variable and the ~ also can be used to represent the user’s home directory. The cd .. command is used to move up one directory in the directory tree.

343. Which of the following directories is used to store system utilities used by the superuser?
A. /etc
B. /root
C. /sbin
D. /usr/local

Answer: C
Description: The /etc directory contains many of the configuration files for the system. The /root directory is the home directory for the root user. The /sbin directory contains utilities used by the superuser. The /usr/local directory is used to store software that isn’t part of the operating system.

344. Where are the user shells assigned?
A. /etc/skel
B. /etc/passwd
C. /etc/profile
D. LILO

Answer: B
Description: The /etc/passwd file is used to store shell script assignments along with home directory assignments. The /etc/skel directory contains the files to be copied to each user’s home directory. The /etc/profile file contains global user settings. The LILO boot loader is used to configure booting options.

345. You have recently installed a new disk drive in your Linux system. You wish to store a directory containing many data files used within your company on the new disk drive. Which of the following can be used so the change is invisible to users of the system?
A. cp
B. mv
C. hard links
D. soft links

Answer: D
Description: The cp and mv commands can be used to relocate the files. Hard links cannot span file systems. Using soft links, you can have the files appear to be stored on one file system while actually existing on another.

346. Which command and options are used to delete a user’s account and home directory?
A. userdel -r
B. usermod -f
C. passwd -e
D. usermod -e

Answer: A
Description: The userdel -r command is used to remove a user’s home directory as well as their account. The usermod command can be used to disable a user’s account. The passwd utility is used to change a user’s password.

347. The ____________ utility is used to display files in hexadecimal format.
Answer: od
Description: The od utility allows files to be viewed in octal and hexadecimal formats.

348. What command can be used to locate specific text within a file?
A. grep
B. locate
C. find
D. where

Answer: A
Description: The grep utility is used to search a file for the specified string. The locate command searches the slocate database for specified files. The find command searches directories for the specified files. The where command is invalid.

349. Which of the following can be used to suspend a process running in the foreground?
A. &
B. fg
C. bg
D. Ctrl+Z

Answer: D
Description: The & character is used to background a process when it is run. The fg
command is used to bring a process to the foreground. The bg command is used to background a suspended process. The Ctrl+Z sequence can be used to suspend a foreground process.

350. Where might you find instructions on installing and configuring a Winmodem on a Linux system?
A. man pages
B. HOWTOs
C. /usr/doc
D. dmesg

Answer: B
Description: Man pages can be used to discover more information on commands and utilities. The HOWTOs contain information on configuring specific software and hardware. The /usr/doc directory contains information on installed applications. The dmesg command is used to display system messages.

351. Which of the following would be used to run a script called mozilla_update as a background process?
A. bg mozilla_update
B. mozilla_update&
C. `mozilla_process`
D. mozilla_process -bg

Answer: B
Description: The & character is used when running a process to specify that it runs in the background.

352. Which environment variable would be used to specify the location of files that you wish to run without specifying an absolute path?
A. HOME
B. PS1
C. PATH
D. TERM

Answer: C
Description: The HOME variable stores the user’s home directory. The PS1 variable stores the command prompt settings. The PATH variable contains the paths to search when running commands. The TERM variable stores the terminal setting.

353. The _____________ command is used to change ownership of a file.
Answer: chown
Description: Ownership of files and directories is changed using the chown command.

354. When booting your system you notice that your sound module failed to load; however, the error message scrolled by too quickly. What command can you use to view the errors?
A. dmesg
B. messages
C. errors
D. lilo

Answer: A
Description: The dmesg command is used to view system messages. Neither messages nor errors is a valid command. The lilo command is used when updating boot loader options using the /etc/lilo.conf file.

355. What command is used to create a new archived file using compression?
A. gzip -t
B. tar -cfz
C. compress -tf
D. bzip2 -tbz

Answer: B
Description: Only the tar utility is capable of creating an archive while compressing the file. The gzip, compress, and bzip2 utilities are used to compress and uncompress files.

356. Which command is used to view processes running in the background?
A. dmesg
B. ls
C. bg
D. jobs

Answer: D
Description: The dmesg command is used to view system messages. The ls command is used to view directory contents. The bg command is used to run a process in the background. The jobs command is used to view jobs running in the background.

357. Which utility is used to view the beginning of a file?
A. tac
B. cat
C. head
D. top

Answer: C
Description: The tac utility displays files in reverse. The cat utility is used to display file contents. The head utility is used to view the beginning of a file. The top utility is used to view real-time information on system processes.

358. Which type of quota limit prevents a user from creating new files?
A. stop limit
B. soft limit
C. hard limit
D. max limit

Answer: C
Description: Stop limits and max limits are invalid. Soft limits can be exceeded for a period of time, while hard limits prevent a user from creating new files.

359. Which runlevel is used for administrative tasks performed locally, disallowing network connections to the system?
A. 0
B. 1
C. 3
D. 6

Answer: B
Description: Runlevel 0 is used to halt the system; level 1 is used to enter single-user mode; level 3 can vary according to the distribution; and level 6 is used to reboot the system.

360. User quotas are maintained in which file?
A. /etc/fstab
B. /etc/passwd
C. /quota.user
D. /lilo

Answer: C
Description: The /etc/fstab file contains file system information. The /etc/passwd file contains information on user accounts. The /quota.user file contains quota information for users. The /lilo file is invalid.

361. You are told by a co-worker that information pertaining to the syslog command can be found in man page 3. How would you view this information?
A. man syslog 3
B. man syslog -3
C. man -3 syslog
D. man 3 syslog

Answer: D
Description: The man page can be specified using the syntax man NUMBER command. This correct syntax is shown as man 3 syslog.

362. Which command is not used to view the contents of a file?
A. cat
B. more
C. less
D. expand

Answer: D
Description: The cat, more, and less utilities are all used to view file contents. The expand utility is used to convert tab characters to spaces.

363. The ________ command is used to unmount a file system.
Answer: umount
Description: File systems are unmounted using the umount command.

364. The ________ command will display previously entered commands.
Answer: history
Description: The history command allows you to view previously entered commands.

365. What type of information might you find using www.deja.com?
A. man pages
B. Usenet postings
C. software patches
D. kernel updates

Answer: B
Description: The Web site www.deja.com enables you to search Usenet postings.

366. Which directory utilizes no disk space?
A. /proc
B. /boot
C. /root
D. /local

Answer: A
Description: The /proc directory is virtual. It is used to store information about system resources and processes.

367. The __________ command is used to perform a consistency check on file systems.
Answer: fsck
Description: The fsck utility is used to verify and correct problems on file systems.

368. Which command would create a file called mydirlisting that includes a detailed listing of all the files and directories located within your home directory?
A. ls -alR $HOME > mydirlisting
B. ls -d > mydirlisting
C. mydirlisting < ls -al $HOME
D. ls -al | mydirlisting

Answer: A
Description: The -R option specifies that a recursive directory listing be performed. Data is sent to a file when the > symbol is used for redirection.

369. The ________ command is used to create an ext2 file system.
Answer: mkfs
Description: The mkfs tool is used to create a file system.

370. You’re repairing the master boot record on a system. You have booted the system via a boot disk and currently have the root volume mounted to /recover. How would you reinstall LILO?
A. lilo -r /recover/boot
B. lilo -f /recover
C. lilo -r /recover
D. lilo -r /recover -b /recover/boot

Answer: C
Description: The -r parameter on lilo specifies a different root directory. This is used when you are doing recovery and /etc and /boot are actually mounted under a new root.

371. The __________ file needs to be updated when a new library is added.
Answer: ld.so.conf.
Description: Whenever a new library is added manually, you must edit the ld.so.conf file and run ldconfig.

372. Which command removes a package named editor-2.0.i386.rpm?
A. rpm -i editor-2.0.i386.rpm
B. rpm -e editor-2.0.i386.rpm
C. dpkg -install editor-2.0.i386.rpm
D. apt-get install editor-2.0.i386.rpm

Answer: B
Description: The -e parameter is used to remove a package with RPM. The other choices install packages.

373. To make a single change to the kernel configuration before compiling, you would edit which file?
A. /usr/src/linux/Makefile
B. /usr/src/linux/.config
C. /usr/src/linux/config
D. /usr/src/linux/configure

Answer: B
Description: By default, kernel configuration options are stored in the .config file.

374. Which command will tell you which package owns the file /etc/printcap?
A. dpkg -F /etc/printcap
B. rpm -f /etc/printcap
C. who /etc/printcap
D. rpm -qf /etc/printcap

Answer: D
Description: The -qf parameters tell RPM to query (-q) the database to see who owns a certain file (-f).

375. The __________ file is executed for all nonlogin bash sessions.
Answer: ~/.bashrc or /etc/bashrc.
Description: The .bashrc script is executed when a bash shell is started, but not when logging in. For example, if you open a new xterm in X11 with bash, this script will run.

376. Which command shows the route between your host and the remote host www.somedomain.org?
A. traceroute -n www.somedomain.org
B. route www.somedomain.org
C. ping -r www.somedomain.org
D. route -n www.somedomain.org

Answer: A
Description: traceroute is used to show the path a packet takes to a destination. The ping command tells you only if a remote host is up, and the route command is used to modify the local routing table.

377. Which command is the best to use to find a contact name for another domain?
A. nslookup
B. whoinfo
C. whois
D. dig

Answer: C
Description: The whois command shows contact information relating to a domain. The nslookup and dig tools are used to check DNS information. The whoinfo command is invalid.

378. Which command(s) must be run after the inetd.conf file is updated?
A. /etc/rc.d/init.d/inetd restart
B. kill -1 inetd
C. kill -1 `cat /var/run/inetd.pid`
D. No command needed.

Answer: A and C
Description: When a change is made to inetd.conf, the daemon must be restarted by either using the script or issuing a HUP.

379. The __________ file can be created to keep nonroot users from logging in to the system.
Answer: /etc/nologin.
Description: This file causes the system to disallow all nonroot logins.

380. Which command(s) is/are used to enable shadow passwords?
A. shadow
B. pw-conv
C. pwconv
D. grpconv

Answer: C and D
Description: The pwconv and grpconv tools convert the passwd and group files to use shadow passwords. The other commands are fake.

381. Which command(s) is/are used to decompress the file mydoc.gz?
A. gunzip mydoc.gz
B. tar -zxv mydoc.gz
C. gzip -d mydoc.gz
D. gunzip -d mydoc.gz

Answer: A, C and D
Description: All three methods can be used to ungzip the file. The tar command does support gzip, but is used only when uncompressing a tar file.

382. To activate all swap partitions on the system you would use the _______ command (with options).
Answer: swapon -a.
Description: The swapon -a command enables all swap partitions in the /etc/fstab file.

383. Which command displays the output of the utmp file?
A. what
B. who
C. last
D. when

Answer: C
Description: The last command shows the utmp file by default, and the who command uses the wtmp file. The other two commands are invalid.

384. The _______ tool is used to control the Apache httpd service.
A. apached
B. httpdctl
C. htmgr
D. apachectl

Answer: D
Description: The Apache package includes the apachectl tool to manage the httpd daemon. The other Answers are invalid.

385. Which command displays queue information for all local printers?
A. lpq -a
B. lpc -a
C. printq
D. lpq -v

Answer: A
Description: The lpq tool is used to manage and view the print queue, while lpc is used to manage the printing system. The lpq –a command will display information for all local printers. The printq command is invalid.

386. Which disk partitioning tool provides a GUI?
A. fdisk
B. cfdisk
C. Disk Druid
D. gnodisk

Answer: C
Description: Disk Druid is a GUI tool supplied by Red Hat. Answers A and B provide text interfaces. Answer D is invalid.

387. The ________ command shows all loaded kernel modules.
Answer: lshmod.
Description: The lsmod command displays all loaded modules.

388. Which command in vi searches for the text Linux?
A. ESC, s, Linux
B. ESC, f, Linux
C. \Linux
D. /Linux

Answer: D
Description: The forward slash tells vi to search the file for the given expression. The s command is used for substitution, while the f command searches for a single character in the current line. Answer C is invalid.

389. Which command must be run when a new mail alias is added?
A. newalias
B. newaliases
C. genaliases
D. kill -1 `cat /var/run/sendmail.pid`

Answer: B
Description: Any time an alias is added, the newaliases command needs to be run. Answers A and C are invalid. Restarting the sendmail process will not activate the new aliases.

390. You want to make the directory /share available via NFS. All users on your local network should be allowed to read and write files. Which of the following is correct, assuming that your local network is 192.168.1.0 and your machine is part of the DNS domain mydomain.org?
A. /local 192.168.1.0/255.255.255.0(rw)
B. /local 192.168.1.0/*(rw)
C. /local *.org(rw)
D. /local ALL.mydomain.org(rw)

Answer: A
Description: Choice B is invalid due to the subnet mask. Choice C allows anyone from a .org domain to have access. The ALL wildcard is invalid as well.

391. Which script is run when X Window starts?
A. .xinit
B. .xrc
C. .startxrc
D. .xinitrc

Answer: D
Description: The .xinitrc script is run from your home directory when startx is called. The other script names are invalid.

392. Which command adds a new default route to the system?
A. ifconfig add default gw 1.2.3.4
B. route add gw 1.2.3.4
C. route add default gw 1.2.3.4
D. ifconfig add 0.0.0.0 mask 255.255.255.0 gw 1.2.3.4

Answer: C
Description: The ifconfig command is used to configure an interface, not a route.

393. Dave is going away on vacation for two weeks and wants his mail forwarded to Sue while he is away. Which change should he make?
A. Add “sue” to /etc/aliases.
B. Add “sue” to ~/.forward.
C. Add “sue” to ~/.aliases.
D. Add a rule to pine to forward the mail.

Answer: B
Description: Only root can change /etc/aliases. Answers C and D are invalid.

394. The Samba daemon responsible for handling name resolution is which of the following?
A. nmbd
B. smbd
C. winsd
D. named

Answer: A
Description: The smbd daemon handles file and printer sharing. Answer C is invalid. The named daemon is used to provide DNS.

395. The _______ command can be used to change to another user.
Answer: su
Description: The su, or substitute user, command is used to change to another user while logged in.

396. Which command should be used to allow the host norbert to connect to the local X server?
A. xhost +
B. cat norbert > .rhosts
C. xhost +norbert
D. rhosts +norbert

Answer: C
Description: Choice A allows anyone to connect, which is a security risk. The X server does not use the rhosts file. Choice D is invalid.

397. You have just configured a new mail server named deathstar. Which entry should you make into DNS to make this the primary mail server?
A. IN MX 20 deathstar
B. IN MX 10 deathstar
C. IN MX 0 deathstar
D. IN MX 100 deathstar

Answer: C
Description: The lower the number is, the higher the priority of the mail server.

398. Which command would you use to copy the /Documents directory and all subdirectories from the current system to the remote system newman?
A. cp -R /Documents newman:/
B. scp -r /Documents root@newman:/
C. rcp -R /documents newman:/
D. scp -R root@newman:/ /Documents

Answer: B
Description: The cp tool only works locally. Choice C uses the wrong path name, and choice D has incorrect syntax.

399. Which command would update your Debian system to the latest version of all installed packages?
A. apt-get update ; apt-get upgrade
B. apt-get upgrade ; apt-get update
C. apt-get refresh
D. apt get update ; apt get upgrade

Answer: A
Description: The update command is first used to update the available package list, and then the upgrade command is used to actually upgrade the packages.

400. You have set up a new mail server behind your firewall. You now need to open up port _____ for access to work.
Answer: 25
Description: The SMTP protocol uses port 25.

401. The _______ tool outputs a file showing the PnP configuration of the system.
Answer: pnpdump
Description: This tool is used to scan the system and output any Plug-and-Play information to a text file for configuration.

402. What does the following IP chains block accomplish? (Select all that apply.)
ipchains -F input
echo 1 > /proc/sys/net/ipv4/ip_forward
ipchains -A output -src 192.168.1.0/24 -dst ! 192.168.1.0/24 -j MASQ
ipchains -A input -dst 192.168.1.12 -j ACCEPT
A. The 192.168.1.0/24 network is being masq’d.
B. IP forwarding is disabled.
C. IP forwarding is enabled.
D. Access to 192.168.1.12 is allowed.

Answer: C and D
Description: IP Masq is not functioning since the rule must be set in the Forward chain. The second line enables IP forwarding.

403. Which of the following directories should be on their own partition? (Select all that apply.)
A. /usr
B. /boot
C. /home
D. /tmp

Answer: A, B, C and D
Description: In most cases all of the directory structures should have their own partition for security and fault tolerance.

404. The ________ command provides an easy-to-use interface to Debian package management.
Answer: dselect
Description: The dselect tool is an easy-to-use front end for dpkg.

405. Which command(s) would be used to display which kernel packages are installed on your system?
A. rpm -ql | grep kernel
B. rpm -qa | grep kernel
C. dpkg -l kernel
D. dpkg -l | grep kernel

Answer: B and D
Description: Answer – A is invalid, since no query string is present. Answer C will only display a package with the exact name “kernel”.

406. To use the X11 graphical interface to make a kernel configuration, you would use which of the following?
A. make gconfig
B. make xconfig
C. make menuconfig
D. make tclconfig

Answer: B
Description: Answers A and D are invalid. The make menuconfig command provides a text mode menu.

407. After editing the /etc/lilo.conf file, you must run the _________ command.
Answer: lilo
Description: You must rerun lilo after editing /etc/lilo.conf so that a new boot record is written with the updated information.

408. If you want to remotely display an X Window application to another system, which option would you use?
A. -display
B. -connect
C. -remote
D. -xhost

Answer: A
Description: The -display parameter tells the application where to connect to for its output display. The other Answers are invalid.

409. You have a Red Hat system that currently boots in text mode. Which file do you need to modify to have it boot in GUI mode?
A. /etc/runlevel
B. /etc/init.conf
C. /etc/inittab
D. /etc/xdm

Answer: C
Description: The inittab file tells the system which runlevel to boot to by default. In Red Hat, runlevel 3 is text mode and runlevel 5 is GUI mode. The other Answers are invalid.

410. The ______ file stores the monitor information for X Window v4 (no path).
Answer: XF86Config-4.
Description: XFree86 v3 uses the XF86Config file.

411. Which X11 application is known to have memory leaks?
A. Netscape
B. Internet Explorer
C. Sawfish
D. WindowMaker

Answer: A
Description: Netscape is known to have stability problems and memory leaks.

412. The _______ command displays all e-mail messages waiting in the mail queue.
Answer: mailq.
Description: The mailq command shows all messages in the mail queue, as well as any errors that may keep the messages from being delivered.

413. Given the following files, would the host norbert be allowed to connect to the FTP server?
hosts.deny: in.ftpd : ALL
hosts.allow: in.ftpd : norbert
A. Yes
B. No

Answer: A
Description: While the hosts.deny rule blocks everyone, the hosts.allow rule overrides it.

414. Which type of modem is usually not compatible with Linux?
A. Internal
B. External
C. Integrated
D. Winmodem

Answer: D
Description: Winmodems use software to handle most of their functionality, which is not supported in Linux due to lack of information from which to write drivers.

415. You need to access a resource named Documents shared by the NFS server bigserver. Which command would you use?
A. mount -t nfs //bigserver/Documents /mnt/docs
B. mount bigserver:Documents /mnt/docs
C. mount -t nfs bigserver:/Documents /mnt/docs
D. nfsmount bigserver:Documents /mnt/docs

Answer: B
Description: The mount command uses the syntax server:share mount_point for NFS shares.

416. After updating the /etc/exports file, the _______ command must be run for it to take effect (with option(s)).
Answer: exportfs -a.
Description: The exportfs command is used to control the directories shared via NFS. The -a option tells exportfs to share or unshare all configured directories.

417. When examining the network logs for the firewall, you notice a lot of connection attempts to port 110. Which service may your remote users be trying to use?
A. IMAP
B. DNS
C. POP3
D. SMTP

Answer: C
Description: IMAP uses port 143, DNS uses port 53, and SMTP uses port 25.

418. After editing the /etc/modules.conf file you should run the ________ command.
Answer: depmod.
Description: The depmod command sets up the module dependency links.

419. The first line of a shell script should be which of the following?
A. !#/bin/sh
B. #!bash
C. #!/usr/bin/bash
D. #!/bin/bash

Answer: D
Description: The other Answers are invalid.

420. User application defaults are stored in which file?
A. Xresources
B. .Xdefaults
C. .xinit
D. .xinitrc

Answer: B
Description: The Xdefaults file lists the default settings for X applications, as configured by the user. The xinit and xinitrc scripts are used to start X.

Leave a Reply

Your email address will not be published. Required fields are marked *