Saturday, August 25, 2012

Apache Question & Answer for Interview L2/L3








QUESTION NO: 1

Jan wants her Apache server to be able to handle multiple requests over a single TCP connection. Which of the following would allow her to do this?

A. Expirations
B. BrowserMatch
C. KeepAlive
D. PersistentConnect
E. ChunkEncode

Answer: C

QUESTION NO: 2

Which of the following HTTP headers will direct a browser to www.site.com after waiting five seconds?

A. Rerwrite 5; URL = http://www.site.com/
B. Location 5; URL = http://www.site.com/
C. Refresh 5; URL = http://www.site.com/
D. Reload http://www.site.com/ -t 5
E. Direct -t 5 http://www.site.com/

Answer: C

QUESTION NO: 3

Cookies can be used by Apache to create a click stream log of user activity. However, for the cookies to work, Apache must be compiled with the _______ module, then the ______ directive must be

added to the httpd.conf file.

A. mod_usertrack; Cookie Tracking on
B. mod_cookies; Cookies on}
C. mod_cookietracking; cookie Tracking on
D. mod_cookielog; Cookielogging on
E. mod_userlog, cookielogging on

Answer: A

QUESTION NO: 4

Which of the following are TRUE regarding contains in httpd.com? (Choose two.)

A. Containers consist of a Paired set of delimiters.
B. If two containers contradict, the first is applied.
C. Containers may only be applied globally.
D. Containers allow individual virtual hosts to have their own settings.

Answer: A,D

QUESTION NO: 5

Which of the following best explains why Apache Web servers are able to handles multiple requests?

A. In addition to port 80, Apache opens ports 8080, 8000, and others to handle the additional requests.
B. Apache is able to spawn child processes that handle requests before they die.
C. Apache uses therenice service to load balance between different system daemons.
D. Upon reaching a set number of requests, Apache uses a raw socket to adjust a system's bandwidth to handle the additional requests.

Answer: B

QUESTION NO: 6

Consider the file "test.html". Which of the following best describes what code does?

<html>
<from>
<INPUT TYPE=" button" VALUE="set cookie"
onClick = "document. Cookie =`first_name=Fred`;">
<INPUT TYPE = "button" VALUE = "display cookie"
onClick = "alert (document.cokkie);">
</from>
</html>


A. When the user clicks on "set cookie," it prompts the user for value. Once the value is entered, it can be displayed using the "display cookie" button.
B. When the user clicks on "set cookie," thefirst_name cookie is set to "Fred." The first_name  cookie can be displayed by clicking the "display cookie" button.
C. When the user first loads "test.html,"first_name is automatically set to "Fred." The value of first_name can be seen with the "display cookie" button. The first_name cookie can be reset to " 3
empty ("") by clicking the "set cookie" button.
D. When the user clicks on the "set cookie" button, a new HTML page is loaded that displays the word "Fred". When the user clicks on the "display cookie" button, it alerts the user that it has been

deleted.

Answer: B

QUESTION NO: 7

Which of the following can be used send to used to send a cookie to the http client? (Choose two.)

A. XMLScript
B. Static HTM
C. Java Script
D. CGI scripts
E. GIFScript

Answer: C,D

QUESTION NO: 8

Ralf, a user, wishes to upgrade his existing version of Apache by including mod_ssl as a loadable module. Assuming that the shared object for mod_ssl is libssl. So, that mod_ssl is located in

"/prefix/modules/," which of the following must be present in his httpd, conf file?

A. LoadModule mod_ssl modules/libssl.so
B. Addmodule mod_ssl modules/libssl.so
C. LoadModule /prefix/modules/libssl.so mod_ssl
D. AddModule /prefix/modules/libssl.so mod_ssl

Answer: A

QUESTION NO: 9

Liz has completed an Apache installation on her computer. She did not encounter any errors. Which of the following can she use to see Apache's default index? (Choose two.)

A. http://localserver
B. http://localhost
C. http://index
D. http://192.268.0.0
E. http://127.0.0.1

Answer: B,E

QUESTION NO: 10

One security exploit with Apache is to include a command in a script that lets the scripts execute a command found in one of its variables. For example, a script might contain the who command and

display a list users logged into the server. Which of the following, if included in a CGI script, will run a command with the appropriate permissions?

A. declare
B. fork
C. export
D. eval
E. eacho

Answer: D

QUESTION NO: 11

Which of the following represents a security concern of programming CGI scripts using the C programming language?

A. C programs must be run withsetuid root.
B. If the program receives more data than the amount of memory it has allocated, a buffer overflow can cause the program to exit to a shell on the server.
C. Many early C compile lack the ability to dynamically alter file permissions, which results in many C program running with root permissions.
D. CGI script written in C compile at runtime on the client system, which makes the client vulnerable.
E. If the server and client do not have identical compilerversions, the lesser compiler is used, which may have known exploits.

Answer: B

QUESTION NO: 12

Which of the following best explains the function of the KeepAlive directive in Apache 1.1?

A. It defines the length of time Apache will wait before spawning additional processes.
B. It constantly checks on the Apache service and reports viasyslogd if there is a server problem.
C. It makes a backup by spawning clones ofitself in case the server goes down.
D. It defined how long a server process can keep a connection before shutting down.
E. It tells Apache how long to wait before going into the zombie process state.

Answer: D

QUESTION NO: 13

Which of the following scenarios most accurately describes the Apache initialization sequence?

A. Apache spawns one child process each second untilMaxSpareServer is satisfied or MaxClients is reached.
B. Apache spawns one child, then two, then four, and up to 32 processes per seconds untilMaxClients is reached or Minspare Servers is satisfied.
C. Apache spawns one process then continues to double the number of processes spawned each second indefinitely untilMaxClients is reached or MinSpareServers is satisfied.
D. Apache spawns the needed number of child processes dependent on the incoming requests untilMaxClients is reached or MinSpareServer is satisfied. For example, if three requests come in, Apache

would spawn three processes, and soon.

Answer: B

QUESTION NO: 14

How does Apache enable CGI scripts? (Choose two.)

A. It links source pages to the appropriate client compiler.
B. It implementssuid and makes the script excitable.
C. It defines content types based on the extension.
D. It references directories that contain the scripts.

Answer: C,D

QUESTION NO: 15

Jake has the text below in his httpd conf file. He does NOT have mod_mime_magic compiled as part of the Apache server configuration. Which of the following are TRUE concerning this information?

(Choose two.)

LoadModule vhost_alias_module modules/mod_vhost _alias.so
# LoadModule env_module modules/mod_env.so
# LoadModule agent_log_module modules/mod_log_agent.so
# LoadModule mime_magic_module modules/mod_mime_magic.so
# LoadModule mime_module modules/mod_mime_magic.s
<IFModeule mod_mime_magic.c>
MIOMEMagicFile share/magic
</ifModule>

A. The MIMEMagicFile directive will be processed.
B. The MIMEMagicFile directive will NOT be processed.
C. The server will NOT be able to use hints in share/magic to determine file types.
D. The server will be able to use hints in share/magic to determine file types.

Answer: B,C

QUESTION NO: 16

An administrator needs to set the permissions an Apache Web server to maximize security, while still allowing for full functionality. Which of the following permissions are most appropriate for

Apache configuration files and Apache executables, respectively?

A. 755, 000
B. 755, 111
C. 511, 755
D. 777, 555
E. 755, 511

Answer: E

QUESTION NO: 17

The block of code below is found in the http conf file. Under what conditions would this block of code execute?

<If Module !PHP/4.0>
...
</If Module>

A. If PHP/4.0 is NOT compiled or loaded into Apache when the block of code is called
B. If PHP/4.0 is NOT compiled or loaded in the module's shared library when the block of code is called
C. If PHP/4.0 is compiled or loaded into Apache when the block of code is called
D. If PHP/4.0 is compiled or loaded in the module's shared library when the block of code is called

Answer: A

QUESTION NO: 18

Which of the following is a requirement for IP-based virtual hosting?

A. Separate network devices, each with its own I address.
B. Separate IP addresses for each virtual host
C. Separate configuration files for each virtual host.
D. SeparateIPAlias directives in the httpd.conf file for each virtual host.

Answer: B

QUESTION NO: 19

Tom would like to group all of his CGI scripts to /lib/cgi-bin/. In order to do this, he needs to use the ScriptAlias directive in the httpd.conf file of his Apache server. What modules need to be

compiled in order for this to work? (Choose two.)

A. mod_cgi.c or any module that supports the common gateway interface
B. mod_bin.c
C. mod_negotiation.c or any module that does protocol negotiation
D. mod_alias.c
E. mod_script.c or any module that does script parsing

Answer: A,D

QUESTION NO: 20

The system administrator has configured Apache to write its log files via the system logging daemon. When Apache write its log files to syslog, it will run with the permissions of which user?

A. Always as root
B. Always as nobody
C. Always aswebuser
D. Always as the owner of the http process
E. Always as the owner of thesyslogd process

Answer: B

QUESTION NO: 21

If a user has already defined a log format called "common, "which of the following directives will ALWAYS make Apache log requests to "/var/log/apache/access_log" using the " common" format?

A. TransferLog /var/log/apache/access_log format=common
B. TransferLog /var/log/apache/access_log common
C. CustomLog /var/log/apache/access_log format=common
D. CustomLog /var/log/apache/access_log common
Answer: D

QUESTION NO: 22

The system administrator wishes to make the Web server run with UID "web." Which of the following lines should be added to httpd.conf to allow this?

A. UID web
B. ServerAdmin web
C. Owner web
D. User web
E. RunAs web

Answer: D

QUESTION NO: 23

Which one of the following http conf entries will tell the server which access directive can be overridden by the. Htaccess file?

A. Order Allow. Deny
B. AllowOveride
C. Order Deny, Allow
D. Allow

Answer: B

QUESTION NO: 24

An administrator would like to set up Apache server with multiple IP addresses. Which httpd.conf directives are used to change the port and the IP address on which httpd listens? (Choose two.)

A. Listen
B. Address
C. Bind
D. Active
E. BindAddress

Answer: A,B

QUESTION NO: 25

Amanda is configuring an Internet Web server with server with two virtual host. One of the host server is a time clock, and the other is a Web mail server. Both hosts are configured to provide

service on port 8080. One host is using the IP address 192.168.1.10, and the order is using 192.168.1.20. Which of the following will occur when Amanda tries to run both hosts on the same port

number?

A. Requests to both virtual hosts will be denied.
B. The host listed last in thehttpd.conf configuration file will receive all f the requests on that port number.
C. The underlying IP layer willnondeteministically transfer network packets to either host.
D. Both virtual hosts will function normally.

Answer: D

QUESTION NO: 26

Which statement best describes the outcome of the following commands?

Root@example apache $ bin/htpasswd /etc/httpd/conf/users nobody
Root@example apache $ bin/apache 1restart

A. Create a new and set the password for the Web page
B. Create a new user for the http group file
C. Create a new group and password for the system
D. Create a new alias for all the http users

Answer: A

QUESTION NO: 27

A system administrator has entered the directive below into httpd.conf. Which of the following will she have to type into the browser to get to the aliased page? Assuming the file access

permissions are set correctly.

Alias/html/usr/local/my_dir/my_html/

A. http://localhost/
B. http://localhost/htm/
C. http://localhost/usr/local/html/
D. http://localhost/my_dir/html
Answer: B

QUESTION NO: 28

Joe, a system administrator, wants to allow visitors to sign one of two default usernames and a valid e-mail address. He decides the default names should be "janedoe" and "johndoe". In the.

htsccess file,which module should Joe edit to achieve the desired results, and what information should he enter?

A. anon_auth_module; Anonymous johndoe and johndoe
B. access_module; Anonymous johndoe and johndoe
C. anon_auth_module; Anonymous *doe
D. access_module; Anonymous *doe

Answer: A

QUESTION NO: 29

As a security measure, the system administrator has set the policy that all system logs must be written to a remote system. Which of the following directives should be used to make Apache log in

this fashion?

A. CustomerLog | /sbin/syslogd
B. CustomerLog remotesystem:/var/httpd/access_log
C. TransferLog remotesystem:/var/httpd/access_log
D. TransferLog | /sbin/syslogd

Answer: D

QUESTION NO: 30

The system administrator is setting up Apache to limit access to the directory "/ Linux/example/." Only visitors from linuxsite.org should be able to access the directory. What lines need to be
added to the following entery in the .htaccess file to make this restriction possible? Select the best pair for lines two and four.

1 <Directory "/Linux/example/">
3 Deny from All

5 </Directory>

A. Allow fromlinuxsite.org;End
B. Deny,Allow;Allow from linuxsite.org
C. OrderAllow,Deny; Allow from linuxsite.org
D. OrderDeny,Allow; Allow from linuxsite.org

Answer: D

QUESTION NO: 31

David wants to set up a virtual host that uses the IP address 192.168.2.2, but he wants the server to attain individual settings from the main server. He uses the http.conf file below. David then
restarts httpd and receives an error. What error did he make in the configuration file?

<VirtualHost 192.168.2.2>
ServerAdmin david@davidsvirualhost.com
ServerRoot /www/docs/davidhost2
ServerName davidsvirtualhost.com
TransferLog logs/ davidsvirtualhost.com-access_log
ErrorLog log/ davidsvirtualhost.com-error_log
</VirtuaulHost>

A. The TransferLog directive is improperly formatted.
B. The ServerRoot directive is invalid the VirtualHost container.
C. The VirtualHost containor is not terminated correctly.
D. The TypesConfig directive is missing inside the VirtualHost containe.
E. The MultiViews directive is missing inside the VirtualHost container.

Answer: B

QUESTION NO: 32

Which of the following fields is NOT a part of the CommonLog Format (CLF)?

A. Requesting host
B. Byte length of the request
C. Data of request
D. Time to serve request
E. HTTP status code

Answer: D

QUESTION NO: 33

Jerry has a directory dedicated to JPEG image but does not have the .jpg extension on each file. How can he get the server to inform the client of the content type of the files in the directory?

A. Within a Directory container, use theDefaultType directive to specify the file type.
B. Within a Directory container, use theAddType directive to specify the file type.
C. Within a Directory container, use theAddEncoding directive to specify the file type.
D. Within a Directory container, use theTypeConfig directive to specify the file type.

Answer: A

QUESTION NO: 34

Using a name-based virtual host, how does a client make a request to the desired host?

A. The client listens for a particular IP address that is in thehttpd.conf file.
B. The client requestare command to the server's /etc/hosts file.
C. The client browser provides the host header, the host header, which the server matches against the list of virtual hosts.
D. The client browser provides a virtual hostsctipt that includes the desired port number.

Answer: C

QUESTION NO: 35

Tom has entered the information below in his httpd.comf file. He has no .htaccess file that override these directives. Which of the following is TRUE concerning this files?

ExpiresActive on
Anywhere, .htaccess when Allow Override indexes
ExpiresByType image/gif A1000
Anywhere, .htaccess when Allow Override indexes

A. A GIF image on the server will be active for 1000 seconds after its last modification time.
B. If the file size a GIF image is over 1000Kb,then the GIF image will expire in the server's cache.
C. After the client accesses a GIF image on the server, it will NOT expire in the client's cache for 1000 seconds.
D. The server will hold no more than 1000 GIF image in its cache.

Answer: C

QUESTION NO: 36

Assume the following block of code is placed in the httpd.conf file. What task does it perform?

RewriteCond %{TIME_DAY} !Monday {OR}
RewriteCond %{TIME_HOUR} 10
RewriteCond ^index\.html /index\.html
RewriteCond %{TIME_DAY} Monday
RewriteCond ^index\.html /index\.mon\.html

A. It rewrites the URL http://someserver/index.html to http://somerver/index.mon.html if the day is NOT Monday and the hour is NOT 10.
B. It rewrites the URL http://someserver/index.html to http://somerver/index.mon.html if the day is Monday and the hour is 10.
C. It rewrites the URL http://someserver/index.html to http://somerver/index.mon.html if the day is NOT Monday and the hour is 10.
D. It rewrites the URL http://someserver/index.html to http://somerver/index.mon.html if the day is Monday and the hour is NOT 10.

Answer: C

QUESTION NO: 37

Which of the following MUST Apache 1.1 and higher have in order to run?

A. httpd.conf
B. httpd.conf and srm.conf
C. httpd.conf and access.conf
D. httpd.conf access.conf, srm.conf

Answer: A

QUESTION NO: 38

Paul has placed all images to offered by an Apache Web server in a single directory. The images are to be handled as GIF images, but he does not wants to individually label each of the images with

the ".gif" extension. Which of the following methods could Paul use to efficiently associate all files in the /images directory (and only the /images directory) with the ".gif" .extension?

A. If Paul crates an .htaccess file in /images and uses the Force Type directive in the file, all files classified as images can be given the ".gif" association despite their current association.
B. If Paul crates an .htaccess file in /images and uses the Force Type directive in the file, individual files can be processed and associated with any extension defined in the Add Type filed
located in httpd.conf.
C. Paul must use theRemoveHandler and Addhandler directives to remove current extensions then add new extensions. Both directives must be used in the global container of httpd.conf.
D. Paul must use theRemoveHandler and SetHandler directives to remove current extensions then add new extensions. The RemoveHandler directive must be placed in an. Htaccess file in
/images and the SetHandler directive must be defined in httpd.conf.

Answer: A

QUESTION NO: 39

Which of the following is the main problem with using.htaccess to override directives in httpd.conf?

A. .htaccess must have a per-loaded PAM module that requires extra configuraton.
B. .htaccess is insecure because it requires root permission to access subirectories.
C. .htaccess delays page access by recursively searching subdirectories.
D. .htaccess does not search every directory, possibly leaving subdirectories open.

Answer: C

QUESTION NO: 40

The Web document root directory can be changed by which line in httpd.conf?

A. Root
B. RootDir
C. DocumentRoot
D. WebRoot
E. BaseDir

Answer: C

QUESTION NO: 41

What is the function of the XbitHack directive in the httpd.conf file?

A. To active the X interface for Apache from a remote location
B. To prevent serving requests for executable files
C. To authenticate the requesting client based on user permissions
D. To parse Web files for includes based on their permissions

Answer: D

QUESTION NO: 42

Bad has placed a limit on the maximum requests per child process on his Apache server. To do this, he added the MaxRequestsPerChild directive to httpd.comnf and gave it a value of 800. Which of the

following are TRUE concerning this situation? (Choose two.)

A. It limits the amount of memory that processes can consume in the event of accidental memory leakage.
B. Limiting the number of child processes increases processing done by each child; this increases system load.
C. By giving process a finite lifetime, the number of processes will be reduced when requests decrease; this frees up system resources.
D. Limiting the number of child processes increases mean network packet length; this allows more data to be transferred at once.

Answer: A,B

QUESTION NO: 43

What is the IANA-recommended value for the Port directive?

A. 0
B. 80
C. 255
D. 8080

Answer: B

QUESTION NO: 44

Examine the following block of code. What should be added on line 3 so that the following events occur. If the value of "test" is equal to 100, the Web page will print, "you are our on hundredth

customer," and if the value of "test" is not equal to 100, the Web page will print, "Have a nice day"

1 <!--#if expr= "${test} != ${100]" à
2 Have a nice day
4 you are our one hundredth customer
5 <!--#else -- >
6 Have a nice day
7 <! -- #endif -- >

A. <!-- #elseif expr="${test} = ${100}" -- >
B. <!-- #elseif expr="${test} != ${100}" -- >
C. < !-- elif expr="${test} != ${100}" -- >
D. < !-- #elif expr="${test} = ${100}" -- >

Answer: D

QUESTION NO: 45

A Web site has a standard header that should be included on all Web pages. Which of the following lines would make the server include a eparate file, clled "header.html, " instead of write
the header code for every page on the site?
Assume that "header.html" is in same directory as all other HTML files, which is "/www/htdocs."

A. <!--#include "/www/htdocs/header.html"-- >
B. <!--#include "/www/htdocs/header.html"-- >
C. <!--#nclude file="/www/htdocs/header.html"-- >
D. <!--#virtual "/www/htdocs/header.html"-- >
E. <!--#file="/www/htdocs/header.html"-- >

Answer: B

QUESTION NO: 46

To crate dynamic HTML content, which of the following MUST be included with each CGI script?

A. each $cgi
B. #/bin/bash
C. #nclude cgi
D. #/bin/perl
E. each Content-type

Answer: E

QUESTION NO: 47

Suppose that a user wishes to dynamically include the contents of the file "message.txt" within a Web page. Which of the following lines within the HTML code will allow this to be done?

A. <!--#exec "cat message.txt" -- >
B. <!--#exec cmd "cat message.txt" -- >
C. <!--#exec cmd cat message.txt -- >
D. <!-- exec cmd "cat message.txt" -- >
E. <!-- cat message.txt" -- >

Answer: B

QUESTION NO: 48

Adam has decided to start maintaining status information on current connections by setting the ConnectionStatus directive to "on." Which of the following modules MUST be installed for this

directive to work?

A. mod_status
B. mod_info
C. mod_logging
D. mod_connect
E. mod_reports

Answer: A

QUESTION NO: 49

In order to make the Web server parver parse file with extension ".shtml" for server side includes, which of the following should be added to httpd.conf?

A. AddHandler server-persed .shtml
B. AddHandler Handler .shtml
C. NewHandler server-parsed .shtml
D. NewHandler .shtml

Answer: A

QUESTION NO: 50

John is running multiple virtual server from a single Apache Web server daemon. He has separate log files each virtual server. Some of the error logs start reporting the error "unable to fork."

John's system supports the setrlimit () call. Which of the following can john do to fix this error? (Choose two.)

A. Send each log file to the same partition and compress the partition periodically.
B. Compilemod_fork.c into the Apache source or dynamically load the mod_fork module in httpd.conf.
C. Consolidate all log files into one file.
D. In the Apache startup script, increase the number of available file descriptors with theulimit utility.
E. Edit thehttpd.conf file to include "forking=yes" in the globals section.

Answer: A,B

QUESTION NO: 51

Natalie, the Webmaster for a small company, wishes to log Web server access using a custom log file format. In order to do this, she decides to use the CustomLog directive. However, she neglected

to define the structure of the log entries. Which of the following directives did Natalie fail to place in httpd.conf?

A. LogStructure
B. TransferLog
C. CommonLog
D. LogFormat

Answer: D

QUESTION NO: 52

Given the following exerpt of code from httpd.conf, what function will be performed?

LogFormat"%h %1 %u %t \"%r\" %>s %b \"%{Referer} i\" \"%{User-Agent } i \""\ combined
LogFormat"%h %1 %u %t \"r\" %>a %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
TransferLog /var/log/httpd/access_log

A. The log file /var/log/httpd will be written with the format "agent".
B. The log file /var/log/httpd will be written with the format "combine".
C. The log file /var/log/httpd will be written in common log format.
D. The log file /var/log/httpd will be written, but will only log the IP address.

Answer: A

QUESTION NO: 53

An administrator needs to perform host name lookups on users accessing HTML and SWF files, but no other files. The administrator has added the following lines to the httpd.conf file but is not
getting the desired result. What is the result of the lines added by the administrator?

<Files ^^ "\. (html | svf) $">
HostnameLookups on
</Files>

A. The server performs lookups and all users accessing files other than HTML or SWF and ignores users accessing HTML or SWF files.
B. The server performs lookups for all users accessing all files.
C. The serverperform lookups for some users on the HTML and SWF files.
D. The serverperform lookups on users accessing HTML files, but not on users accessing SWF files.

Answer: D

QUESTION NO: 54

When installing Apache from source, the system administrator adds the line below to the "apacke_1.3.19/src/Configure" file. What does this accomplish?

AddModulemodules/standard/mod_so.o

A. mod_so.o will be loaded into the Apache binary after Apache has been restarted.
B. mod_so.0 will be combined with the Apache binary at run time.
C. mod_so.o will be added, provided it is already built into the binary.
D. mod_so.o will become part of the Apache binary at compile time.

Answer: D

QUESTION NO: 55

If the Web server and the browser use a persistent connection, then multiple requests can occur over the same _________ connection.

A. IP
B. ftpd
C. CGI
D. TCP

Answer: D

QUESTION NO: 56

Which of the following are TRUE concerning directives and Apache? (Choose two)

A. Directives are commands issued throughapachetl.
B. Directives are used to control Apache's runtime configuration.
C. Directives can be used to alter Apache's configuration during runtime.
D. Directives can be used in configuration files other thanhttpd.conf.

Answer: B,D

QUESTION NO: 57

Which of the following is TRUE concerning chunked encoding?

A. It allows the server to grab small bits of dynamically produced data (chunks), determine the content, and sent it to the client.
B. It helps identify a client by dropping chunks of information onto the client's computer and then reading it from the computer later.
C. It divides RAM into chunks so that Apache can better utilize itsRequestsHeader info.
D. It forces a TCP connection into two chunks-one for the client and one for the server.

Answer: A

QUESTION NO: 58

When using persistent connections with HTTP1.1, a server must know the Content-Length of the response it sends back to a client. If a Web page is dynamically created, there is no way for the
server to know the exact size of the content. Which of the following helps to solve this problem?

A. Parsing header protocol
B. Cookies
C. Chunked encoding
D. UDP packet encryption

Answer: C

QUESTION NO: 59

Maynard has recently been places in charge of a large Apache server that may be a target for Denial of Service (DOS) attacks. To increase security, Maynard has decides to modify httpd.conf
and strengthen the server's resistance to attacks. Of the following httpd.conf directives, which can be used as a protection against DOS attacks? (Choose two)

A. LimitRequestFields
B. LimitRequestFieldSize
C. AuthTypeMax
D. AuthBufferLimit
E. AuthOverflow

Answer: A,B

QUESTION NO: 60

The text below is found in your Apache server's error_log file. Which of the following could have caused this error?

/var/run/httpd.pid overwritten - Unclean shutdown of previous Apache run?

A. The Apache server as shut down by an unauthorized user.
B. The graceful shutdown of Apache was overwritten byinetd.
C. Apache was terminated by an unexpected system failure.
D. Another instance ofhttpd was started, which caused the original httpd to shut down.

Answer: C

QUESTION NO: 61

Which of the following can increase Web sever performance? (Choose three)

A. Move all swap space to the same partition as the Web server data.
B. Turn off logging.
C. Place Apache logs on the fastest drive.
D. Add additional RAM to the system.
E. Place Apache logs on the slower drive and the Web data on the faster drive.

Answer: A,B,C

QUESTION NO: 62

Which of the following statements concerning Apache and Secure Socket Layer (SSL) is TRUE?

A. Apache and SSL can only be used if the proper security certificate has been purchased.
B. Themod_ssl module gives SSL functionality to Apache.
C. Apache +SSLis a commercial version of Apache distributed as closed source.
D. Apache +SSLprovides maximum 256 bit encryption.
E. Themod_https module is equivalent to the mod_ssl module.

Answer: B

QUESTION NO: 63

Which of the following will occur if the MaxSpare Servers Apache directive is set to 15?

A. No more than 15 child processes will be left running and unused.
B. No more than 15 requests to the server will be allowed.
C. It will provide for 15 fail-over servers in a cluster.
D. It will provide 15 spare servers for each virtual host request.

Answer: A

QUESTION NO: 64

Recently LinuxCorp upgraded its Web server. In the process, several directories containing Web content were moved. The Webmaster wishes to modify Apache so that when clients access the original

URL, they will be automatically sent to a new directory. Which module will allow Apache to perform this task?

A. mod_url
B. mod_redirect
C. mod_link
D. mod_rewrite
E. mod:urlmanip

Answer: D

QUESTION NO: 65

John has a Web server running Apache, and his Web site has information that is updated periodically. John wants to make sure clients who access his Web site are viewing the most up-todate

information. Which of the following should John use to accomplish this?

A. BrowserMatch 10
B. ExpiresDefault 10
C. ReloadTime 10
D. CacheDocument 10
E. MaxKeepAlive 10

Answer: B

QUESTION NO: 66

George has taken over Web server administration for a colleague. He has located the httpd.conf file, the document root, and the files that Apache servers, but he cannot find the error log files.

They are not in their default location. Which command can he use to find the log files?

A. grep -i errorlog httpd.conf
B. locate -uerrorlog
C. locate -i uvET httpd.conf | grep errorlog
D. find /etc -nameerrorlog

Answer: A

QUESTION NO: 67

George does not want to use the default HTML error page; he wants to customize his version of Apache to handle problems or errors. He creates an HTML page named error.html, with his customized

error message, and saves it in the /cgi-bin/ directory. How can George get Apache to display his customized error message when a page is not found?

A. Use theErrorDocument directive in the following manner: ErrorDocument 404 /cgibin/error.html.
B. Use theErrorLog directives in the following manner: ErrorLog 404 /cgi-bin/error.html.
C. Use theErrorDocument directives in the following manner: ErrorDocument 401 error.html.
D. Use theErrorLog directives in the following manner: ErrorLog 401 error.html.

Answer: A

QUESTION NO: 68

Which of the following are valid options for the ServerType directive? (Choose two)

A. intranet
B. internet
C. inetd
D. httpd
E. stand-alone

Answer: A,B

QUESTION NO: 69

John wants to apply several directives to the following directories: /gardening, /garden_tools, /fertilizers, and /herbs. How can John configure Apache to do this without affecting any of his other
directories, considering the list of his directories below?

/woodshed_tools /fertilizers /decks
/garden_tools /herbs /boat_accessories
/gardening /charcoal_grills /misc

A. Use the <Directory> directive in the following manner:
<Directory ~ [f-h]?.*>... </Directory>
B. Use the <Directory> directive in the following manner:
<Directory> ~ /[f-h]*> ... </Directory>
C. Use the <File> directive in the following manner:
<File ~ [f-h]*> ... </File>
D. Use the <File> directive in the following manner:
<File> ~ /[f-h]?.*> ... </File>

Answer: B

QUESTION NO: 70

Julie has three files in the same directory named index.html, index.htm, and index.shtml, respectively. She wants index.htm to be sent to the client when this directory is accessed. Which
of the following httpd.conf entries will allow her to do this? (Choose two)

A. DirectoryIndex index.htm index.html index.shtml index.cgi
B. DirectoryIndex index-html index.cgi index.shtml index.htm
C. DirectoryIndex index.html index.shtml index.cgi index.htm
D. DirectoryIndex index.htm index.cgi index.shtml index.html

Answer: A,B

QUESTION NO: 71

John is creating multiple virtual Web servers with separate document root directories. John's boss says to keep duplication to a minimum by using the same executable scripts. In which section if
the httpd.conf file would John have to define the path of the executable scripts in order to accomplish this task?

A. Directory environment
B. Virtual host environment
C. Global environment
D. Default environment
E. Local environment

Answer: C

QUESTION NO: 72

Which of the following best describes the relationship between modules and directives in Apache?

A. Modules are the dynamic counterparts of directives.
B. Directives are used to direct the client to load the appropriate modules.
C. Modules contain code to carry out directives specifies inhttpd.conf.
D. Directives contain code to execute static modules.

Answer: C

QUESTION NO: 73

When the httpd.conf file is altered, Apache must re-read the file by stopping and restarting the server. There are two methods of restarting the server when using the apachectl tool. Which command

lies will perform the restart? (Choose two)

A. apachectl reload
B. apachectl reboot
C. apachectl restart
D. apachectl HUP
E. apachectl graceful

Answer: C,E

QUESTION NO: 74

A system administrator wishes to define several separate log file formats to handle different log files within Apache. After defining a block of format definitions, the directive below is

specifies. Which of the following definitions will be used? TransferLog/var/httpd/access_log

A. Common Log Format
B. The first specifiesLogFormat directive line
C. The last specifiedLogFormat directive line.
D. The server will report an error parsing the configuration file.

Answer: C

QUESTION NO: 75

Jamie is running Apache 1.3. He wants different pages with similar content on his Web site to be served to best accommodate each browser that views them. He alters the httpd.conf file and makes the

changes below. Which line still needs to be altered to enable the desired effect?

<Directory /usr/local/httpd/htdocs>
Options All
AllowOverride Authconfig
Order allow.deny
Allow from all

A. He needs to add "MultiViews On" to the "Options All" line.
B. He needs to change "AllowOverride Authconfig" to "AllowOverride None".
C. He needs to change "Orderallow,deny" to "Order deny,allow".
D. He needs to add "localhost" to the "Allow from all" line.

Answer: A

QUESTION NO: 76

You find a Segmentation fault error in one of your Apache error_log files. Which of the following
tools will help you determine what caused this fault?

A. segfind
B. gdb
C. apachectl
D. top

Answer: B

QUESTION NO: 77

Dharma, a system administrator, wants to allow server side includes on the Web server. Which of the following directives would be the most secure way for her to do this?

A. Options +Includes --NOEXEC
B. Options -Include
C. Options +IncludesNOEXEC
D. Options +NOEXEC

Answer: C

QUESTION NO: 78

The following is an example of what type of CGI script?


#1/bin/bash
#Hello, World! Script
echoContent-type: text/html
echo
echo'<html>
<head><title>Hello, World!</title></head>
echo'<body bgcolor=#FFFFFFF">
<h1>Hello, World!</body></html>'

A. PHP script
B. HTMLscipt
C. Shell script
D. JavaScript
E. Perl script

Answer: C

QUESTION NO: 79

Joni, a system administrator, would like to test a Web server to see how it will withstand a load of 100 simultaneous hits. Which command would she most likely use?

A. ab -<100 http://127.0.0.1:80/htdocs
B. ab -L100 http://127.0.0.1:80/htdocs
C. ab 100 http://127.0.0.1:80/htdocs
D. ab http://127.0.0.1:80/htdocs 100
E. ab -n100 http://127.0.0.1:80/htdocs

Answer: E

QUESTION NO: 80

Justin has entered the following lines into httpd.conf, but he is not sure what exactly these new lines will do. Which of the following will be caused by the lines Justin entered? (Choose two)

ExpiresActive on
ExpiresByType text/html M604800
ExpiresByType image/jpg A2592000

A. JPG images will expire after a month in the client's cache.
B. JPG images will expire after a week of non-use.
C. JPG images will expire a month from the time they were changed.
D. HTML documents will remain active for a week from the time they were changed.
E. HTML documents will remain active for a month from the time they were changed.
F. HTML documents will remain active for a week in the client's cache.

Answer: A,B

QUESTION NO: 81

Which of the following will occur if the StartServer Apache directive is set to five?

A. Five instances ofmod_quickstart.o will be started.
B. Five child processes will be started for every request.
C. Five child processes will be started when Apache starts.
D. Five virtual hosts will be started for every request.
Answer: C

QUESTION NO: 82

Which of the following is NOT an option that is supported by the Linux apachectl script?

A. start
B. restart
C. stop
D. graceful
E. kill

Answer: E

QUESTION NO: 83

An administrator wishes to install a new Apache module without recompiling Apache. He wants the modules automatically placed in the proper locations and the appropriate directive added in the

httpd.conf file. Which of the following utilities will allow the administrator to accomplish this task?

A. apmodprobe
B. apxs
C. apachectl
D. apconfig
E. apbuild

Answer: B

QUESTION NO: 84

Using a name-based virtual host, how does a client make a request to the desired host?

A. The client listens for a particular IP address that is set in thehttpd.conf file.
B. The client requests are compared to the server's /etc/hosts file.
C. The client browser provides the host header, which the server matches against the list of virtual hosts.
D. The client browser provides a virtual script that includes the desired port number.

Answer: C

QUESTION NO: 85

Eddy is maintaining a large Apache server used for holding and transferring files via the Web. He has accumulated many archive files with the tar.gz extension and would like to prevent them from

being shown when directories are listed. Which line could he add to either httpd.conf or .htaccess to accomplish this?

A. IndexHide "tar.gz
B. IndexHide "-tar.gz"
C. IndexIgnore *.tar.gz
D. IndexIgnore!.tar.gz
E. IndexList no .tar.gz
F. IndexList !tar.gz off

Answer: C

QUESTION NO: 86

Which of the following modules MUST be compiled into the Apache server?

A. http_core.c
B. apache_so.c
C. charset_so.c
D. tcpip_core.c

Answer: A

QUESTION NO: 87

A system administrator has entered the directive below into httpd.conf. Which of the following will she have to type into the browser to get the aliased page? Assume the file access permissions are
set correctly.

Alias /html/ /user/local/my_dir/my_html/

A. http://localhost/
B. http://localhost/html/
C. http://localhost/usr/local/html
D. http://localhost/my_dir/html

Answer: B

QUESTION NO: 88

Apache servers a document according to certain characteristics provided by the requesting browser.These characteristics of the document are called the document's dimensions. What dimension is used

when Apache serves a request from a browser that has a preference for gzip compressed document?

A. type
B. encoding
C. compression
D. format

Answer: B

QUESTION NO: 89

You are the system administrator of an Apache server that houses the Web site linuxsite.org. This site allows users with normal accounts to have home pages, and it houses several other mission
critical Web sites. A user, Joe, has a home page that requires a change in one of the Apache configuration directives. Joe wants to allow or deny access to his home page based on a

username/password combination. Which of the following is the best way to implement this change?

A. Allow Joe to configure the appropriate .htaccess file.
B. Install themod_runtime_auth module and allow Joe to make the appropriate changes to httpd.conf.
C. Make the appropriate changes tohttpd.conf file and restart httpd.
D. Make the appropriate changes to the global .htaccess file and restart httpd.

Answer: A

QUESTION NO: 90

Which of the following represents a security concern of programming CGI scripts using the C programming language?

A. C programs must run withsetuid root.
B. If the program receives more data then the amount of memory it has allocated, a buffer overflow can cause the program to exit to a shell on the server.
C. Many early C compilers lack the ability to dynamically alter file permissions, which result in many C programs running with root permissions.
D. CGI scripts written in C compile at runtime on the client system, which makes the client vulnerable.
E. If the server and client do not have identical compilerversions, the lesser compiler is used, which may known exploits.

Answer: B

Samba Question & Answer


QUESTION NO: 1

Which of the following best describes the function of smbd?

A. It provides NetBIOS name resolution services to clients.
B. It provides LDAP services to clients.
C. It provides Active Directory services to clients.
D. It provides file sharing and print services to clients.

Answer: D

QUESTION NO: 2

You have a Linux machine running Samba with the configuration below. Your machine's IP address is 192.168.1.20, and it is on a LAN with other Linux clients and Windows 9x clients. Which of the

following is this machine's primary function?

[global]
netbios name = SAMBA
security = user
local master=yes
preferred master=yes
domain master=yes
workgroup=AUTH
wins server = 192.168.1.99
encrypt passwords=yes
logon script- /usr/local/samba/bin/%u.bat
domain admin group = @bigusers
os level=65
logon home =\\%L\%U\.profiles
logon path = \\%L\profile\%U

A. A domain controller
B. A WINS server
C. A Security Account Manager (SAM) host
D. A Master Samba Share Server (MSSS)

Answer: A

QUESTION NO: 3

Which of the following best describes the function of the global max xmit parameter in smb.conf?

A. It defines the maximum number of TCP ACKs the server can transmit to the clients.
B. It defines the maximum packet size that Samba exchanges with a client.
C. It defines the maximum number of packets that are stored in RAM before they are written to disk.
D. It defines the maximum NetBIOS queries a server can accept.

Answer: B

QUESTION NO: 4

Diego, an administrator, has set up a Samba server to provide Windows users access to their Linux home directories. In the [homes] share, which of the following should he use to define the path of

the home directories as "/home/samba/<user name>"?

A. path = /home/samba/%n
B. path = /home/samba/%u
C. path = /home/samba/%l
D. path = /home/samba/%h

Answer: B

QUESTION NO: 5

What is the function of the smbclient command?

A. It allows a Windows share to be mounted from a computer running Linux.
B. It provides access to shared resources on a Windows computer.
C. It provides access to Linux shares from a Windows computer.
D. It provides access to a Samba-enabled computer from a Windows machine.

Answer: B

QUESTION NO: 6

Ron, a Windows user on his local network, asked his co-worker Ned to save a fle on the file server (a Linux machine). Ned saves the file in the specified directory and sends Ron a message to tell

him it is there. Ron looks in the file server share, but he cannot find the file until he checks it 20 minutes later. Why is Ron having this problem?

A. The "change notify timeout" parameter of the smb.conf file is set to 1200.
B. The "browseable" parameter of the smb.conf file is set to 1200.
C. The "browse list" parameter of thesmb.conf file is set to 1200.
D. The "deadtime" parameter of the smb.conf file is set to 1200.

Answer: A

QUESTION NO: 7

In order for encrypted passwords to be available to Samba, which of the following lines should appear in smb.conf? (Choose two.)

A. encryptpasswd = yes
B. encrypt = /etc/shadow
C. smb passwd file = /usr/local/etc/smbpasswd
D. encryptpass = /usr/local/etc/smbpasswd
E. encrypt passwords = yes

Answer: C,E

QUESTION NO: 8

Molly, an administrator, would like to poll the network to ensure that Samba is working properly. Which of the following commands would allow her to do this?

A. nmblookup --all
B. testparm --poll "*"
C. smbclient -L "*"
D. nmblookup -d 2 "*"

Answer: D

QUESTION NO: 9

Which of the following best describes the number of smbd processes that should be running at one time on a properly configured Samba server?

A. One for each client connected to Samba
B. Only one
C. At least one, and an additional one for each printer being used by Samba
D. At least one, and an additional process for each client connected to Samba

Answer: D

QUESTION NO: 10

The Samba server (luke.linuxsite.org) using the smb.conf file below is experiencing problems. What is most likely wrong with the smb.conf file?

[global]
netbios name = luke
workgroup = network1
security = share
load printers = yes
log file = /home/admin/
max log size = 10000
wins support = yes
wins server = samba.linuxsite.org
bind interfaces only = yes

A. The wins support parameter is set to "yes" , and the wins server parameter is set.
B. The max log size is set too high.
C. The log file path is not in the same directory as the Samba executables.
D. The log file is defined before the wins server.
E. The wins support parameter and the bind interfaceparameter are both set to "yes".

Answer: A

QUESTION NO: 11

Which of the following commands will be executed first by Samba?

A. preexec = rm -r /home/samba/tmp/*
B. root execute =rmdir -R /home/temp
C. rootpostexec = mkisofs -log-file %H/log-%d.txt
D. rootpreexec = mkdir /home/temp
E. prescript = /home/samba/scripts

Answer: D

QUESTION NO: 12

Maynard is optimizing his Samba services to provide ease of use as well as security. He has added the line below to /etc/auto.misc. Which of the following best describes the purpose of this

addition? docs -fstype=smb, username=bob, password=2ghtex9s ://servermain/docs

A. This prevents users listed ("bob") from accessing the "docs" share.
B. This line is required for Samba to export the "docs" share.
C. This allows automatic logins and logouts to the "docs" share.
D. This prevents users other than "bob" from accessing the "docs" share.
E. This allows the "docs" share to beautomounted by "bob" on login.

Answer: E

QUESTION NO: 13

Instead of linking all Samba commands to paths already defined in his environment, Fred wants to include /usr/local/samba/bin in his path. Which of the following will allow Fred to do this?

A. Edit the /etc/samba/smb.conf file to change Fred's environment to look in /usr/local/samba/bin for commands.
B. Edit thesmb.conf file to include the parameter "include=/usr/local/samba/bin".
C. Add Fred's paths to the /path directory.
D. Edit the /etc/profile file to change Fred's environment to look in /usr/local/samba/bin for commands.

Answer: D

QUESTION NO: 14

Annie is using Windows 95. In order for her to connect to the Samba server, she needs to run the regedit program and add an entry to the Windows registry. What type of registry entry should Annie

add, and what should its value be?

A. Enter a new DWORD Value named "EnablePlainTextPassword" with a value of one.
B. Enter a new String Value named "EnablePlainTextPassword" with a value of zero.
C. Enter a new Binary Value named "EnablePlainTextPassword" with a value of one.
D. Enter a new Host Value named "EnablePlainTextPassword" with a value of zero.
Answer: A

QUESTION NO: 15

Which of the following is FALSE regarding NetBIOS?

A. NetBIOS names are limited to 16 characters.
B. NetBIOS characters are always converted to uppercase.
C. The first character of a NetBIOS name is known as a NetBIOS prefix.
D. The last character in a NetBIOS name indicates the type.

Answer: C

QUESTION NO: 16

Which of the following is a function of a WINS server?

A. Map IP addresses to IPX names
B. Map IP addresses to subnet addresses
C. Map IP addresses to domain names
D. Map IP addresses to logical addresses
E. Map IP addresses to NetBIOS names

Answer: E

QUESTION NO: 17

Which of the following Samba programs will listen for NetBIOS over IP name service requests?

A. nmbd
B. swat
C. named
D. smbd

Answer: A

QUESTION NO: 18

Which of the following best describes the function of nmbd?

A. It provides NetBIOS name resolution services to clients.
B. It provides file sharing and print services to clients.
C. It provides Active Directory services to clients.
D. It provides LDAP services to clients.

Answer: A

QUESTION NO: 19

Liz wants to grant administrative access to the users sam, bob, and erica. How should she edit the smb.conf file?

A. users =sam, bob, erica
B. root users =sam, bob, erica
C. admin users =sam, bob, erica
D. superusers = sam, bob, erica

Answer: C

QUESTION NO: 20

Which of the following methods should be used to make changes to the smbpasswd file?

A. Editing the /etc/shadow file
B. smbpasswd
C. adduser
D. useradd
E. Editing the /etc/passwd file
Answer: B

QUESTION NO: 21

Pete wants to configure Samba to be a WINS server. Which of the following must he do in the smb.conf file for Samba to do this?

A. Make sure the wins proxy parameter is set to "wins proxy = yes" and change the wins support parameter to "wins support = yes".
B. Make sure the wins support parameter is set to "wins support = yes" and change the wins proxy parameter to the appropriate IP address.
C. Make sure the wins server parameter is set to the appropriate IP address and change the wins support parameter to "wins support = yes".
D. Make sure the wins server parameter is set to "wins server = none" and change the wins support parameter to "wins support = yes." Configure the Windows 95/98 and NT clients.

Answer: D

QUESTION NO: 22

A system administrator has Samba running on a machine that has direct access to the Internet, as well as access to the local area network through two different network interfaces. As part of the

configuration, the administrator adds the lines below to smb.conf. Which of the following describes the function of these two lines?

interfaces = 192.168.1.0/255.255.255.0
bind interfaces only = yes

A. Samba will not accept connection requests from the 192.168.1 subnet.
B. Hosts outside the local area network will not be allowed to connect to the Samba shares.
C. Samba will only serve requests to the IP address 192.168.1.0.
D. Samba will use the IP address 192.168.1.0 when making DNS requests.

Answer: B

QUESTION NO: 23

An administrator has modified his smb.conf file with regards to the server's behavior during elections for preferred master browser. The two modified lines listed below cause which of the following

to take place?

preferred master = true
domain master = yes

A. nmbd will not hold elections for domain master.
B. smbd will hold elections for preferred master but not for domain master.
C. smbd will bypass the election process and become preferred master.
D. nmbd will hold elections with a guarantee of winning.

Answer: D

QUESTION NO: 24

Hans wants to change his SMB password on the local system. Which of the following should he type to do this?

A. smbpasswd -U <username>
B. smbpasswd -f /etc/passwd <username>
C. smbpasswd <username>
D. smbpasswd -U -F <username>

Answer: C

QUESTION NO: 25

An administrator has recently discovered many malicious attacks on a Samba server. The attacks originate from two rogue hosts (badhost1 and badhost2) in the NIS netgroup called "nisnet".
Which of the following smb.conf entries will allow any host from nisnet to access the Samba server except badhost1 and badhost2?

A. hosts allow = *.nisnet hosts deny = !badhost1, !badhost2
B. hosts allow =nisnet EXCEPT badhost1, badhost2 hosts deny = ALL
C. hosts allow = @nisnet hosts deny = ALL EXCEPT badhost1, badhost2
D. hosts allow = @nisnet hosts deny = badhost1, badhost2

Answer: D

QUESTION NO: 26

Phillipe, an administrator, would like to configure Samba as a domain client and has added the following lines to smb.conf. The domain client is not functioning properly. What is wrong with this
section of his smb.conf file?

security = domain
netbios name = bigsamba
domain name = mydomain
machine password timeout = 100

A. Line 2 should be "netbios name = true"
B. Line 3 should be "workgroup =mydomain"
C. Line 1 should be "domain = security"
D. Line 4 should be "machine password timeout = true"

Answer: B

QUESTION NO: 27

An administrator needs to define how files written to the server by users are handled. He has added the following lines to his smb.conf file in order to do this. Considering these lines, what will
be the permissions on a file that a user sets to 555?

security mask = 0777
force security mode = 0
directory security mask = 0777
force directory security mode = 0

A. 700
B. 000
C. 777
D. 555

Answer: D

QUESTION NO: 28

Palmer, an administrator working on a Linux/Windows NT network, has issued the command below. What is he doing?
rpcclient -S '\\NTmachine' -U administrator -W NTDOM

A. He is resetting the password and login on "NTmachine" to "NTDOM" and "administrator," respectively.
B. He is connecting to a Windows NT machine called "NTmachine" as administrator.
C. He is adding a Windows NT machine called "NTmachine" to Samba's list of secure systems.
D. He is defining the method by which RPCs connect to and communicate with the Samba server; in this case using a login and password combination.

Answer: B

QUESTION NO: 29

A system administrator is preparing to take down the system for routine maintenance. The network is primarily used for Samba services. Before upgrading to the latest Linux kernel, the administrator
wants to make sure there are no remaining connections. Which of the following programs can the administrator use to see the open connections?

A. traceroute
B. smbd
C. smbrowser
D. ping
E. smbstatus

Answer: E

QUESTION NO: 30

The system administrator is trying to set up a smbpasswd file from the /etc/passwd file. The system is not using NIS. Which of the following is the proper command line to produce the smbpasswd file

in the "/usr/local/samba/private/" directory?

A. mksmbpasswd.sh /usr/local/samba/private/smbpasswd
B. cat /etc/passwd | mksmbpasswd.sh > /usr/local/samba/private/smbpasswd
C. cat /etc/passwd > /usr/local/samba/private/smbpasswd
D. mksmbpasswd.sh | /etc/passwd > /usr/local/samba/private/smbpasswd

Answer: B

QUESTION NO: 31

Jacques, an administrator, has changed a smbpasswd file entry to the line below. What will happen when the user "steve" attempts to log in to the Samba server?

steve:1005:NO PASSWORDXXXXXXXXXXXXXXXXXXXXX: \
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U ]:
\ LCT-00000000:steve smith:/home/ssmith:/usr/bin/ksh

A. He will be prompted to enter his current password.
B. He will be denied login.
C. He will be prompted for usual login with "NO PASSWORD" for a password.
D. He will be prompted to set a new password.

Answer: D

QUESTION NO: 32

Many smb.conf parameters take list arguments such as the hide files parameter. From the following, select the "hide files" parameter with the proper syntax that would prevent users from accessing

files with .mbx extensions and files beginning with samba.

A. hide files = .mbx, samba.
B. hide files = .mbx / samba.
C. hide files = "*.mbx","samba.*"
D. hide files = *.mbx / samba.*
E. hide files = *.mbx, samba.*

Answer: D

QUESTION NO: 33

You have two machines that run Linux on your LAN. host1 is running Samba while host2 is just a standard Linux machine. You run the command "smbclient -L host1" from host2 and receive the error

below. Which of the following is the most probable reason for this error?

added interface ip=192.168.1.48 bcast=192.168.1.255 nmask=255.255.255.0
session request to HOST1 failed (Not listening for calling name)
session request to *SMBSERVER failed (Not listening for calling name)

A. Thesmbd program is not running.
B. Thenetbios-ssn port is not in the appropriate state.
C. The "/etc/hosts.deny" file on host1 contains the IP address for host2.
D. The "valid users" parameter in host1'ssmb.conf file does not reference the guest account.
E. The "hosts deny" field insmb.conf contains host1's IP address.

Answer: E

QUESTION NO: 34

Dora, an administrator, would like to temporarily disable a share so she can change its contents. Which of the following should she add to smb.conf in the share's section to do this?

A. comment = off
B. fstype = no
C. available = no
D. public = no
E. browseable = false

Answer: C

QUESTION NO: 35

Pauline is the system administrator of a Local Area Network (LAN) that contains Linux and Windows clients. The LAN uses a file server that runs on a Windows NT server. In order to have fewer

servers on the network, Pauline wants to place all Linux users' home directories on the Windows server. Can the Linux machines be configured so that this is possible Why or why not?

A. Yes, by mounting the remote file system using NTFS instead ofsmb.
B. No, only localsmb file systems may be mounted on Linux systems.
C. Yes, an entry can be placed in /etc/fstab to mount smb file systems.
D. No,smb file systems cannot be mounted on Linux systems.

Answer: C

QUESTION NO: 36

Two daemons, smbd and nmbd, provide communication between Windows and Linux machines. Each daemon controls a portion of the work. Which of the following statements correctly match these daemons

with the jobs they perform? (Choose two.)

A. smbd performs file and print sharing.
B. smbd performs NetBIOS lookups.
C. nmbd performs NetBIOS lookups.
D. nmbd performs file and print sharing.

Answer: A,C

QUESTION NO: 37

Which of the following does the "create mask" parameter allow Samba to do?

A. It allows authentication for MS-DOS withUnix.
B. It allows Samba to overrideUnix and MS-DOS permissions.
C. It allows authentication forUnix with MS-DOS.
D. It allows Samba to map MS-DOS modes toUnix permissions.
E. It allows Samba to mapUnix permissions to MS-DOS modes.

Answer: D

QUESTION NO: 38

A Samba server is experiencing packet loss and data corruption when multiple users access a file simultaneously. Which of the following, if added to smb.conf, would most likely fix the problem?

A. fakeoplocks = no
B. lock files = yes
C. wins support = yes
D. file sharing = no
E. interfaces only = yes

Answer: A

QUESTION NO: 39

Which of the following does SWAT provide for administrators maintaining a Samba server?

A. An alternative to Samba
B. A simple command-line sharing monitor
C. A powerful security system
D. An easy-to-use, Web-based tool

Answer: D

QUESTION NO: 40

Isabella has recently enabled SSL support on a large Samba server and has issued the command below. What did Isabella accomplish with this command?

ssleay ca -days 100 -infiles client1-csr > client1.pem

A. She has removed the client (client1) certificate from the system.
B. She has "signed" the client (client1) certificate and authorized it to use the server.
C. She has created a temporary file (client1.pem) that generates a public certificate for the client (client1).
D. She has generated a public key (client1.pem) for the client.

Answer: B

QUESTION NO: 41

Nicolas, an administrator, needs to create a new log file for each client computer connecting to the Samba server. In the past, Nicolas entered each client computer name into smb.conf, but now he

is looking for a faster method to direct Samba to the correct log file for each computer. Which log path can Nicolas use so he does not have to manually enter each individual NetBIOS name?

A. /var/logs/samba.%g
B. /var/logs/samba.%m
C. /var/logs/samba.%h
D. /var/logs/samba.%n

Answer: B

QUESTION NO: 42

Michael is experiencing major security problems with his Samba server, and he would like to make all of the shares unbrowsable until he can resolve these problems. Which of the following parameters

should Michael change to accomplish his goal?

A. No share = yes
B. Browse list = no
C. Blocking = yes
D. Browse = no

Answer: B

QUESTION NO: 43

Which of the following are ways Samba resolves NetBIOS names? (Choose three.)

A. Reverse DNS lookups
B. LAN Manager Hosts table
C. Network broadcasts
D. Local name resolution through /etc/smbhosts
E. NetBIOS Name Server

Answer: B,C,E

QUESTION NO: 44

Bruce needs Samba to act as a Primary Domain Controller. The smbpasswd file is in "/usr/local/etc/smbpasswd." What should Bruce do in the smb.conf file to accomplish this?

A. Add the following line to the [global] section: encrypt passwords = yesusr/local/etc/smbpasswd
B. Add the following lines to the [global] section: encrypt passwords = nosmb passwd file = /usr/local/etc/
C. Add the following lines to the [global] section: encrypt passwords = yessmb passwd file = /usr/local/etc/smbpasswd
D. Add the following lines to the [homes] section: encrypt passwords = yessmb passwd file = /usr/local/etc/smbpasswd

Answer: C

QUESTION NO: 45

Matthew recently noticed problems in his Samba service when he was running the netstat program. It appears that TCP packets are progressing fine, but UDP packets are not. Which function of Samba

depends directly on UDP?

A. Mounting/unmounting of Samba shares
B. Translating NetBIOS names
C. Print sharing
D. File sharing

Answer: B

QUESTION NO: 46

Sharon has the share modes parameter in her smb.conf file set to "no." Given this information, which of the following is TRUE?

A. No remote Windows clients can access her Samba shares.
B. No remote Linux clients can access her Samba shares.
C. No remote guest accounts can access her Samba shares.
D. No network clients can access her Samba shares.

Answer: A

QUESTION NO: 47

Caroline, an administrator working with a hybrid cross-subnet, wants to force Samba to send server announcements between subnets. Which of the following should Caroline add to smb.conf to implement

this?

A. subnet announce = force
B. remote browse sync = <remote LMB IP address>
C. remote announce = <IP subnet list>
D. announce = force <IP subnet list>
E. lm announce = auto

Answer: C

QUESTION NO: 48

The system administrator needs to back up the contents of a smb share (docs) on a Windows client (winhost) onto the Linux network server. The administrator wants to back up to a tape drive. Which

of the following commands will allow this?

A. smbtar -s winhost -x /docs -u administrator -p abc123 -t /dev/nst0
B. smbmnt /mnt/winhost -u administrator -p abc123 /dev/nst0
C. smbtar //winhost/docs -u administrator%abc123 /dev/nst0
D. smbclient //winhost -u administrator%abc123 cat docs> /dev/nst0
E. smbclient //winhost/docs -u administrator%abc123 | tar -cf /dev/nst0

Answer: A

QUESTION NO: 49

Melissa needs to reconfigure a Samba server to include an additional share. How can she do this?

A. Edit thesmb.conf file or use SWAT.
B. Edit thesmbaccess.conf file or use BigBrother.
C. Edit thesmbpasswd.conf file or use SMBAdmin.
D. Edit thesmbshare.conf file or use WebSMB.

Answer: A

QUESTION NO: 50

An administrator would like to add a Samba server to an implemented Windows NT Domain (NTDOM). Which of the following smb.conf global entry excerpts contains the correct parameters to accomplish

this?

A. encrypt passwords = no security = share workgroup = NTDOM password server = *
B. encrypt passwords = yes security = domain workgroup = NTDOM password server = *
C. encrypt passwords = yes security = user workgroup = NTDOM password server = *
D. encrypt passwords = yes security = share workgroup = NTDOM password server = *

Answer: B

Linux Question & Answer



Topic 1, Volume A

QUESTION NO: 1 CORRECT TEXT

You suspect that a new ethernet card might be conflicting with another device.

Which file
should you check within the /proc tree to learn which IRQs are being used by

which kernel
drives?

Answer: interrupts
Answer: /proc/interrupts

QUESTION NO: 2

How many SCSI ids for peripherals can SCSI-1 support?

A. 5
B. 6
C. 7
D. 8
Answer: C
Explanation:

SCSI-1 support total 7 peripherals. There are several different types of SCSI

devices. The
original SCSI specification is commonly referred to as SCSI-1. The newer

specification,
SCSI-2, offersincreased speed and performance, as well as new commands. Fast

SCSI
increases throughput to more than 10MB per second. Fast-Wide SCSI provides a

wider data
path and throughput of up to 40MB per second and up to 15 devices. There there

are Ultra-
SCSI and Ultra-Wide-SCSI

QUESTION NO: 3

You need to install a fax server. Which type of fax/modem should you install to

insure
Linux compatibility?


A. External Serial Fax/modem
B. External USB Fax/modem
C. Internal ISA Fax/modem
D. Internal PCI Fax/modem
Answer: A
Explanation:

QUESTION NO: 4

You are running Linux 2.0.36 and you need to add a USB mouse to your system.

Which of
the following statements is true?

A. You need to rebuild the kernel.
B. You need to upgrade the kernel.
C. You need to load the USB modulesfor your existing modular kernel.
D. USB support is no available in Linux.
Answer: B
Explanation:

QUESTION NO: 5

You have just upgraded your PC to a 60 gigabyte IDE drive. While partitioning

the drive,
you notice that only 32 gigabytes are available. Which of the following will

most likely allow
you to use the entire drive?

A. Create two smaller partitions of 30 gigabytes each.
B. Set the PC BIOS to use LBA mode.
C. Create a partition that resides entirely below the first 1024 cylinders.
D. Use GRUB or the latest version of LILO as a bootloader.
E. Upgrade the PC BIOS to the latest version available.

Answer: E
Explanation:

QUESTION NO: 6

The lspci command can display information about devices except the following:

A. Card bus speed (e.g. 66Mhz)
B. Card IRQ settings
C. Card vendor identification
D. Card AGP rate (e.g. 1x, 2x, 4x)
E. Card Ethernet MAC address
Answer: E
Explanation:

lspci is a utility for displaying information about all PCI buses in the system

and all devices
connected to them. To display the MAC address of Ethernet, we use the ifconfig

command.

QUESTION NO: 7

If Linux detects an ACPI BIOS on bootup, what does it automatically deactivate?

A. PnP
B. PCI
C. ATA
D. APM
Answer: D
Explanation:

QUESTION NO: 8

What command would help you identify the I/O address range being used by the

network
card?

A. cat/proc/modules
B. cat/proc/devices
C. cat/proc/meminfo
D. cat/io/dma
E. cat/proc/ioports
Answer: E
Explanation:

QUESTION NO: 9

What program is needed to establish a PPP link to another computer?

A. pppd
B. wvdial
C. papd
D. kppp
Answer: A
Explanation:

wvdial - PPP dialer with built-in intelligence. wvdial is an intelligent PPP

dialer, which
means that it dials a modem and starts PPP in order to connect to the Internet.

It
issomething like the chat(8) program, except that it uses heuristics to guess

how to dial
and log into your server rather than forcing you to write a login script.

QUESTION NO: 10 CORRECT TEXT

The___________command allows you to view or change serial port configuration.

Answer: setserial
Answer: /bin/setserial

QUESTION NO: 11

You need to know where all the configuration files for the installed package

named
"postfix" are located. Assuming it was installed with rpm, which command will

list this
information for you?

A. rpm -qc postfix
B. rpm -Vc postfix
C. rpm --config postfix
D. rpm -listconfig postfix
E. rpm -qa --config postfix
Answer: A
Explanation:

QUESTION NO: 12

What tool can you use to print shared library dependencies?

A. ldconfig
B. ldd
C. libdep
D. libpath
E. ldev
Answer: B
Explanation:
ldd command prints the shared libraries required by each program or shared

library
specified on the command line. Example: ldd libdb.so.3 libc.so.6 =>

/lib/tls/libc.so.6
(0x00237000) /lib/ld-linux.so.2 (0x0021e000)

QUESTION NO: 13

While installing from source code you don't see the configuration script. What

command
can you run to compile the code?

A. make configure
B. install
C. install makefile
D. make
Answer: D
Explanation:

The purpose of the make utility is todetermine automatically which pieces of a

large
program need to be recompiled, and issue the commands to recompile them.

example C
programs, since they are most common, but you can use make with any programming
language whose compiler can be run with a shell command. In fact, make is not

limited to
programs. You can use it to describe any task where some files must be updated
automatically from others whenever the others change. To prepare to use make,

you must
write a file called the makefile that describes the relationships among files

in your program,
and the states the commands for updating each file. In a program,typically the

executable
file is updated from object files, which are in turn made by compiling source

files. So, make
command compile the source code.

QUESTION NO: 14

You have an updated RPM called screensaver-1.1.i386. rpm. You have version 1.0

installed.
Using RPM, how do you view the changelog of this file to see if you should

install the
update?

A. rpm -qp --changelogscreensaver-1.1.i386. rpm
B. rpm --changelog screensaver-1.1.i386. rpm
C. rpm -qc screensaver-1.1.i386. rpm
D. rpm -showchangelog screensaver-1.1.i386. rpm
Answer: A
Explanation:

QUESTION NO: 15

You are about to install a new program on an RPM based Linux system. Which of

the
following would be the best way to accomplish this?

A. Get the source code in a tarball and install from that source.
B. Get a source RPM and use rpm to install it.
C. Use rpm to install the program's binaries from an RPM package.
D. Use cpi to extract the binaries from a source RPM and use rpm to install

those sources.
Answer: C
Explanation:

QUESTION NO: 16

You are installing Linux on a workstation for a new employee. Which partition

should be
largest?

A. /
B. /boot
C. /lib
D. /usr
Answer: D
Explanation:

QUESTION NO: 17

How can you update a package only if an earlier version is currently installed

on the
system?

A. rmp -- update rpmname
B. rpm -U rpmname
C. rpm -F rpmname
D. rpm -- force rpmname
E. rpm -u rpmname
Answer: C
Explanation:

Upgrades,but only if the package is currently installed.

QUESTION NO: 18

You are preparing a new set of shared libraries in /usr/local/applib and you

have written
and compiled some code that uses these libraries. You have already performed

and
ldconfig, however the system still cannot find the shared libraries. What is

most likely the
cause of this?

A. You used the wrong compiler.
B. You did not update your PATH variable.
C. You compiled the code with wrong library.
D. You forgot to put the library path inld.so.conf
Answer: D
Explanation:

QUESTION NO: 19
Where can lilo place boot code?


A. The boot ROM
B. The boot RAM
C. The /boot partition
D. The MBR on a hard drive
Answer: D
Explanation:

QUESTION NO: 20

Where does lilo store its boot information?

A. Boot ROM
B. BootRAM
C. Master Boot Record
D. /boot partition
Answer: C
Explanation:

QUESTION NO: 21

To what environment variable will you assign or append a value if you need to

tell the
dynamic linker to look in a build directory for some of a program's shared

libraries?

A. LD_LOAD_PATH
B. LD_LIB_PATH
C. LD_LIBRARY_PATH
D. LD_SHARE_PATH
E. LD_RUN_PATH
Answer: C
Explanation:

QUESTION NO: 22

Which command will allow you to find a specific installed package?

A. rpm -- list rpmname
B. rpm -qvl rpmname
C. rpm rpmname
D. rpm -qv rpmname
E. rpm -f rpmname
Answer: D
Explanation:

Explanation : To query the package whether, package is installed or not : rpm

-qv rpmname
example: rpm -qv ncurses à It shows rpm fullname, version if installed

otherwise it will
display package is not installed.Installed package options: rpm -qa à Lists all

installed
packages rpm –qf filename à Shows owning package rpm -qi rpmname à General
Information of Package rpm –ql rpmname à Shows all files owning by this package

QUESTION NO: 23

Which of the following is very important when installing from source code

(Check TWO that
apply)?

A. Read all documentation included with the source code.
B. Reboot after installing all programs.
C. Manually check to see if all dependencies are met.
D. Use rpm or dpkg goverify the installation.
E. Do not install binaries as the root user.
Answer: A,C
Explanation:

QUESTION NO: 24 CORRECT TEXT

You are building a server that will have many hardware and operating system

upgrades.
The server is the file server for all users on your 100 user network. Which

directory should
have its own mountpoint and/or hard drive?

Answer: /home

QUESTION NO: 25 CORRECT TEXT

The ________ partition is used for virtual memory.

Answer: swap

QUESTION NO: 26

You are building a server that will undergo many hardware and operating system

upgrades.
The server is the file server for all users on your 100 user network. Which

directory should
have its own mountpoint and/or hard drive?

A. /boot
B. /sbin
C. /home
D. /etc
Answer: C
Explanation:

QUESTION NO: 27

What file is read by the program ldconfig?

A. /lib/ld.so
B. /etc/ld.so.conf
C. /etc/ld.so.cache
D. /etc/modules.conf
Answer: B
Explanation:

QUESTION NO: 28

After a minor security incident you are instructed by your lead sys-admin to

verify the
RPM's installed on a running system. Which command will create a complete

report which
you can analyze for changes which may be security related?

A. rpm -Va >report
B. rpm -Qavy >report
C. rpm -Vqt --nomd5 >report
D. rpm --checkfiles >report
E. rpm -Va --nofiles >report
Answer: A
Explanation:

QUESTIONNO: 29
You installed a beta rpm package, but are experiencing some problems with it.

How can
you remove this package?A. rpm -qe rpmname

B. rpm -V --remove rpmname
C. rpm -r rpmname
D. rpm -d rpmname
E. rpm -ev rpmname
Answer: E
To uninstall the package, we use the rpm -ev rpmname or rpm --erase rpmname To

install
package: rpm -ivh rpmname : where -I means install, -v means verbose, -h means

display
the Hash marks. To Upgrade rpm: rpm -Uvh rpmname: where -U means Upgrade. To
Freshen Upgrade: rpm –Fvh rpmname

QUESTION NO: 29

You see following output while trying to install an updated package:

[root@example pub]#
rpm –I gthumb-2.2.0.i386.rpm package gthumb- 1.0.1.i386.rpm is already

installed. Which
command will allow you to install the updated version?

A. rpm -i gthumb-2.2.0.i386.rpm
B. rpm -ivh gthumb-2.2.0.i386.rpm
C. rpm -U gthumb-2.2.0.i3S6.rpm
D. rpm -qu gthumb-2.2.0.i386.rpm
E. rpm -qiv gthumb-2.2.0.i386.rpm
Answer: C
Explanation:

QUESTION NO: 30

Which of the following would do the same as the command cat < file1.txt >

file2.txt?

A. cat < file1.txt file2.txt
B. cat file1.txt >file2.txt
C. cat <file1.txt | file2.txt
D. cat file1.txt | file2.txt
E. cp file1.txt>file2.txt
Answer: B
Explanation:

QUESTION NO: 31 CORRECT TEXT
What command is used to display a file in octal format?


Answer: hexdump
Answer: /usr/bin/hexdump

QUESTION NO: 32 CORRECT TEXT

You wish to execute two commands, one after the other. However, you only want

the
second command to execute if the first is successful. Which character(s) do you

put
between the commands on the command line to accomplish this?

Answer: &&

QUESTION NO: 33

In the vi editor, which of the following commands will delete the current line

at the cursor
and the 16 lines following it (17 lines total)?

A. 17d
B. 17dd
C. 17x
D. d17d
E. 16d
Answer: B
Explanation:

QUESTION NO: 34 CORRECT TEXT

You wish to send the output of a command to standard output (stdout) and save

it to a file.
The command to use is ______________. (Do not specify arguments)

Answer: tee

QUESTION NO: 35

As root you have navigated to directory /B. You wish to move all of the files

and directories
from directory /A to directory /B. Which of the following options would be the

most
appropriate command line to execute this task?

A. cp /a/* .
B. mv -f /A/* .
C. mv -Rf/a/* .
D. cp -f /a/* ..
E. cp -rf /A/* /b/
Answer: B
Explanation:

Files and folders are case-sensitive.

QUESTION NO: 36

What key sequence will suspend the current process and return you to a shell

prompt?

A. Ctrl-z
B. Ctrl-c
C. Ctrl-x
D. Ctrl-d
Answer: A
Explanation:

QUESTION NO: 37

Which TWO commands will find the path for the binary vim?

A. man vim
B. whereis vim
C. apropos vim
D. which vim
Answer: B,D
Explanation:

which and whereis command displays the executable path ofcommands. Example:

which
clearàShows actually where clear is stored similarly whereis clear.

QUESTION NO: 38 CORRECT TEXT

What command returns the first few lines of a given file?

Answer: head

QUESTION NO: 39

What command changes the priority of the process running with process id of

12345 to the
highest priority?

A. /usr/bin/renice +20 1234
B. /usr/bin/renice -20 12345
C. /bin/setpriority +20 12345
D. /bin/setpriority -20 12345
Answer: B
Explanation:

To change the priority of runningprocess we use the renice command. Default

priority is 0,
highest priority is -20 and lowest priority is 19. The path of renice command

is
/usr/bin/renice.

QUESTION NO: 40

You want to save vi changes to the file myfile with :w!, but vi complains it

can not write to
the file. Therefore, you want to check the write permissions on the file. To do

this without
leaving vi, you type:

A. :!ls -l myfile
B. :\ls -l myfile
C. esc :ls -l myfile
D. :?ls -l myfile
Answer: A
Explanation:

QUESTION NO: 41

Which of the following GNU commands would be the most likely command you'd use

to
find the system load average?

A. top
B. nice
C. loadavg
D. cpustat
E. ps
Answer: A
Explanation:

The top program provides a dynamic real-time view of a running system. It can

display
system summary information as well as a list of tasks currently being managed

by the
Linux kernel. The types of system summary information shown and the types,

order and
size of information
displayed for tasks are all user configurable and thatconfiguration can be made

persistent
across restarts.

QUESTION NO: 42

Which of the following commands is equivalent to kill 1234?

A. kill -1 1234 or kill -s SIGHUP 1234
B. kill -2 1234 or kill -s SIGINT 1234
C. kill -3 1234 or kill -s SIGQUIT 1234
D. kill -9 1234 or kill -s SIGKILL 1234
E. kill -15 1234 or kill -s SIGTERM 1234
Answer: E
Explanation:

QUESTION NO: 43

What command would execute cmd1 followed by cmd2, regardless of the exit status

of
cmd1?

A. cmd1 cmd2
B. cmd1 | cmd2
C. cmd1 ; cmd2
D. cmd1 &&cmd2
E. cmd1 || cmd2
Answer: C
Explanation:

QUESTION NO: 44 CORRECT TEXT

You have a text file with tab-separated values, but your application needs them

space-
separated. What command would you use from the Bash shell to achieve this?

Please fill in
the command only, without any options.

Answer: expand

Explanation: The expand command is used to convert from tab to space. Example:

expand
-t 2 test a. It will convert the tab into two spaces.

QUESTION NO: 45

Which command will print to standard out only the lines that do not begin with

# (pound
symbol) in the file foobar?

A. /bin/grep ^# foobar
B. /bin/grep -v ^# foobar
C. /bin/grep #$ foobar
D. /bin/grep -v #$ foobar
Answer: B
Explanation:

QUESTION NO: 46

What command will remove duplicate lines from a sorted file?

A. filter
B. trim
C. uniq
D. wc
Answer: C

Explanation:
uniq - remove duplicate lines from a sorted file

QUESTION NO: 47

Which command line option would you use to restrict the GNU find command to

searching
a particular number of subdirectories?

A. --max-dirs
B. -dirmax
C. -maxdepth
D. -s
E. -n
Answer: C
Explanation:

QUESTION NO: 48

What is the disadvantage of using the command kill -9 ?

A. A core dump file will be created.
B. It affects the entire process group.
C. It makes excessive use of systemresources.
D. The action can be blocked by buggy or malicious processes.
E. The affected process is unable to clean up before exiting.
Answer: E
Explanation:

Topic 2, Volume B

QUESTION NO: 49

To prevent a command run as root from sending both standard out (stdout) and

standard
error (stderr) to any terminal or other file or device, which of the following

strings should
be appended to the command?

A. >/dev/null
B. >/dev/null 1>&2
C. >/dev/null 2>&1
D. 1>&2 >/dev/null
E. 2>&1 >/dev/null
Answer: C
Explanation:

QUESTION NO: 50

You want to search the file myfile for all occurances of string containing at

least five
characters, where character number 2 and 5 are 'a' and character number 3 is

NOT 'b'.
Which command would you use?

A. grep a*^b*a myfile
B. grep .a[^b].a myfile
C. grep .[a].*.[a] myfile
D. grep .a*^b..a myfile
Answer: B
Explanation:

QUESTION NO: 51

What does the following command do? cat '$TEST'

A. Displays a bash syntax error message.
B. Displays the contents of the file named $TEST if it exists.
C. Waitsfor the user to enter text and then echos the text back.
D. Displays the contents of the file named inside the back quotes.
E. Displays the contents of the named by the environment variable TEST.
Answer: B
Explanation:

QUESTION NO: 52

You want to the command foo to take its input from the file foobar and send its

output to
the program bar. Which of the following command lines will do this?

A. foo < foobar | bar
B. foo < foobar > bar
C. foo | foobar > bar
D. foo | bar < foobar
E. foo > bar < foobar
Answer: A
Explanation:

QUESTION NO: 53
Which of the following commands would display the lines containing capital

letters form

the file "turkey.txt"?

A. cat turkey.txt|wc -|
B. grep -n [A-Z] turkey.txt
C. cat turkey.txt|wc -w [A-Z]
D. grep -v [A-Z] < turkey.txt
E. for [A-Z]in turkey.txt | count
Answer: B
Explanation:

QUESTION NO: 54

In Bash, inserting "1>&2" after a command redirects

A. standard error to standard input
B. standard input to standard error
C. standard output to standard error
D. standard error to standard output
E. standard output to standard input
Answer: C
Explanation:

QUESTION NO: 55

Identify the proper device for the third partition, on the second hard disk, on

the first IDE
controller on a PC system.

A. /dev/hdb3
B. /dev/hd1b3
C. /dev/hdc1b3
D. /dev/hdc1d2p3
Answer: A
Explanation:

Harddisk Recognization Primary Master /dev/hda Primary Slave /dev/hdb Secondary

Master
/dev/hdc Secondary Slave /dev/hdd According To question, Device name is

/dev/hdb and
paratition number is 3. /dev/hdb3

QUESTION NO: 56

What umask will set the file permissions on a newly created file to -rw-r--r--

(644)?

A. 0002
B. 0022
C. 0224
D. 0246
Answer: B
Explanation:

umask command is used to display and set the default permissions. Here in
questionasking for the umask value of newly created file having permission

QUESTION NO: 57

Which command will create an ext3 filesystem on /dev/hda2?

A. /sbin/mke2fs -d /dev/hda2
B. /sbin/mke2fs -j /dev/hda2
C. /sbin/mke2fs -m 3 /dev/hda2
D. /sbin/mke2fs -c ext3 /dev/hda2
Answer: B

Explanation:

mke2fs - create an ext2/ext3 filesystem -j Create the filesystem with an ext3

journal. If the –j
option is not specified, the default journal parameters will be used to create

an
appropriately sized journal (given the size of the filesystem) stored within

the filesystem.
Note that you must be using a kernel, which has ext3 support in order to

actually make use
of the journal.

QUESTION NO: 58

What is the proper option to put in /etc/fstab to enable group quotas for a

particular
parition?

A. groupquota
B. grpquota
C. groupquoatas
D. grpquotas
Answer: B
Explanation:

QUESTION NO: 59

Which utility would you use to change how often a filesystem check was

performed over an
EXT2 filesystem (without losing any data stored on that filesystem)?

A. mod2fs
B. fsck
C. tune2fs
D. mke2fs
E. fixe2fs
Answer: C

Explanation:

QUESTION NO: 60

To allow a regular user account to mount and unmount a filesystem (for

instance, a cdrom
or floppy), which option will need to be added to the corresponding line in

/etc/fstab?

A. nouidchk
B. alluser
C. user
D. auto
Answer: C
Explanation:

Answer C is correct. user options is used to allow an ordinary user to mount

the file
system. The name of the mounting user is written to mtab so thatuser can

unmount the file
system again.

QUESTION NO: 61

You have run out of disk space on a partition. Which of the following would be

an easy way
to move data to a new partition without reconfiguring the path to the data in

existing
applications?

A. Run ext2fs ACL.
B. Use a hard link.
C. Use a symbolic link.
D. Use the loopback device.
E. Create a block device offset.
Answer: C
Explanation:

A Symbolic link points to another file and the contents of link file is

referenced file. So,
symbolic linkedfile occupied the very less space the original file.

QUESTION NO: 62

What TWO permissions must a user have in order to run a shell script?

A. read
B. write
C. execute
D. browse on the directory
E. users cannot run shell scripts
Answer: A,C
Explanation:

QUESTION NO: 63 CORRECT TEXT

Which command (without options) would you use to display how much space is

available
on all partitions?

Answer: df
Answer: /bin/df

QUESTION NO: 64

You are using quota on your system. How can you see disk quota details?

A. repquota
B. quota -l
C. quota
D. quotachech
E. quota --list

Answer: A
Explanation:

QUESTION NO: 65

You are experimenting with a binary in /tmp/foo.d that expects its

configuration file at
/etc/foo.conf. You don't want to save it there, but use a symbolic link to

/tmp/foo.d/foo.conf
instead. Which command would accomplish that?

A. ln -s /tmp/foo.d/foo.conf /etc/foo.conf
B. ln /tmp/foo.d/foo.conf /etc/foo.conf
C. ln -s /etc/foo.conf /tmp/foo.d/foo.conf
D. ln /etc/foo.conf /tmp/foo.d/foo.conf
Answer: A
Explanation:

Thereare two types of link a. Soft link b. Hard link.

b. Soft link à Can create for directory also, can span multiple partitions but

available until
and unless Original Files remain. Syntax for Soft link ln -s originalfile

linkfile
b. Hard link à One separate Physical File, can't create for directory, can't

span multiple file
but remains the link file if original file removed.
Syntax for Hard link ln originalfile linkfile
QUESTION NO: 66

Which of the following Linux filesystems pre-allocates a fixed number of inodes

at the
filesystem's make/creation time, and does NOT generate them as needed?

A. ext3
B. jfs
C. reiserfs
D. xfs
Answer: A

Explanation:

QUESTION NO: 67

You have just added a CD-ROM drive (/dev/hdd) to your system and have added it

to your
fstab. Typically you can use which of the following commands to mount media in

that drive
to /mnt/cdrom?

A. mount/dev/cdrom/mnt/cdrom
B. mount/dev/cdrom
C. mount -t cdrom/dev/cdrom/mnt/cdrom
D. mount/mnt/cdrom
E. automount/mnt/hdd/mnt/cdrom
Answer: D
Explanation:

QUESTION NO: 68 CORRECT TEXT

You have written a custom tool on your local system. Following the Filesystem

Hierarchy
Standard (FHS), where should you install the binaries to be available to all

users on your
system? Answer:

Answer: /usr/local/bin
Answer: /usr/local/bin/

QUESTION NO: 69
What does the command mount -a do?


A. It mounts the floppy disk for all users.
B. It shows all mounted file systems.
C. It opens /etc/fstab to edit.
D. It mounts all file systems listed in /etc/fstab.
Answer: D
Explanation:

QUESTION NO: 70

What would the following line accomplish if run as root? chown -R bert

/home/bert/*

A. Nothing, this command is invalid.
B. It would revoke bert's ownership of all files in /home/bert to bert.
C. It would change user ownership of all files in /home/bert to bert.
D. It would set the group ownership of the directory /home/bert to bert
E. It would set ownership of all files and subdirectories in /home/bert to bert
Answer: E
Explanation:

QUESTION NO: 71

Which one of the following programs will only find files that are in your PATH?

A. locate
B. slocate
C. which
D. find
Answer: C
Explanation:






QUESTION NO: 72

What does the Filesystem Hierarchy Standard enable? (Select TWO answers)

A. Software to predict the location of installed files and directories
B. Software to predict theownership and access rights of installed files and

directories
C. Users to predict the location of installed files and directories.
D. Users to predict how the filesystem should be formatted according to need.
Answer: A,C
Explanation:

QUESTION NO: 73

You want the default permissions for your files to be -rw-r----- . HOW must you

set umask?

A. 037
B. 640
C. 038
D. 027
Answer: D
Explanation:

QUESTION NO: 74







Which chown command will change the ownership to foo and the group to bar on a

file
named biglist?

A. chownfoo/bar biglist
B. chown -u foo -g bar biglist
C. chown foo:bar biglist
D. chown --user foo --group bar biglist
Answer: C
Explanation:

QUESTION NO: 75

Which of the following programs will only find files that are in your PATH?

A. locate
B. slocate
C. which
D. find
Answer: C
Explanation:

QUESTION NO: 76

Which option must be listed in /etc/fstab to activate user quotas

automatically?

A. quota
B. user
C. quotaon
D. usrquota

Answer: D
Explanation:

To implement quota in partitions, we should mount withusrquota for user quota,

grpquota
for group quota. Example of mounting /home using usrquota and grpquota options.
LABEL=/home /home ext3 defaults,usrquota,grpquota 1 2

QUESTION NO: 77

Which of the following commands makes /bin/foo executable by everyone but only

writable
by its owner?

A. chmod 557 /bin/foo
B. chmod o +rwx, a+rx /bin/foo
C. chown 557 /bin/foo
D. chmod 755 /bin/foo
Answer: D
Explanation:

QUESTION NO: 78

You are having problems with a particular font and you want to see if its

directory is
included in XF86Config. Which section contains this information?

A. Paths
B. Fonts
C. Files
D. Graphics
Answer: C
Explanation:


/usr/x16r6/lib/fonts

QUESTION NO: 79

You have just set up the X Display Manager as your default display manager.

What file
should you

edit to change the default background for it?

A. /etc/X11/xdm/Xsetup
B. /etc/X11/prefdm
C. /etc/X11/XF86Config
D. /etc/X11/xdm.conf
Answer: A
Explanation:

QUESTION NO: 80

Which of the following lines from /etc/X11/XF86Config indicates what fonts can

be found on
a font server?

A. FontPath= server
B. Fonts "unix/:7100"
C. FontPath "unix/:7100"
D. Fonts= server
E. Fontserver = "servername"
Answer: C
Explanation:


QUESTION NO: 81

You are the system administrator for a consulting firm where several people use

Linux as
their desktop operating system. One of your users has installed a commercial

publishing
program that works under X on a variety of UNIX and Linux platforms. The user

made a
series of configuration changes regarding the initial window size, location and

color. Now,
he is having difficulty undoing these changes and is asking for your help. In

which file
would you think you would most likely find the configuration settings you are

seeking to
change?

A. ~/.xinitrc
B. ~/.xconfig
C. ~/.Xdefaults
D. ~/.XF86Config
E. /etc/X11/XF86Config
Answer: C
Explanation:

QUESTION NO: 82

You are using an application that you want to appear on the screen of another

machine.
What environment variable would you have to set or edit to achieve this?

A. DISPLAY
B. REMOTE
C. REMOTE_XWINDOW
D. SCREEN
Answer: A
Explanation:

To share the terminal between multiple hosts, we can export display.
Example


Suppose you want to run application on Certkiller B from Certkiller A.

Certkiller B in GUI
Terminal:# xhost +192.168.0.1 Certkiller A in GUI Terminal:# export

DISPLAY=192.168.0.2:0
# Xterm

QUESTION NO: 83

After installing and configuring Xfree86, you notice that when you start X, the

display is not
centered. What program can you run to find a better modeline setting?

A. XF86Setup
B. xf86config
C. xvidtune
D. xvideoagent
Answer: C
Explanation:

QUESTION NO: 84 CORRECT TEXT

You are running X in networked environment. You want to allow anyone on your

network to
display their X applications on your desktop. What command can you use to

disable all
access control for X?

Answer: xhost +

QUESTION NO: 85

You just started X for the first time and noticed that the display does not use

the entire
screen. What program can you use to fix this?


A. xvidtune
B. xf86config
C. XF86Setup
D. tweakscreen
Answer: A
Explanation:

QUESTION NO: 86

Which of the following is the default XFree86 configuration file?

A. /usr/X11R6/etc/XF86Config
B. /var/X11/XF86Config
C. /etc/X11/XF86Config
D. /usr/etc/X11/XF86Config
Answer: C
Explanation:

QUESTION NO: 87

You have just set up the Gnome Display Manager as your default display manager.

What
file should you edit to change the default greeting for it?

A. /etc/X11/prefdm
B. /etc/X11/XF86Config
C. /etc/X11/gdm.conf
D. /etc/X11/gdm/lnit/Default
Answer: D

Explanation:

QUESTIONNO: 90
The command cat /proc/dma will show you what?


A. Whether DMA is enabled
B. Which DMA channels are in use
C. Which DMA mode is in use
D. General information about DMA on the machine
Answer: B

Explanation /proc/dma This file contains alist of the registered ISA direct

memory access
(DMA) channels in use. A sample /proc/dma files looks like the following:

4: cascade
It shows whether DMA is enabled or not.
QUESTION NO: 88

You are formatting a single hard disk for a Linux install. What is the maximum

number of
primary partitions you can create?

A. 0
B. 1
C. 2
D. 3
E. 4
F. 5
Answer: E
Explanation:


Generally in one System we can connect four Physical Harddisks. As a Primary

Master,
Primary Slave, Secondary Master,Secondary Slave. In One System: Either four

Primary
partitions or 1 Primary or 2 Primary or 3 Primary + 1 extended and all logical

partitions will
be create under extended partations. Hardisk device recognized as follows

Primary Master
: /dev/had Primary Slave : /dev/hdb Secondary Master : /dev/hdc Secondary Slave

:
/dev/hdd Suppose you have only single harddisk and going to install Linux,

Maximum you
can create 4 primary partitions. If you create four primary partitions you

can't create
extended partitionsthat mean no logical partitions can create.

QUESTION NO: 89

After a minor security incident you are instructed by your lead sys-admin to

verify the
RPM's installed on running system. Which command will create a complete report

which
you can analyze for changes which may be security related?

A. .rpm-Va>report
B. rpm-Qavy > report
C. rpm-Vqt-- nomd5>report
D. rpm-checkfiles >report
E. rpm-Va-nofiles > report
Answer: A
Explanation:

QUESTION NO: 90 CORRECT TEXT

You are compiling some software from source. After running ./configure with the
appropriate arguments and no errors, what is the next command to run?

Answer: make

Explanation: The purpose of the make utility is to determine automatically

which
pieces of a large program need to be recompiled, and issue the commands to

recompile

them. example C programs, since they are most common, but you can use make with

any
programming language whose compiler can be run with a shell command. In fact,

make is
not limited to programs. You can use it to describe any task where some files

must be
updated automatically from others whenever the others change.

To prepare to use make, you must write a file called the makefile that

describes the
relationships among files in your program, and the states the commands for

updating each
file. In a program, typically the executable file is updated from object files,

which are in turn
made by compiling source files.

QUESTION NO: 91

You have two shell scripts, foo and bar. You wish to have bar execute if foo

returns an exit
status of 0 Select the correct command:

A. foo; bar
B. foo || bar
C. foo && bar
D. foo % bar
Answer: C
Explanation:

&& ?Logical AND Operator || ?Logical OR Operator ! ?Logical NOT Operator

Correct
Answer is C because first tried to execute foo. If foo executes without any

error then
executes bar. If any error occurs in foo then exit from command.

QUESTION NO: 92

In order to append the output of ls to a file called bazz, which of the

following command
lines would you use?

A. ls >bazz
B. ls >& bazz
C. ls &> bazz
D. ls >> bazz
Answer: D
Explanation:
The correct answer is ‘ls >> bazz’ because it is appended.

QUESTION NO: 93

Which command is used to dump files in octal format?

A. od
B. octdump
C. dumpoct
D. cat -o
Answer: A
Explanation:

Answer A is correct. od command dump files in octal and other formats. Example:

od test it
will display the all contents of file in octal format.

QUESTION NO: 94

You have created a really long letter and after you are done, you notice that

you used the
name "Bob" many times but your forgot to capitalize it in many instances. Which

command
would you replace "bob" with "Bob" in all instances and generate a new letter

for printing?

A. sed `/bob/Bob' letter > newletter
B. sed s/bob/Bob/ letter < newletter
C. sed `s/bob/Bob' letter >newletter
D. sed `s/bob/Bob/g' letter > newletter
E. sed s/bob, Bob/' letter > newletter
Answer: D
Explanation:

QUESTION NO: 95

You are logged in as user tux1, but now you want to switch users to tux2 with

tux2's
environment. How would you do this?

A. su tux2
B. su -e tux2
C. su - tux2
D. su -m tux2
E. su -f tux2
Answer: C
Explanation:

QUESTION NO: 96

You wish to kill a process with a PID of 123. Select the command which will

allow the
process to "clean up" before exiting.

A. kill -1 123
B. kill -9 123
C. kill -15123
D. kill -17 123
Answer: C
Explanation:

To terminate the process we use kill command. But we should know the process

ID. In
QUESTION:s PID is specified to 123. Syntax of kill command is: kill signal PID

Where -9 is
the powerful signal then other signal which kill the process.


QUESTION NO: 97

You have read/write permission on an ordinary file foo. You have just run ln

foo bar. What
would happen if you ran rm foo?

A. foo and bar would both be removed.
B. foo would be removed whilebar would remain accessible.
C. foo would be removed. bar would still exist but would be unusable.
D. Both foo and bar would remain accessible.
E. You would be asked whether bar should be removed.
Answer: B
Explanation:

Topic 3, Volume C

QUESTION NO: 98

Which command will print line numbers before each line in a file?

A. ln
B. nl
C. cat -n
D. numline
Answer: B
Explanation:

QUESTION NO: 99

You need to create a simple hierarchy of directories:

images/photos/summer/ottawa/. None
of the directories on that path exists. What command will create all of the

needed
directories in one step?

A. mkdir -r images/photos/summer/ottawa/
B. mkdir -R images/photos/summer/ottawa/
C. mkdir -p images/photos/summer/ottawa/
D. mkdir -P images/photos/summer/ottawa/
E. mkdir -m images/photos/summer/ottawa/
Answer: C
Explanation:

-p options means no error if existing, make parent directories as needed. It

will creates the
directory images/photos/summer/Ottawa. Where images is the parent directory of

photos,
photos is theparent directory of summer etc.

QUESTION NO: 100

While using the vi editor, you wish to move ahead one page. You should press

the control
key and:

A. A
B. D
C. F
D. U
Answer: C
Explanation:

To move screen in vi Editor, F à go forwardone full screen B à go back one full

screen D à
go down half screen U à go up half screen

QUESTION NO: 101

You enter the command date +%M. Wat does the output show you?

A. the current year
B. the current month
C. the current hour
D. the current minute
E. the current second
Answer: D
Explanation:

date command displays the current date and time information as well as we can

set new
date and time to system by supplying -s option. To display time: date +%T To

display
Minute: date +%M To display Month : date +%m%% a literal % %a locale's

abbreviated
weekday name (Sun..Sat) %A locale's full weekday name, variable length
(Sunday..Saturday) %b locale's abbreviated month name (Jan..Dec) %B locale's

full month
name, variable length (January..December) %c locale's date and time (Sat Nov 04

12:02:33
EST 1989) %C century (year divided by 100 and truncated to an integer) [00-99]

%d day of
month (01..31) %D date (mm/dd/yy) %e day of month, blank padded ( 1..31) %F

same as %Y%
m-%d %g the 2-digit year corresponding to the %V week number %G the 4-digit

year
corresponding to the %V week number %h same as %b %H hour (00..23) %I hour

(01..12) %j
day of year (001..366) %k hour ( 0..23) %l hour ( 1..12) %m month (01..12) %M

minute (00..59)
%n a newline %N nanoseconds
(000000000..999999999) %p locale's upper case AM or PM indicator (blank in many

locales)
%P locale's lower case am or pm indicator (blank in many locales) %r time, 12-

hour
(hh:mm:ss [AP]M) %R time, 24-hour (hh:mm) ond %t a horizontal tab %T time, 24-

hour
(hh:mm:ss) %U week number of year with Sunday as first day of week (00..53) %V

week
number of year with Monday as first day of week (01..53) %W week number of year

with
Monday as first day of week (00..53) %x locale's date representation (mm/dd/yy)

%Xlocale's
time representation (%H:%M:%S) %y last twodigits of year (00..99) %Y year

(1970...) %z
RFC-2822 style numeric timezone (-0500) (a nonstandard exten- sion)
%Z time zone (e.g., EDT), or nothing if no time zone is deter- minable

QUESTION NO: 102

When you are looking for brief information about a program in your PATH with

its
associated man pages, you would use ...

A. which
B. whereis
C. locate
D. where
Answer: B
Explanation:

Whereis - locate the binary, source, and manual page files for a command

Syntax: whereis
[options] command Options: -b à Search only for binaries -m à Search only for

manual
section -s à Search only for sources.

QUESTION NO: 103

Which command will print out the attributes of the file foobar?

A. ls --attrfoobar
B. lsattr foobar
C. printattr foobar
D. fileattr foobar
Answer: B
Explanation:

lsattr - list file attributes on a Linux second extended file system

QUESTION NO: 104

Which of the following commands will list the quota for the user foobar?

A. repquota foobar
B. quota foobar
C. lsquota foobar
D. printquota foobar
Answer: B
Explanation:

quota - display disk usage and limits. Quota displays user's disk usage and

limits. By
default only the user quotas are printed. Either quota -uusername Or quota

username To
display group quota: quota -g groupname

QUESTION NO: 105

The command mkfs -t ext3 /dev/hdb1 -T largefile creates what size of inode?

A. 4 kilobyte
B. 1 megabyte
C. 2 megabyte
D. 4 megabyte
Answer: B
Explanation:

-T fs-type : Specify how the filesystem is going to be used, so that mke2fs can

choose
optimal filesystem parameters for that use. Some Filesystem type are: news :

One inode
per 4kb
block largerfile : one inode per megabyte largerfile4 : one inode per 4

megabytes

QUESTION NO: 106

In XF86Config which section is concerned with fonts?

A. the Fonts section
B. The Files section
C. The xfsCodes section
D. The Graphics section
E. The modeline section
Answer: B
Explanation:

QUESTION NO: 107

You have a USB storage device that you cannot get working. You have enabled all
appropriate USB options in the latest 2.2 kernel but still cannot get your

device working.
What is most likely the source of the problem?

A. You have not configured your usb.usermap properly
B. You are using the wrong kernel for this type of device
C. The USB device is not USB 2.0 compliant
D. There is a USB resource conflict
Answer: B
Explanation:

QUESTION NO: 108 CORRECT TEXT

Which utility can be used to convert a . rpm package to .deb package format?

(Without
arguments)

Answer: alien

QUESTION NO: 109

What is a reasonable command to uninstall a Debian package from your system?

A. dpkg -Ra pkgname
B. dpkg -R pkgname
C. dpkg -r pkgname
D. dpkg -ra pkgname
Answer: C
Explanation:

QUESTION NO: 110

You want to install a new software package, but it is only available in RPM

format and you
are running Debian Linux. Which of the following would help you to install it

on your
system?

A. alien
B. apt-conf
C. dselect
D. cpio
Answer: A
Explanation:

QUESTION NO: 111

What command will uninstall a package but leave its configuration files in case

a package
is re-installed?

A. none, no command will do this
B. dpkg -s pkgname
C. dpkg -L pkgname
D. dpkg -P pkgname
E. dpkg -r pkgname
Answer: E
Explanation:

QUESTION NO: 112

You have not run apt-get on a system for some time, but it has been run on the

system
before. What apt-get command would you run to download the latest list of

packages, but
not the packages themselves?

A. apt-get build-dep
B. apt-get mirror-select
C. apt-getupdate
D. apt-get upgrade
E. apt-get dist-upgrade
Answer: C
Explanation:

QUESTION NO: 113

You want to examine the changelog for the installed package postfix. Which

command will
display the changelog?

A. rpm -Vc postfix
B. rpm -qpil postfix
C. rpm --changelogpostfix
D. rpm -q --changelog postfix
E. rpm -qa --changelog postfix
Answer: D
Explanation:






QUESTION NO: 114 CORRECT TEXT

In a networked environment, what command will grant anybody permission to

display their
X applications on a desktop? (Include both the command and argument(s).)

Answer: xhost +

QUESTION NO: 115 CORRECT TEXT

Which file the /proc filesystem lists parameters passed from the bootloader to

the kernel?

Answer: cmdline
Answer: /proc/cmdline

QUESTION NO: 116

Which Debian package system command will list all partially installed packages

and
suggest how to get them correctly installed?

A. dpkg -C
B. apt-get -u
C. dpkg -Dh
D. dpkg -l
E. apt-get -y
Answer: A
Explanation:

QUESTION NO: 117 CORRECT TEXT

Which environment variable you have to setup to use shared libraries that are

not in the
standard search path?

Answer: LD_LIBRARY_PATH

QUESTION NO: 118

What single command (no options or arguments) can be used to fully extract a

file called
abc.tar.bz2?

A. gzip
B. gunzip
C. tar
D. bz2unzip
Answer: C
Explanation:

QUESTION NO: 119

A Makefile typically contains which targets?

A. CFLAGS, CPPFLAGS, LIBS, LDFLAGS
B. clean, install, uninstall
C. PATHS, DESTDIR, LIBS, LDFLAGS
D. prefix, exec_prefix, bindir, mandir
Answer: B
Explanation:

QUESTION NO: 120

You have finished updating and resolving dependencies for some source code.

What
command should you run before recompiling the code into binary form?

A. make clean
B. make all
C. makedep
D. make install
Answer: A
Explanation:

QUESTION NO: 121

What is the difference between the --remove and the--purge action with the dpkg
command?

A. --remove removes the program, --purge also removes the config files
B. --remove only removes the program, --purge only removes the config files
C. --remove removes a package, --purge also removes all packages dependent onit
D. --remove removes only the package file itself, --purge removes all files

related to the
package
Answer: A
Explanation:

QUESTION NO: 122

Which RPM command will output the name of the package which installed the file
/etc/exports?






A. rpm -F /etc/exports
B. rpm -qf /etc/exports
C. rpm -Kl /etc/exports
D. rpm -qp /etc/exports
E. rpm -ql /etc/exports
Answer: B
Explanation:

QUESTION NO: 123

Which file should be edited to select the network locations from which Debian

installation
package files are loaded?

A. /etc/dpkg/dpkg.cfg
B. /etc/apt/apt.conf
C. /etc/apt/apt.conf.d
D. /etc/apt/sources.list
E. /etc/dpkg/dselect.cfg
Answer: D
Explanation:

QUESTION NO: 124

Which command will list all the files installed from the RPM package file

named, vorbistools-
1.1.i386. rpm?

A. rpm -qf vorbis-tools-1.1.i386.rpm
B. rpm- F vorbis-tools-1.1.i386.rpm
C. rpm -pf vorbis-tools-1.1.i386.rpm
D. rpm -ql vorbis-tools-1.1.i386.rpm
E. rpm -qlp vorbis-tools-1.1.i386.rpm
Answer: E
Explanation:

QUESTION NO: 125

Which of the following programs is typically used to query installed debian

packages?
(Please select TWO that apply)

A. dpkg
B. apt-cache
C. apt-conf
D. dselect
Answer: A,D
Explanation:

QUESTION NO: 126 CORRECT TEXT

You are formatting a single hard disk for a Linux install. What is the maximum

number of
primary partitions you can create?

Answer: 4
Answer: four

QUESTION NO: 127

An installed package is broken. In order to go back to the previous version of

the same
package which RPM option should be used?

A. --replacefiles
B. --replacepkgs
C. --oldpackage
D. --nodeps
Answer: C
Explanation:

QUESTION NO: 128

George is planning a partition scheme for a new Linux installation. Which THREE
directories should he consider for separate partitions? (Select three)

A. /etc
B. /home
C. /var
D. /lib
E. /tmp
Answer: B,C,E
Explanation:

QUESTION NO: 129 CORRECT TEXT

USB fax/modems that conform to this subclass of the Communication Device Class

(CDC)
vendor neutral standard are Linux compatible (answer is a 3 letter acronym)

Answer: acm

QUESTION NO: 130 CORRECT TEXT

The _____________ command displays ISA plug-and-play devices resource

information.

Answer: pnpdump

QUESTION NO: 131

All items are required to enable USB support on a Linux system EXCEPT.

A. A kernel that has USB driver support
B. A USB 2.0 compatible device
C. A supported controller chipsuch as DHCI, UHCI, or EHCI
D. A kernel that supports hot-pluggable devices
Answer: B
Explanation:

QUESTION NO: 132

You are running Linux 2.0.36 and you need to add a USB mouse to your system.

Which of
the following statements is true?

A. You need to rebuildthe kernel
B. You need to upgrade the kernel
C. You need to load the USB modules for your existing modular kernel
D. USB support is not available in Linux
Answer: B
Explanation:

QUESTION NO: 133

In order to save and restore your sound card's configuration between sessions,

the ALSA
sound system uses what program?

A. setalsa
B. setsound
C. soundctl
D. alsactl
E. alsaset
Answer: D
Explanation:

QUESTION NO: 134

According to the File System Hierarchy Standard, the lost+found directory is

used for:

A. files withunknown owners
B. missing device files found by/proc
C. unknown binary files found by find
D. unlinked files found by fsck
Answer: D
Explanation:

QUESTION NO: 135

The sticky bit is usually set on

A. /var/log
B. /tmp
C. /home
D. log liles
Answer: B
Explanation:

QUESTIONNO: 139
How can you turn off the group quota in /pub?


A. quotaoff /pub
B. quotaoff -gv /pub
C. quotadown /pub
D. rm /pub/quota.group
Answer: B

QUESTION NO: 136

You are looking for an executable file foo. Select the command that would

search for foo
within directories set in the shell variable, PATH.

A. locate
B. which
C. find
D. query
E. whereis
Answer: B
Explanation:

QUESTION NO: 137
What key combination is used to forcibly halt the X server in the event of the

graphical session becoming unusable (e.g., desktop manager or full screen

application hanging)?

A. press CTRL+ALT+DEL
B. press CTRL+ALT+BACK_SPACE
C. press CTRL+ALT+DEL twice
D. press CTRL+ALT+F1 then run
Answer: B
Explanation:

QUESTION NO: 138

The X program _________ is often used to make minor keyboard adjustments, like

proper
Back

space/Delete mapping.

A. xkbdmap
B. kbdmap
C. xmodmap
D. modmap
Answer: B
Explanation:

QUESTION NO: 139

Users may create and edit a configuration file in their home directory that can

tell the X
window system what window manager they wish it to start when they log in. What

file is
that?

A. $HOME/.wmrc
B. $HOME/.startx
C. $HOME/.Xdefaults
D. $HOME/.xserverrc
E. $HOME/.xinitrc
Answer: E
Explanation:

QUESTION NO: 140

The system bell sound is annoying you. Which of the following can you use to

change this
and other user X preferences?

A. xset
B. xconf
C. xbell
D. xmag
E. xpref
Answer: A
Explanation:

QUESTION NO: 141 CORRECT TEXT
What application can be used in place of xhost? Please enter only the name

without path.


Answer: xauth

QUESTION NO: 142 CORRECT TEXT

What command with all options and/or parameter will send the signal USR1 to any
executing process of program apache2?

Answer: killall -s SIGUSR1 apache2

QUESTION NO: 143

What command line redirection characters instruct the shell to read from the

current input
source until a specific word, on a separate line and without and trailing

spaces, is reached?

A. <<
B. <l
C. !<
D. $<
Answer: A
Explanation:

QUESTION NO: 144

Pressing the Ctrl-C combination on the keyboard while a command is executing in

the
foreground sends which of following signal codes?

A. 1 (SIGHUP)
B. 2 (SIGINT)
C. 3 (SIGQUIT)
D. 9 (SIGKILL)
E. 15 (SIGTEPM)
Answer: B
Explanation:

QUESTION NO: 145 CORRECT TEXT

Consider the following output:
prompt> myapp
[1]+ Stopped myapp
This output was the result of the user pressing the keyboard combination of the

Ctrl key

and what
letter key? Enter only the single (1) letter as your answer

Answer: z

QUESTION NO: 146
What is the output when the following shell script executes?


Cat <<foobar
Hello foobar
foobar


A. The contents of the file foobar
B. Hello
C. No output but a file named foobar is created
D. Hello foobar
E. Hello foobar
Answer: D
Explanation:

Topic 4, Volume D

QUESTION NO: 147
Which of the following commands will display the last 30 lines of

/var/log/bigd.log as well

as new content as it is appended to the file by another process?

A. cut -30 -v /var/log/bigd.log
B. head -30 -e /var/log/bigd.log
C. tail -f -n 30 /var/log/bigd.log
D. tac -30/var/log/bigd.log
E. cat -r -n 30 /var/log/bigd.log
Answer: C
Explanation:

QUESTION NO: 148

You wish to kill a process with a PID of 123. Select the command which will

allow the
process to "clean up" before exiting.

A. kill -1 123
B. kill -9 123
C. kill -15 123
D. kill -17 123
Answer: C
Explanation:

QUESTION NO: 149

Which of the following commands will change all CR-LF pairs in an imported text

file,
userlist.txt, to Linux standard LF characters and store it as newlist.txt?

A. tr '\r\n' '' <userlist.txt > newlist.txt





B. tr -c '\n\r' '' < newlist.txt > userlist.txt
C. tr -d '\r' < userlist.txt > newlist.txt
D. tr '\r' '\n' userlist.txt newlist.txt
E. tr -s '^M' '^J' userlist.txt newlist.txt
Answer: C
Explanation:

QUESTION NO: 150

Which of the following commands will find the string foo in the file filel.txt,

regardless of
foo being in upper or lowercase letters?

A. cat file1.txt | grep -i foo
B. cat file1.txt >grep -n foo
C. grep -i foo | file1.txt
D. grep -n file1.txt < foo
E. grep -n foo file1.txt
Answer: A
Explanation:

QUESTION NO: 151

The command used to determine a file's type is

A. type
B. find
C. file
D. ls
Answer: C
Explanation:

QUESTION NO: 152

Many people like the vi text editor but the default bash command line editor

recognizes
emacs keystrokes. What command entered into abash initialization file will have

bash
recognize vi keystrokes after login?

A. history -p vi
B. alias emacs=vi
C. HISTCMD=vi
D. set -o vi
E. unset emacs
Answer: D
Explanation:

QUESTION NO: 153

You ran out of space and added a eighth disk to your SCSI-I system. When you

try to start,
the system no longer boots. What is most likely the cause of this problem?

A. SCSI-I supports only 8 devicesincluding the adaptor
B. SCSI-I supports only6 disks per adaptor
C. There is a SCSI-ID conflict that causes that problem
D. You forgot to set the SCSI-ID #8 for the new disk
Answer: A
Explanation:

QUESTION NO: 154

Keyboards and mice are members of which class of USB devices?

A. Communication Device Class
B. Human Interface Device Class
C. Mass Storage Device Class
D. Data Interface Device Class
Answer: B
Explanation:

QUESTION NO: 155

Which of the following commands will print the current video settings to stdout

in
XF86Config "Modeline" format?

A. xinfo -mode
B. xset -info
C. xf86config -list
D. xvidtune -show
Answer: D
Explanation:

QUESTION NO: 156
With xorg 7.0, what is the name of the default font server?

A. xfserv
B. xfs
C. fonts
D. xfstt
E. fserv
Answer: B
Explanation:

QUESTION NO: 157

Which of the following is the default Xorg configuration file?

A. /usr/X11R6/etc/xorg.conf
B. /var/X11/xorg.conf
C. /etc/X11/xorg.conf
D. /usr/etc/X11/xorg.conf
Answer: C
Explanation:

QUESTION NO: 158

When you start XWindows, which series of programs and/or scripts would most

closely
describe the start-up process?

A. xdm --> xinit --> xinitrc --> Xclients
B. kde --> xinitrc --> xinit --> Xclients
C. startx --> xinitrc --> Xclients --> kde
D. startx --> xinit --> xinitrc --> Xclients
E. startx-->xinit-->Xclients-->xinitrc

Answer: D
Explanation:

QUESTION NO: 159

Your senior administrator asked you to change the default background of his

machine,
which uses XDM. Which file would you edit to achieve this?

A. /etc/X11/xdm/Xsetup
B. /etc/X11/xdm.conf
C. /etc/X11/xdm/Defaults
D. /etc/X11/defaults.conf
Answer: A
Explanation:

QUESTION NO: 160

When installing XWindows the monitor wasn't recognised but now a data sheet

with its
specification is available. Which xorg.conf section must be edited to specify

the correct
values for several variables?

A. Screen
B. Monitor
C. Border
D. Modeline
E. Device
Answer: B
Explanation:

QUESTION NO: 161

The command echo $! will produce what output?

A. the process id of last background command
B. the exit status of the last command
C. the exit status of the last background command
D. the process id of the current shell
E. the name of the command being executed
Answer: A
Explanation:

QUESTION NO: 162
Given the following output:
Prompt > myapp
[1]+ Stopped myapp
prompt>
Which of the following commands will resume executing the stopped process while


allowing the
user to continue to type commands at the command prompt?


A . bg myapp
A. continue myapp
B. exec myapp
C. fg myapp
D. myapp &
Answer: C
Explanation:
The correct answer is g myapp.
Incorrect answer:
continue myapp
Continue is just used for loops.


QUESTION NO: 163

What command will print a list of usernames (first column) and their

corresponding user id
(uid, third column) from /etc/passwd?

A. cut -d: -fl,3 /etc/passwd
B. chop -c l,3 /etc/passwd
C. tac l-3 /etc/passwd
D. fmt -u /etc/passwd
Answer: A
Explanation:

QUESTION NO: 164 CORRECT TEXT
What command can put suspended jobs into the background?

Answer: bg

QUESTION NO: 165

In order to append the output of ls to a file called bazz, which of the

following command
lines would you use?

A. ls > bazz
B. ls > & bazz
C. ls &> bazz
D. ls >> bazz
Answer: D
Explanation:

QUESTION NO: 166

Which shell built-in command can be used to create a shortcut or pseudonym for

a longer
command?

Assume a modern bourne-like shell, such as bash.

A. shortcut
B. ln
C. sudo
D. link
E. alias
Answer: E
Explanation:

QUESTION NO: 167

Which of the following sed commands will replace all instances of the string

foo with the
string foobar changing the file filel.txt in place?

A. sed 's/foo/foobar/g' file1.txt
B. sed 's/foo/foobar/g' file1.txt > file1.txt
C. sed 's/foo/foobar/g' file1.txt | file1.txt
D. sed -i 's/foo/foobar/g' file1.txt
E. sed -i 's/foo/foobar/g' file1.txt >file1.txt
Answer: D
Explanation:

QUESTION NO: 168

When reading man pages, a lot of extra characters are shown on screen. Which of

the
following commands can help to deal with this problem?

A. col
B. grep
C. more
D. pg
E. row
Answer: C
Explanation:

QUESTION NO: 169

Which of the following commands will send output from the program myapp to both
standard output (stdout) and the file file1.1og?

A. cat <myapp | cat > file1.1og
B. myapp 0>&1 | cat > file1.1og
C. myapp | cat > file1.1og
D. myapp| tee file1.1og
E. tee myapp file1.1og
Answer: D
Explanation:

QUESTION NO: 170

Which of the following commands is run last during boot on a system with quotas
enabled?

A. fsck
B. mount
C. quotacheck
D. quotaon
Answer: D
Explanation:

QUESTION NO: 171

Select the line that best represents what permissions the /etc/passwd file

should have

A. -rw------- 1 root root 531 Apr 3 12:36 /etc/passwd
B. -rw-r--r-- 1 root root 531 Apr 312:36 /etc/passwd
C. -rw-r--r-- 1 1 1 531 Apr 3 12:36 /etc/passwd
D. all answers listed are not correct
E. all answers listed are correct
Answer: B
Explanation:

QUESTION NO: 172

What does the command mount -a do?

A. It mounts the floppy disk for all users
B. It shows all mounted file systems
C. It opens /etc/fstab to edit
D. It mounts all file systems listed in /etc/fstab
Answer: D
Explanation:

QUESTION NO: 173

You are using quota on your system. How can you see disk quota details?

A. repquota
B. quota-l
C. quota
D. quotacheck
E. quota --list
Answer: A
Explanation:

QUESTION NO: 174

What command should be invoked to give the user sally read and write, but not

execute,
access to the file strategy.txt using Extended ACL entries?

A. setfacl -setperm sally:rw strategy.txt
B. setfacl -m user::sally+rw strategy.txt
C. setfacl -m user:sally:rw strategy.txt
D. setfacl -setperm user:sally+rw strategy.txt
Answer: C
Explanation:

QUESTION NO: 175

Identify the proper device for the third partition, on the second hard disk, on

the first IDE
controller on a C

system.

A. /dev/hdb3
B. /dev/hdlb3
C. /dev/hdclb3
D. /dev/hdcld2p3
Answer: A
Explanation:

QUESTION NO: 176

Which of the following commands will print the inode usage on each mounted

filesystem?

A. du -i
B. df -i
C. lsfs -i
D. printfs -i
Answer: B
Explanation:

QUESTION NO: 177 CORRECT TEXT

Which program finds only files that are in your PATH?

Answer: which

QUESTION NO: 178

Which of these commands allows you to use shared libraries that are in

/usr/local/lib?

A. export LD_PRELOAD=/usr/local/lib
B. exportLD_LIBRARY_PATH=/usr/local/lib
C. ldconfig /usr/local/lib
D. ldd /usr/local/lib
Answer: C
Explanation:

QUESTION NO: 179

Which file is used by ld.so to find libraries quickly without actually having

to search the
directories in its library path?

A. /etc/ld.so.cache
B. /etc/ld.so.conf
C. /etc/ld.so
D. /var/ld/cache
E. /var/.cache
Answer: A
Explanation:

QUESTION NO: 180

You want to preview where the package file, apache-xml.i386.rpm, will install

its files before
installing it. What command do you issue?

A. rpm -qp apache-xml.i386.rpm
B. rpm -qv apache-xml.i386.rpm
C. rpm -ql apache-xml.i386.rpm
D. rpm -qpl apache-xml.i386.rpm
Answer: D
Explanation:

QUESTION NO: 181

Which system administration command you can use to update ld.so.cache after the
installation of new shared libraries?

A. ldconfig
B. ldd
C. libpath
D. newlibs
Answer: A
Explanation:

QUESTION NO: 182

How do you get a list of files that have been installed from a dpkg package?

A. dpkg -l pkgname
B. dpkg -C pkgname
C. dpkg -s pkgname
D. dpkg -S pkgname
E. dpkg-L pkgname
Answer: E
Explanation:

QUESTION NO: 183 CORRECT TEXT

To prevent users from being able to fill up the / partition, the _______

directory should be
on a separate partition if possible because it is world writeable.

Answer: /tmp
Answer: tmp


QUESTION NO: 184

User Joseph has successfully extracted and compiled a program from source code.
Installing the binaries produces errors. What is the most likely reason?

A. The source code was compiled for a different CPU
B. The permissions set in the /usr/bin directory are wrong
C. The binaries require root privileges to be installed
D. The wrong prefix was used during configuration of the source code
Answer: C
Explanation:

QUESTION NO: 185

What RPM command would show you detailed information for a package called

openssh3.6.
i386.rpm?

A. rpm --showinformation openssh-3.6.i386.rpm
B. rpm --showdetails --package openssh-3.6.i386.rpm
C. rpm --query --info --package openssh-3.6.i386.rpm
D. rpm --verify openssh-3.6.i386.rpm
Answer: C
Explanation:

QUESTION NO: 186
In GRUB's configuration file you find the line
Root (hd1,4)

What is corresponding device name on a Linux system?

A. /dev/hda4
B. /dev/hda5
C. /dev/hdb4
D. /dev/hdb5
Answer: D
Explanation:

QUESTION NO: 187 CORRECT TEXT

Upon booting one of your Linux boxes, you notice a message scrolling by that

does not
look right, but it goes so fast, you do not have a chance to read it. What

command could
you use to view that message after the boot process completes?

Answer: dmesg

QUESTION NO: 188 CORRECT TEXT

What file contains kernel level logging information such as output from a

network driver
module when it is loaded?

Answer: /var/log/kern.log
Answer: /var/log/messages/kern.log
Answer: messages/kern.log

QUESTION NO: 189

Which configuration file should be modified to disable the ctrl-alt-delete key

combination?

A. /etc/keys
B. /proc/keys
C. /etc/inittab
D. /proc/inittab
E. /etc/reboot

Answer: C
Explanation:

QUESTION NO: 190

You are having some trouble with a disk partition and you need to do

maintenance on this
partition but your users home directories are on it and several are logged in.

Which
command would disconnect the users and allow you to safely execute maintenance

tasks?

A. telinit 1
B. shutdown -r now
C. killall -9 inetd
D. /bin/netstop --maint
E. /etc/rc.d/init.d/network stop
Answer: A
Explanation:

QUESTION NO: 191

In compliance with the FHS, in which of the following places are man pages

typically
found?

A. /usr/share/man
B. /opt/man
C. /usr/doc
D. /var/pkg/man
E. /usr/local/man
Answer: A
Explanation:

QUESTION NO: 192 CORRECT TEXT

In the vi editor, which of the following commands will delete the current line

at the cursor
and the 16 lines following it (17 lines total)?

Answer: 17dd

QUESTION NO: 193

What is the purpose of the bash built-in export command?

A. To allow disks to be mounted remotely.
B. To run a command as a process in a sub-shell.
C. To make the command history available to sub-shells.
D. To setup environment variables for applications.
E. To share NFS partitions for use by other systems on the network.
Answer: D
Explanation:

QUESTION NO: 194 CORRECT TEXT
Which option must be listed in /etc/fstab to activate user quotas

automatically?


Answer: usrquota

QUESTION NO: 195 CORRECT TEXT

The USB device filesystem can be found under /proc/ _______ /usb/. (Please fill

in the blank
with the single word only)

Answer: bus

Topic 5, Volume E

QUESTION NO: 196

The message "Hard Disk Error" is displayed on the screen during Stage 1 of the

GRUB
boot process. What does this indicate?

A. The kernel was unable to execute/bin/init
B. The next Stage cannot be read from the harddisk because GRUB was unable to
determine the size and geometry of the disk
C. One or more of the filesystems on the hard disk has errors and a filesystem

check
should be run
D. The BIOS was unable to read the necessary data from the Master Boot Record

tobegin
the boot process
Answer: B
Explanation:

QUESTION NO: 197 CORRECT TEXT

Which user-level program, when manually executed by the root user, is used to

change the
runlevel of the system? (Provide only the command with no additional options or
parameters)

Answer: init

QUESTION NO: 198

Which of the following commands can be used to instruct the init process to

switch
runlevels?

(Choose TWO correct answers)

A. telinit
B. initctl
C. init
D. reinit
E. runlevel
Answer: A,C
Explanation:

QUESTION NO: 199

The system is having trouble and the engineer wants to bypass the usual

/sbin/init startup
and run /bin/sh. What is the usual way to pass this change to the kernel from

your boot
loader?

A. Start in runlevel 1
B. Pass init=/bin/sh on the kernel parameter line
C. Pass /bin/shon the kernel parameter line
D. Pass start=/bin/sh on the kernel parameter line
Answer: B
Explanation:

QUESTION NO: 200

Which command will show you the contents of a gzip compressed tar archive?

A. gzip archive.tgz | tar xvf B.
tar ztf archive.tgz
C. gzip -darchive.tgz | tar tvf D.
tar cf archive.tgz
Answer: B
Explanation:

QUESTION NO: 201

What can the tee command be used for?

A. Print the contents of a file in reverse order
B. Use the output of one command as arguments to another
C. Add line numbers to the output of a command
D. Pipe the output of one command into the input of another
E. Send a command's output to stdout and a to file at the same time
Answer: E
Explanation:

QUESTION NO: 202
Which key do you press to switch to normal mode in vi?

A. Alt
B. Esc
C. Ctrl
D. Shift
Answer: B
Explanation:

QUESTION NO: 203 CORRECT TEXT

The priority of any process can range from -20 to ________ . (Provide only the

numerical
value)

Answer: 19
Answer: +19

QUESTION NO: 204

Which directory contains additional information about installed packages?

A. /usr/share/documentation
B. /usr/local/share/documentation
C. /usr/local/doc
D. /usr/share/doc
E. /usr/packages/doc
Answer: D
Explanation:

QUESTION NO: 205

Which of the following commands will replace every instance of the word list

with LIST
from the file myfile.txt and print the results on the screen?

A. sed --in-place -e "s/list/LIST/" myfile.txt
B. sed -e "s/list/LIST/" myfile.txt
C. sed --in-place -e "/list/LIST/" myfile.txt
D. sed -e "/list/LIST/" myfile.txt
Answer: B
Explanation:

QUESTION NO: 206 CORRECT TEXT

To change the priority of a running process, you use the _______ command

(Specify
command only with no options.)

Answer: renice
Answer: /usr/bin/renice

QUESTION NO: 207

Which of the following commands will NOT execute the bash script
/usr/local/bin/runme.sh?

A. source /usr/local/bin/runme.sh
B. . /usr/local/bin/runme.sh
C. /bin/bash /usr/local/bin/runme.sh
D. /usr/local/bin/runme.sh
E. run /usr/local/bin/runme.sh
Answer: E
Explanation:

QUESTION NO: 208
What is the default process priority when a process is started using the nice

command?

A. -10
B. 10
C. 20
D. 0
Answer: B
Explanation:

QUESTION NO: 209

Which of the following commands will NOT update the Modify timestamp on the

file
/tmp/myfile.txt?

A. file /tmp/myfile.txt
B. echo "Hello" >/tmp/myfile.txt
C. sed -i"s/1/2/" /tmp/myfile.txt
D. echo -n "Hello" >/tmp/myfile.txt
E. touch /tmp/myfile.txt
Answer: A
Explanation:

QUESTION NO: 210 CORRECT TEXT

In the vi editor, what vi command will copy (but not paste) from the current

line at the
cursor and the following 16 lines (17 lines total)? Enter the correct vi

command without
spaces.

Answer: 17yy

QUESTION NO: 211 CORRECT TEXT

An administrator has sent their current vi process with a PID of 1423 to the

background on
the command line. Assuming no other processes are in the background, what

single
command with no options or parameters will bring the vi process to the

foreground?

Answer: fg

QUESTION NO: 212

Bob accidentally created the subdirectory \bobsdir in his home directory. He

tried to
remove the subdirectory with the command rmdir \bobsfile only to receive the

error, "No
such file or directory." Which command will remove the directory?

A. rmdir 'bob/\bobsdir'
B. rmdir "bob/\bobsdir"
C. rmdir ~bob/ 'bobsdir'
D. rmdir bob/\bobsdir
E. rmdir ~bob/\\bobsdir
Answer: E
Explanation:

QUESTION NO: 213

While editing a file in vi, you realize that you are changing the wrong file.

What vi command
sequence will allow you to quit without saving your changes?

A. :Q!
B. :q!
C. :w!
D. :wq!

Answer: B
Explanation:

QUESTION NO: 214

Which command will allow an administrator to adjust the number of mounts after

which an
existing filesystem will be checked by e2fsck?

A. debugfs
B. dumpe2fs
C. mode2fs
D. tune2fs
E. mke2fs
Answer: D
Explanation:

QUESTION NO: 215 CORRECT TEXT

You want to display all currently mounted file systems. Which command would you

use?
(Please enter only the command without arguments or options)

Answer: mount
Answer: /bin/mount
Answer: df
Answer: /bin/df

QUESTION NO: 216 CORRECT TEXT

The/etc/ ________ file lists currently mounted devices.

Answer: mtab

QUESTION NO: 217

Which of the following is true when hard-linked files are present?

A. The output of stat will report "hard" instead of "regular file"
B. The hard-linked files may not be empty
C. Both files will share the same inode
D. Issuing a longdirectory listing with ls -1 will indicate the link with "->"
E. The file permissions will be prefixed by an "h", eg. hrwxr-x-r-x
Answer: C
Explanation:

QUESTION NO: 218 CORRECT TEXT
________ /dev/sda3 will create a swap area on the device/dev/sda3.


Answer: mkswap
Answer: /sbin/mkswap

QUESTION NO: 219 CORRECT TEXT
What umask value will result in the default access permissions of 600

(rw-------) for files and

(rwx ------) for directories? (Provide only the numerical umask value)


Answer: 077
Answer: 0077

QUESTION NO: 220 CORRECT TEXT

Which command will convert an RPM package file to a cpio archive? (Provide only

the
command with no options or parameters)

Answer: rpm2cpio

QUESTION NO: 221 CORRECT TEXT

What option, when passed to the yum command, will update the entire system?

(Specify
ONLY the option name with no additional parameters)

Answer: update

QUESTION NO: 222 CORRECT TEXT

Which command will disable paging and swapping on a device? (Provide only the
command with no additional options or parameters)

Answer: swapoff
Answer: /sbin/swapoff

QUESTION NO: 223 CORRECT TEXT

The dpkg-____ command will ask configuration questions for a specified package,

just as if
the package were being installed for the first time. Answer:

Answer: reconfigure

QUESTION NO: 224 CORRECT TEXT
An administrator has issued the following command:
grub-install --root-directory=/custom-grub /dev/sda

In which directory will the new menu.lst file be found? (Provide the full

directory path only

without the filename)

Answer: /custom-grub/boot/grub
Answer: /custom-grub/boot/grub/

QUESTION NO: 225 CORRECT TEXT

What command will print the shared libraries for the file /usr/lib/libpng12.so?

(Provide the
full command with library name but without any other options or parameters)

Answer: ldd/usr/lib/libpng12.so
Answer: /usr/bin/ldd/usr/lib/libpng12.so

QUESTION NO: 226

After modifying LILO's configuration file, what command should you run for the

changes to
take effect?

A. kill -HUP 'pidof lilo'
B. lilo-install
C. lilo
D. reboot
Answer: C
Explanation:

QUESTION NO: 227 CORRECT TEXT

Which command is used to enable disk quotas on a particular filesystem?

(Provide only the
command, with no options or parameters)

Answer: quotaon
Answer: /sbin/quotaon

QUESTION NO: 228 CORRECT TEXT


You've downloaded an image file of a boot floppy disk to your hard drive. What

is the best
utility to create a boot floppy from the disk image? (Specify a single command

without
options.)

Answer: dd
Answer: /bin/dd

QUESTION NO: 229 CORRECT TEXT
In which directory must definition files be placed to add additional

repositories to yum?


Answer: /etc/yum.repos.d
Answer: /etc/yum.repos.d/
Answer: yum.repos.d
Answer: yum.repos.d/

QUESTION NO: 230

The file myfile.txt contains the following data:

joe:x:100:100:Joe:/home/joe:/bin/bash
mike:x:101:101:Mike:/home/mike:/bin/sh
kevin:x:102:102:Kevin:/home/kevin:/bin/sh
matt:x:103:103:Matt:/home/matt:/bin/sh

What output will be displayed on the screen when the following command is

executed:

grep -o home myfile.txt

A. No output will be displayed on the screen
B. home
home
home
home

C. /home/joe
/home/mike
/home/Kevin
/home/matt
D. joe
mike
Kevin
matt
Answer: B
Explanation:

QUESTION NO: 231

Which TWO runlevels should never be declared as the default runlevel?

A. 0
B. 3
C. 5
D. 6
Answer: A,D
Explanation:

QUESTION NO: 232

After modifying GRUB's configuration file, what command should you run for the

changes
to take effect?

A. kill HUP `pidof grub`
B. grubinstall
C. grub
D. no action is required
Answer: D
Explanation:

QUESTION NO: 233

You are trying to make a hard link to an ordinary file but ln returns an error.

Which of the
following could cause this?

A. The source file is hidden.
B. The source file is readonly.
C. The source file is a shell script.
D. You do not own the source file.
E. The source and the target are on different filesystems.
Answer: E
Explanation:

QUESTION NO: 234 CORRECT TEXT

What file allow admin to adjust number of mounts after which file system will

be checked
by e2fsck?

Answer: tune2fs

QUESTION NO: 235

Which command will convert all tab characters in a file to spaces and print

that to standard
out?

A. convert
B. expand
C. retab
D. untab
Answer: B
Explanation:

QUESTION NO: 236

Which of the following is a limitation of the cut command?

A. The cut command can only select output by field position.
B. The cut command cannot reorder fields.
C. The cut command only works on ASCII text.
D. The cut commandwill always print one line of output for every line of input.
Answer: B
Explanation:

QUESTION NO: 237

When in Normal mode in vi, which command character can be used to begin a

reverse
search of the text?

A. ?
B. /
C. F
D. r
Answer: A
Explanation:

QUESTION NO: 238

In bash, inserting 2>&1 after a command redirects

A. standard error to standard input.
B. standard input to standard error.
C. standard output to standard error.
D. standard error to standard output.
E. standard output to standard input.
Answer: D
Explanation:

QUESTION NO: 239

When in Normal mode in vi, which command character will insert a blank line

below the
current cursor position and place the insert cursor at the beginning of the new

line?

A. a
B. i
C. n
D. o
Answer: D
Explanation:

QUESTION NO: 240

To ensure that a running process continues to execute after you log out, the

process
should be started with what command?

A. live
B. nohup
C. saferun
D. sh
Answer: B
Explanation:

QUESTION NO: 241

Which signal is sent by the kill command by default?

A. HUP(1)
B. QUIT(3)
C. KILL(9)
D. TERM(15)
Answer: D
Explanation:

QUESTION NO: 242

What is the purpose of the Bash built-in export command?

A. To allow disks to be mounted remotely.
B. To automate the export of variables for subsequently executed commands.
C. To make the command history available to sub-shells.
D. To run a command as a process in a sub-shell.
E. To save variable settings for future shell invocations.
Answer: B
Explanation:

QUESTION NO: 243

Once a shell variable has been created, how can the variable be removed from

the
environment?

A. VAR=
B. set-d VAR
C. set -u VAR
D. unset VAR
Answer: D
Explanation:

QUESTION NO: 244

What command will display all of the background tasks running in the current

shell?

A. history
B. jobs
C. kill -l
D. list
Answer: B
Explanation:

QUESTION NO: 245

Given the following output: prompt> myapp [1]+ Stopped myapp prompt> Which of

the
following commands will resume executing the stopped process and make it the

current
job?

A. bg myapp
B. continue myapp
C. exec myapp
D. fg myapp
E. myapp &
Answer: D
Explanation:

QUESTION NO: 246

Which of the following commands will print the first few lines of a text file

to the shell?

A. cat -n 10 filename
B. dump -n 10 filename
C. head -n 10 filename
D. print -n 10 filename
Answer: C
Explanation:

QUESTION NO: 247

When should grep -F or the fgrep command be used to search the content of text

files?

A. When files need to be searched that contain non-ASCII text.
B. When only the presence of the search pattern needs to be reported and not

every line
that matches the
search.
C. When the text being searched for does not contain any regular expression

patterns.
D. When the text files will be searched multiple times. Subsequent calls to

fgrep will run
faster.
Answer: C
Explanation:

QUESTION NO: 248 CORRECT TEXT

Which command displays the contents of the Kernel Ring Buffer on the command

line?
(Provide only the command name without any options or path information) Answer:

Answer: dmesg
Answer: /bin/dmesg

QUESTION NO: 249

You are having some trouble with a disk partition and you need to do

maintenance on this
partition but your users home directories are on it and several are logged in.

Which
command would disconnect the users and allow you to safely execute maintenance

tasks?

A. halt 1
B. init 1
C. logout -all now
D. runlevel 1
E. shutdown -maintenance now
Answer: B
Explanation:

QUESTION NO: 250

Which of the following commands will write a message to the terminals of all

logged in
users?

A. bcast
B. mesg
C. print
D. wall
E. yell
Answer: D
Explanation:

QUESTION NO: 251

Which of the following statements is a TRUE difference between GRUB Legacy and

GRUB
2?

A. GRUB 2 no longer requires a configuration file.
B. Partition numbers start at 0 in GRUB Legacy and 1 in GRUB 2.
C. grub-mkconfig only works with GRUB Legacy if the -version 1 option is used.
D. The configuration file menu.lst (andgrub.conf) have been replaced with

grub.config.
Answer: B
Explanation:

QUESTION NO: 252

Which of the following commands can be used to perform a full text search on

all available
packages on a Debian system?

A. apt
B. apt-cache
C. apt-get
D. apt-search
E. dpkg
Answer: B
Explanation:

QUESTION NO: 253 CORRECT TEXT

Typically, which top level system directory is used for files and data that

changes regularly
while the system is running and are to be kept between reboots? (Specify only

the the top
level directory) Answer:

Answer: /var
Answer: /var/
Answer: var
Answer: var/

QUESTION NO: 254

What effect does the sticky bit have when set on a directory?

A. There is no effect because the sticky bit has been deprecated in Linux.
B. It provides a hint to the kernel that files in this directory should be

cached in memory, if
possible.
C. It restricts deletion of files in this directory to only the root user and

the file owner regardless of write permissions for other users.
D. It instructs the kernel to keep the underlying data for the files in the

directory intact to
allow for undeletion
of important files.
Answer: C
Explanation:

QUESTION NO: 255

Identify the proper device for the third partition on the only SCSI drive on

the system.

A. /dev/hda3
B. /dev/sd0a3
C. /dev/sda3
D. /dev/sd1p3
Answer: C
Explanation:

QUESTION NO: 256 CORRECT TEXT

Which program updates the database that is used by the locate command?

Answer: updatedb
Answer: /usr/bin/updatedb

QUESTION NO: 257

Which of the following apt-get commands will install the newest versions of all

currently
installed packages without removing any packages or installing new packages

that are not
already installed?

A. auto-update
B. upgrade
C. dist-upgrade
D. install
E. update
Answer: B
Explanation:

QUESTION NO: 258 CORRECT TEXT

What is the name of the main configuration file for GRUB? (Please specify the

file name
with no path information) Answer:

Answer: menu.lst
Answer: grub.conf
Answer: grub.cfg

QUESTION NO: 259

Which of the following commands can be used to enable a file for paging and

swapping?

A. mkswap
B. swapon
C. inswap
D. modswap
Answer: B
Explanation:

QUESTION NO: 260

Which of the following commands can be used to create a new file that is 100kB

in size?

A. dd
B. file
C. mkfile
D. touch
Answer: A
Explanation:

QUESTION NO: 261

When piping the output of find to the xargs command, what option to find is

useful if the
filenames have spaces in them?

A. -rep-space
B. -print0
C. -nospace
D. -ignore-space
Answer: B
Explanation:

QUESTION NO: 262

What is the purpose of the xargs command?

A. It will read standard input and executecommand lines with the read input.
B. It will get user input from the graphical environment.
C. It will clean up command line arguments and verify syntactic correctness.
D. It will pass arguments on the command line to a new graphical application.
E. It will allow users to specify long options for commands that normally only

accept short
options.
Answer: A
Explanation:

QUESTION NO: 263

What is the default action of the split command on an input file?

A. It will break the file into new files of 1,024 byte pieces each.
B. It will break the file into new files of 1,000 line pieces each.
C. It will break the file into new files of 1,024 kilobyte pieces each.
D. It will break the file into new files that are no more than 5% of the size

of the original file.
Answer: B

Explanation:

QUESTION NO: 264

In the vi editor, which of the following commands will copy the current line

into the vi
buffer?

A. c
B. cc
C. 1c
D. yy
E. 1y
Answer: D
Explanation:

QUESTION NO: 265

You are writing text in vi. Now you want to save your changes and exit. Which

TWO
sequence of inputs will accomplish this?

A. esc ZZ
B. ctrl :w!
C. esc zz
D. esc :wq!
E. ctrl XX
Answer: A,D
Explanation:

QUESTION NO: 266

In the command foo < bar | foobar, which ONE of the following statements is

correct?

A. the stdout from the command foobar issaved to the file foo.
B. the stdout from the command foo is saved to the file foobar.
C. the command foobar receives its stdin from the stderr of foo.
D. the command foobar receives its stdin from the stdout of foo.
E. the command bar receives its stdinfrom the contents of the file foobar.
Answer: D
Explanation:

QUESTION NO: 267

What does the + symbol mean in the following grep regular expression: grep '^d

[aei]\+d$'
/usr/share/dict/words

A. Match the preceding character set ([aei]) one or more times.
B. Match thepreceding character set ([aei]) zero or more times.
C. Match the preceding character set ([aei]) zero or one times.
D. Match a literal + symbol.
Answer: D
Explanation:
The answer should be “Match a literal + symbol” because there is a backslash

symbol
before the plus, so it should match a literal +.


QUESTION NO: 268


Which option to the tee command will cause the output to be concatenated on the

end of
the output file instead of overwriting the existing file contents?


A. -a
B. -c
C. -no-clobber
D. -continue
Answer: A
Explanation:

QUESTION NO: 269

Which of the following shell redirections will write standard output and

standard error
output to a file named filename?

A. 2>&1 >filename
B. >filename 2>&1
C. 1>&2>filename
D. >>filename
E. 1&2>filename
Answer: B
Explanation:

QUESTION NO: 270

Which of the following commands will produce the following output: USERPID %CPU
%MEMVSZ RSS TTY STAT STARTTIME COMMAND root 1255 4.4 0.9 6071634824 tty7
Ss+ 09:25 19:04 /usr/bin/X :0 - root 2016 0.0 0.0 792 560 tty1 Ss+ 09:26 0:00

/sbin/getty 8
matt 5204 0.0 0.1 6320 3696 pts/4 Ss 13:12 0:00 bash matt 5219 0.0 0.0 3988 624

pts/4

S+ 13:12 0:00 man bash matt 5229 0.0 0.0 3584 932 pts/4 S+ 13:12 0:00 pager -s

matt
6768 0.0 0.1 10504 3880 pts/2 S+ 15:11 0:00 vi README.txt

A. jobs
B. proclist
C. netstat
D. ps
Answer: D
Explanation:

QUESTION NO: 271

While editing a file in vi, the file changes due to another process. Without

exiting vi, how
can the file be reopened for editing with the new content?

A. :r
B. :n
C. :w
D. :e
Answer: D
Explanation:

QUESTION NO: 272

Which of the following explanations are valid reasons to run a command in the

background
of your shell?

A. The command does not need to execute immediately.
B. The command has to run immediately but the user needs to log out.
C. The system is being shut down and the command needs to restart execution
immediately after the reboot.
D. The command can run at a lower priority than normal commands run on the

command
line.
Answer: B
Explanation:

QUESTION NO: 273

What is the purpose of the & character at the end of a command line?

A. It causes standard error to be unbuffered.
B. It causes the command to be run in the background of the current shell.
C. It puts the command under the job control facilities of the current shell.
D. It causes the command to be run as a child of the initial login shell of the

user.
Answer: B
Explanation:

QUESTION NO: 274

Which of the following commands will print important system information such as

the
kernel version and machine hardware name?

A. sysinfo
B. uname
C. lspci
D. arch
E. info
Answer: B
Explanation:

QUESTION NO: 275

During a system boot cycle, what is the program that is run after the BIOS

completes its
tasks?

A. The bootloader
B. The inetd program
C. The init program
D. The kernel
Answer: A
Explanation:

QUESTION NO: 276 CORRECT TEXT

Which command will display messages from the kernel that were output during the

normal
bootup sequence? Answer:

Answer: dmesg
Answer: /bin/dmesg

QUESTION NO: 277

Which of the following commands will load a kernel module along with any

required
dependency modules?

A. depmod
B. insmod
C. modprobe
D. module_install
E. loadmod
Answer: C
Explanation:

QUESTION NO: 278

What is the process ID number of the init program?

A. -1
B. 0
C. 1
D. It is different with each reboot.
E. It is set to the current run level.
Answer: C
Explanation:

QUESTION NO: 279

After running the command umount /mnt, the following error message is

displayed:
umount: /mnt: device is busy. What is a common reason for this message?

A. The kernel has not finished flushing disk writes to themounted device.
B. A user has a file open in the /mnt directory.
C. The previous rm command has not finished.
D. The files in /mnt have been scanned and added to the locate database.
E. The kernel thinks that a process is about to open a file in /mnt for

reading.
Answer: B
Explanation:

QUESTION NO: 280

Which of the following commands will print the amount of disk space used by

files
specified on the command line?

A. dc
B. dd
C. df
D. du
Answer: D
Explanation:

QUESTION NO: 281

Which of the following commands can be used to locate programs and their

corresponding
man pages and configuration files?

A. locate
B. which
C. find
D. query
E. whereis
Answer: E
Explanation:

QUESTION NO: 282

Which chown command will change the ownership to dave and the group to staff on

a file
named data.txt?

A. chown dave/staff data.txt
B. chown -u dave -g staff data.txt
C. chown -user dave -group staff data.txt
D. chown dave:staff data.txt
Answer: D
Explanation:

QUESTION NO: 283

Which of the following commands enables the setuid (suid) permission on the

executable
called /bin/foo?

A. chmod 1755 /bin/foo
B. chmod 4755 /bin/foo
C. chown u-s /bin/foo
D. chmod 755+s /bin/foo

Answer: B
Explanation:

QUESTION NO: 284

Instead of supplying an explicit device in /etc/fstab for mounting, what other

options may
be used to identify the intended partition? (Select TWO correct answers)

A. FIND
B. ID
C. LABEL
D. NAME
E. UUID
Answer: C,E
Explanation:

QUESTION NO: 285 CORRECT TEXT

The system configuration file named _______ is commonly used to set the default

runlevel.
(Please provide the fill name with full path information) Answer:

Answer: /etc/inittab

QUESTION NO: 286 CORRECT TEXT

The system configuration file named _______ is commonly used to set the default

runlevel.
(Please provide the fill name with full path information) Answer:

Answer: /etc/inittab