LPIC 102-500
>>Essential System Services exam
Answers with explanation
Take the test here (You need an account. It's free)
1. Which of the following commands is used to examine the systemd Journal or log file?
A. journallist
B. ctlj
C. journalctl
D. jctl
ANSWER: C. The journalctl command is used to work with the systemd Journal, On systemd-based systems, journalctl is a central command for debugging and troubleshooting
2. Which system logging facility is used for messages from the kernel?
A. syslog
B. kernel
C. kern
D. system
C. The kern facility receives messages from the kernel for logging purposes. Of the other options, syslog is used for logging messages about syslog itself. The other two options shown are not valid syslog facilities
3. To what server address can you set a Network Time Protocol (NTP) client in order to receive time from a regionally local server?
A. 127.0.0.1
B. 192.168.1.100
C. ntp.example.com
D. pool.ntp.org
D. ntp.org provides a free service for time synchronization. When you use pool.ntp.org as the target, you will typically receive an NTP server that is geographically close to your location, or at least as close as possible. Setting your address to 127.0.0.1 or 192.168.1.100 will use a local server but only if that server has an NTP service.
4. What is the name of the systemd service that provides logging facilities?
A. systemd-journald
B. systemd-loggingd
C. systemd-syslog
D. journalctl
A. The service used for logging on a computer managed by systemd is called systemd-journald. You use the journalctl command to view logged entries rather than the standard Linux toolset
5. Which option within a logrotate configuration stanza informs logrotate to create a new log file owned by the user and group www-data and with permission 600?
A. new www-data.www-data mode 600
B. create 600 www-data www-data
C. new 600 www-data
D. createlog mode 600 user www-data group www-data
B. The create option is used for this purpose and accepts arguments such as those shown to set the permissions and ownership. The other options shown are not valid within a logrotate configuration
6. Within which directory hierarchy will you find configuration files related to printing with the Common UNIX Printing System (CUPS) printing system?
A. /etc/cupsd
B. /etc/cups.d
C. /etc/CUPS
D. /etc/cups
D. Configuration files for CUPS are found in /etc/cups. However, it is also common to manage CUPS through its web interface. The other directories listed are not valid
7. Which access control directive in a CUPS configuration file configures the system to accept connections from the local network with addresses from 192.168.1.1 through 192.168.1.127?
A. Allow 192.168.1.0/25
B, Allow 192.168.1.0/24
C. Allow 127.0.0.0/8
D, AllowHostS 192.168.1.0
A. The Allow directive is used for this purpose and the addresses 192.168.1.1 through .127 signify a /25 in Classless Inter-Domain Routing (CIDR) notation, making option A correct. Note that option B, with a /24 netmask, would allow the addresses too but would also allow 192.168.1.128 through .255, which is larger than should be allowed
8. Which of the following commands will set the date immediately and can be used from the command line in a script?
A. ntpd
B. ntpdate pool.ntp.org
C. settime
D. time
B. The ntpdate command provides a command-line interface that immediately changes or sets the time according to the NTP server given as its argument. The ntpd option provided in option A will run the NTP daemon and would not be appropriate for a script. The other two commands are not valid. It is worth noting that ntpdate has been deprecated in favor of ntpd, but you will likely find ntpdate available on many systems.
9. When executing the ntpq command, you receive a message like read: Connection refused. What would this typically indicate?
A. The network is down.
B. The NTP daemon is not running.
C. The use of NTP is administratively prohibited.
D. The current user does not have permission to execute ntpq.
B. Typically, the Connection refused message from an NTP-related command means that the daemon is not running. There is no indication that the ntpq command is querying a different server; therefore, whether the network is up or down is irrelevant. The permission-based options are not valid based on the error message indicated.
10. Which command is used to query and work with the hardware clock on the system?
A. hwc
B. ntpdate
C. systime
D. hwclock
D. The hwclock command is used to both query and set the hardware clock, such as the one maintained by the system firmware or basic input/output system (BIOS). The ntpdate command is used to set the local system time but is not related to the hardware clock. The other commands are not valid.
11. Which directory contains a listing of available time zones on a Linux system?
A. /etc/timezones
B. /etc/tzdata
C. /usr/share/zoneinfo
D. /usr/share/timezones
C. The /usr/share/zoneinfo directory and its child directories contain information on time zones on a Linux system. The other files and directories do not exist by default.
12. Which syslog level is used to provide informaţional messages?
A. kern
B. emerg
C. debug
D. info
D. The info severity level provides information messages for a given facility. Of the options given, emerg is used for emergency messages and not normally used by applications, whereas debug is the highest or most verbose level of logging available through syslog.
13. Within /etc/ntp. conf, which of the following configuration lines sets the location of the drift file?
A. drift /var/lib/ntp/drift
B. driftfile /var/lib/ntp/drift
C. drift-file /var/lib/ntp/drift
D. driftconfig /var/lib/ntp/drift
B. The driftfile configuration option sets the location of the driftfile for ntpd. The drift file helps to maintain time accuracy. The location shown is the default for Red Hat Enterprise Linux.
14. Which configuration option in /etc/logrotate. conf will cause the log to be emailed to admin@ example. com when the logrotation process runs for the selected log?
A. This email address is being protected from spambots. You need JavaScript enabled to view it.
B. This email address is being protected from spambots. You need JavaScript enabled to view it.
C. This email address is being protected from spambots. You need JavaScript enabled to view it.
D. This email address is being protected from spambots. You need JavaScript enabled to view it.
A. The maii option is used to send the log to the specified email address on completion of the logrotate process. The others shown do not exist as options in /etc/logrotate.conf.
15. Which of the following commands is used to determine the amount of disk space used by systemd Journal logfiles?
A. journalctl -disk
B. journalctl -du
C. journalctl -disk-usage
D. journalctl -ls
C. The journalctl command is used for this purpose, and the -disk-usage option displays the disk space used by Journal log files, which are typically stored in /var/log/journal.
16. Which of the following commands displays the current mail queue on a Postfix server?
A. qmail
B. mailqueue
C. mail -q
D. mailq
D. The mailq command is used on Postfix servers in order to view a summary of the current mail queue. Details of the queue include the ID of the mail being sent along with one or more of the email addresses involved in the transaction. The mailq command may also work with newer versions of sendmail.
17. When you’re running the NTP daemon, which command can you execute to work with the NTP server in an interactive mode?
A. ntpd
B. ntpdate
C. ntpq
D. ntp-interactive
C. The ntpq command provides an interactive, menu-like interface into the NTP server. You can use ntpq to check statistics on peers, for example. The ntpdate command shown as option B is used as a command-line means to set the time. The ntpd command shown as option A would execute the NTP daemon itself.
18. Assume that you want all email for the root user to be sent to This email address is being protected from spambots. You need JavaScript enabled to view it.. Which of the following lines in /etc/aliases will accomplish this task?
A. This email address is being protected from spambots. You need JavaScript enabled to view it.> root
B. root - >This email address is being protected from spambots. You need JavaScript enabled to view it.
C. root, This email address is being protected from spambots. You need JavaScript enabled to view it.
D. root: This email address is being protected from spambots. You need JavaScript enabled to view it.
D. The format is user: destination for the aliases file, making option D correct. The other options are not valid syntax for the aliases file.
19. When you’re working with klogd, which option can be used to control the file to which messages are logged?
A. -d
B. -f
C. -v
D. -l
B. The -f option indicates the file to which messages will be logged. The -d option is used for debugging, whereas -v prints the version of klogd. There is no -l option for klogd.
20. Which set of programs or packages can be used for setting the system time on a device that is offline frequently?
A. chrony
B. htpoffline
C. ntpd-off
D. chrondate
A. The chrony package is used for the scenario described and helps with systems that are frequently offline or disconnected from the network. The other packages listed as options are not valid for the purpose described.
21. Which of the following commands places a file into the print queue?
A. lpr
B. lpd
C. lpq
D. lpx
A. The lpr command places a file (or standard input) into the print queue for lpd to work with. The lpq command prints the current queue. There is no lpx command.
22. Which of the following options to the sendmail command will print information about the mail queue?
A. -bi
B. -queue
C. -bp
D. -f
C. The -bp option to the sendmail command prints information about the current queue. There is no -queue or -f option that is relevant for this question. The -bi option is used to work with the aliases database.
23. Which function of the hwclock command will set the hardware clock to the current system time?
A. -w
B. -s
C. -a
D. -m
A. The -w option sets the hardware clock to the current system time. The -s option does the opposite, setting the system time to the hardware clock. There is no -a or -m function for hwclock.
24. What is the default port for the CUPS administrative web interface?
A. tcp/53
B. tcp/8080
C. udp/456
D. tcp/631
D. TCP port 631 is used as the administrative interface into CUPS. Visiting an active CUPS server on that port will show the administration website for working with print queues and other configuration items related to CUPS.
25. Which of the following commands causes sendmail to attempt to deliver the messages in its queue?
A. sendmail -q
B. sendmail -b
C. sendmail -f
D. sendmail -v
A. The -q option causes sendmail to attempt to deliver messages from the queue. Add the -v option to display verbose output.
26. You need to create an email address to accept email for This email address is being protected from spambots. You need JavaScript enabled to view it.. However, you would like abuse reports sent to multiple email addresses within your organization. Which of the following will send email destined for the abuse account to This email address is being protected from spambots. You need JavaScript enabled to view it. and This email address is being protected from spambots. You need JavaScript enabled to view it.?
A. Create a .forward in the home directory for the abuse user and forward email accordingly.
B. Within /etc/aliases, add this: abuse: This email address is being protected from spambots. You need JavaScript enabled to view it., This email address is being protected from spambots. You need JavaScript enabled to view it..
C. Create a .forward file for root and forward email accordingly.
D. Within /etc/aliases, add this: abuse: This email address is being protected from spambots. You need JavaScript enabled to view it.\This email address is being protected from spambots. You need JavaScript enabled to view it..
B. The requirements of multiple email addresses prevent the use of .forward; therefore, it will need to be accomplished in /etc/aliases. The format for multiple email addresses is to separate them with a comma, making option B correct.
27. Which of the following commands sets the hardware clock to Coordinated Universal Time (UTC) based on the current system time?
A. hwclock -systohc -utc
B. hwclock -systohc -localtime
C. hwclock -systohc
D. hwclock -systoutc
A. The -systohc command will set the hardware clock according to the current system time. The use of -utc is required in order to ensure that the time is set to UTC. If -utc is omitted, the time will default to whatever was used last time the command was run, which could be UTC but might also be localtime instead. Therefore, the best option is A.
28. You need to delete all messages from the queue on a Postfix server. Which of the following commands will perform this action?
A. postqueue -remove
B. rm -rf
C. postfix -f
D. postsuper -d ALL
D. The postsuper -d command deletes messages from the queue. The ALL keyword causes all messages to be deleted from the queue. Care should be taken when performing this action because it is irreversible. There is no -remove option to postqueue, and the -f option for Postfix is not relevant. The rm -rf command shown is not specific enough, and it is generally not recommended to manually remove files from a mail queue.
29. Which of the following URLs can be used to view a list of completed print jobs in CUPS?
A. http://localhost:631/jobs?which jobs=completed
B. http://localhost:631?completed
C. http://localhost:631/?completed
D. http://cups/jobs=completed
A. The URL shown will display the jobs area of the local CUPS server with a query string name of which jobs and a value of completed. The other URLs shown are not valid.
30. Which option to the journalctl command will continuously update the display as new log entries are created?
A. -tail
B. -t
C. -f
D. -l
C. Just as the tail -f command will continuously update the display as new content is added, so too does the -f option display new entries for journaicti. The -t option shows messages for the given syslog identifier. There is no -tail or -l option.
31. Assuming that the $ModLoad imudp configuration option has been set in the configuration for rsyslogd, which of the following additional options is necessary to configure the port on which the server will listen?
A. $Port 514
B. $UDPServerRun 514
C. $Listen 514
D. $UDPListen 514
B. The $UDPServerRun option is used for the purpose described. The port on which the server should listen is then provided as the value for this option. The other options shown are not valid configuration items for rsyslogd.
32. Which of the following commands causes the mail queue to be processed on a Postfix server?
A. postqueue -f
B. postqueue -D
C. postfix -q
D. postsuper -q
A. The postqueue -f command is used to flush the queue. The command will process all of the emails that are awaiting delivery. The other commands are not valid for this purpose.
33. When running ntpd, the server will not adjust or synchronize if the time is skewed from the NTP server by a significant amount of time. Which option to ntpd disables this and causes the synchronization process to continue even if there is a large skew?
A. ntpd -noskew
B. ntpd -skewcheck=off
C. ntpd -g 0
D. ntpd -s 0
C. The -g option specifies the maximum offset or skew that can be adjusted for when synchronizing time. When set to 0, there is no offset check.
34. Which option in j ournald. conf controls the maximum file size for individual journal logs?
A. SystemMaxFileSize
B. MaxFile
C. LogFileSize
D. LogSize
A. The SystemMaxFileSize option controls the size of the journal log file to ensure that a log does not cause problems related to disk usage. The systemMaxUse option controls overall size of journal files, and the default for SystemMaxFileSize is one-eighth of the SystemMaxUse setting to allow for rotation of files.
35. Which command can be executed to view completed print jobs?
A. lpstat -q
B. lpq
C. lpstat -W completed
D. lpqueue -c
C. The lpstat command is used for this purpose. The lpstat command displays information about printers, print jobs, and related information. The -w option specifies which jobs to display, complete, or not complete. The lpq command shown as an option is used to view the queue, and the other options are not valid.
36. When configuring a log file for rotation, you need to execute a command to run a script after log file rotation. Which option within the logrotate. conf configuration file can be used to facilitate this behavior?
A. after-rotate
B. run-script
C. rotatecomplete
D. postrotate
D. The postrotate option within a configuration for log rotation can be used for this purpose. After postrotate, a line typically follows with the script or commands to execute. The other options shown for this question are not valid.
37. You are deploying an Exim server and need to work with the firewall to ensure the proper incoming ports are open. Which protocol and port should you allow inbound for normal Simple Mail Transfer Protocol (SMTP) traffic?
A. TCP/23
B. TCP/25
C. TCP/110
D. TCP/143
B. SMTP operates on TCP port 25, and if other servers are contacting your SMTP server, then you’ll need to listen on this port and allow traffic to it as well. Port 23 is used for telnet, port 110 is POP3, and port 143 is Internet Message Access Protocol (IMAP), none of which are necessary for SMTP traffic.
38. Which command should be executed after making a change to the sendmail access database /etc/access?
A. makemap
B. makedb
C. newaccess
D. rebuilddb
A. The makemap command is used to create the hashed database in the correct format for sendmail to use. The other commands are not valid for sendmail.
39. When working with syslog-ng, which of the following is the correct path and filename for the primary configuration file?
A. /etc/syslog-ng/syslog-ng.conf
B. /etc/syslog/syslog-ng.conf
C. /etc/syslog-ng/ng.conf
D. /etc/syslog-ng/ngd.conf
A. The configuration file for syslog-ng is stored in /etc/syslog-ng and is named sysiog-ng.conf. There is not typically an /etc/syslog directory, even on systems without syslog-ng.
40. A developer has created an application and wants to take advantage of syslog for logging to a custom log file. Which facility should be used for an application such as this?
A. syslog
B. kern
C. local#
D. user
C. The application could theoretically use any of the logging facilities, depending on the type of application being developed. However, the requirement to log to a custom log file means that the logs will have a different name and possibly location than the standard logs. Therefore, logging to any of the standard or system- level facilities is not appropriate for this scenario, making one of the local (local0 through local7) facilities appropriate.
41. A user needs to work with printer-related items. Which of the following commands adds the user (called username in the options) to the appropriate group for this purpose?
A. usermod -aG printerusers username
B. usermod -aG lpadmin username
C. usermod -gA lpadm username
D. usermod -a lpadm username
B. The usermod command with the -aG option is used to append a group onto the user’s list of groups. In this case, the user needs to be a member of the lpadmin group.
42. Which option within a logrotate configuration file disables compression of the log file?
A. compressoff
B. limitcompress
C. nocompression
D. nocompress
D. The nocompress option is used to prevent the log file from being compressed or zipped as part of the rotation process. This might be needed on systems where compression negatively affects performance or where additional processing is necessary.
43. Which command should be used to enable printer sharing through CUPS?
A. cupsctl -enable-sharing
B. cupsc -share
C. cupsctl -share-printers
D. cupsc -printer-sharing
C. The cupsctl command should be used with the -share-printers option to enable printing for remote clients within the same subnet. You would then also flag each printer for sharing with the lpadmin command, setting the printer-is-shared option to true.
44. Which command can be used to gather and display statistics about mail processed on a server running sendmail?
A. mailq
B. mailstats
C. statmail
D. sendmailstats
B. The mailstats command is used for the purpose described. Of the other options, the mailq command will display the current mail queue but not statistics on mail that has been processed. The other two options are not valid commands.
45. You need to determine the size of the systemd journals on the system. Which option to journaictl is used for this purpose?
A. -disk-use
B. -disk-usage
C. -disk-space
D. -disk-used
B. The -disk-usage option shows the amount of space consumed by active and archived journals. The other options shown are not valid.
46. You are troubleshooting a problem with printing and believe the CUPS service needs to be restarted. Which of the following commands can be used to restart CUPS on a server running systemd?
A. systemctl restart cups.service
B. systemctl restart cups-service
C. systemctl reboot cups.target
D. systemctl restart cups.target
A. The systemctl command is used for controlling Services. In this case, restart should be sent to the CUPS service as denoted by the name cups.service.
47. You are working with journalctl and need to see only messages that are at a debug priority. Which of the following options enables this scenario?
A. -pri debug
B. -prior debug
C. -d debug
D. -p debug
D. The -p option is used to filter based on priority and the loglevel given in the scenario is debug, making option D correct. The other options are not valid for the purpose described.
48. Which option in a CUPS configuration file causes the daemon to listen on all interfaces on port 631?
A. Port 631
B. Listen All:631
C. Listen 127.0.0.1:631
D. Port All:631
A. The Port configuration option is used for this purpose and is used as an alternative to the Listen directive. With the Listen directive, you will specify address: port. However, option C, while valid syntactically, will listen only on the localhost IP of 127.0.0.1 and not all interfaces.
49. Which command is used to remove an email from the mail queue with Postfix?
A. postsuper -d
B. postmaster
C. postfix -d
D. postdel
A. The postsuper command is used for management of various items with Postfix, including deletion of individual messages from the mail queue. The other commands will not work for the purpose described.
50. Which option to journaicti will clear logs older than five days?
A. -clear=5d
B. -vacuum-time=5d
C. -delete-older=5d
D. -clear-time=5d
B. The -vacuum-time option will be used for this scenario. Time can be specified in seconds, minutes, hours, days, months, weeks, and years.
51. When configuring email forwarding with Procmail, which of the following files is used as a user-based configuration file for Procmail?
A. /home/procmail.conf
B. ~/.procmailrc
C. /etc/procmail.conf
D. ~/procmail.conf
B. The file .procmailrc, found in a user’s home directory, is used by Procmail for processing messages on a per-user basis. The other files are not used by Procmail in a default configuration.
52. Which of the following definitions in /etc/aliases will deliver mail destined to root to two email addresses, This email address is being protected from spambots. You need JavaScript enabled to view it. and This email address is being protected from spambots. You need JavaScript enabled to view it.?
A. [root] =This email address is being protected from spambots. You need JavaScript enabled to view it., This email address is being protected from spambots. You need JavaScript enabled to view it.
B. root: admin webmaster
C. root: admin, webmaster
D. root: This email address is being protected from spambots. You need JavaScript enabled to view it.. This email address is being protected from spambots. You need JavaScript enabled to view it.
D. The format is local-address: destination-address. Each destination address is separated by a comma. The difference between options C and D is that the question specifically asked for addresses @example.com and since the question didn’t specify whether this server was the server for @example. com, the destination addresses needed to be fully qualified.
53. Which of the following commands views the contents of a message that exists in the Postfix queue?
A. postshow
B. postless
C. postmore
D. postcat
D. The postcat command shows the contents of a message from the Postfix queue. The other commands shown are not valid.
54. Within which file will you find errors related to delivery of mail on a Postfix server?
A. /var/log/mail
B. /var/log/postfix.log
C. /var/log/mail.err
D. /var/log/postfix.err
C. The /var/log/mail.err file contains errors related to mail delivery. However, on some systems, mail-related errors may go to a different log, such as /var/log/mail.log or /var/log/mail. info or similar.
55. When testing SMTP Communications between a client and a server, you need to begin the conversation. Which of the following lines shows the beginning of an SMTP conversation using Extended Hello syntax from mail. example. com?
A. BEGIN mail.example.com
B. SMTP mail.example.com
C. HELO mail.example.com
D. EHLO mail.example.com
D. The EHLO command indicates Extended Hello syntax and is followed by the host from which communication has been initiated. Of the other options, the HELO option is valid but is not the Extended Hello syntax specified in the question.
56. Which option to timedatectl shows the available time zones?
A. list-timezones
B. show-tz
C. -tzinfo
D. -timezones
A. The list-timezones option to timedatectl shows the names of time zones and is useful for obtaining the correct time zone name. The other options are not valid with timedatectl.
57. You are viewing a directory listing of the /etc/localtime file and it looks like the following: lrwxrwxrwx 1 root root 35 Oct 30 2018 /etc/localtime -> /usr/share/zoneinfo/America/Chicago . From that directory listing, what can you tell about the file?
A. The file is a symlink to a timezone in /usr/share/zoneinfo.
B. The /usr/share/zoneinfo file is a symlink to /etc/localtime.
C. The /etc/localtime file is a hard link to /usr/share/zoneinfo.
D. The time zone cannot be set because the file must exist as its own separate file.
A. The /etc/localtime file is a symlink to /usr/share/zoneinfo/America/Chicago, making option A correct. Some systems also link /etc/timezone for the same purpose.
58. You need to set the correct time zone on a server. How can you tell what the current time zone is set to?
A. Run the date command.
B. Run the tzdata command.
C. Examine /proc/timezone.
D. Examine /etc/tzdata.
A. The date command shows the current time zone. The other options shown will not work.
59. Which of the following is the configuration file used by the Chrony package?
A. /etc/chrony.cfg
B. /etc/chrony/default.cfg
C. /etc/chrony.conf
D. /etc/chrony.d/chrony.cf
C. The /etc/chrony.conf file is the configuration file used by the Chrony package. The other files do not exist by default.
60. Which option to journalctl queries for only kernel messages?
A. -ok
B. -okern
C. -k
D. -limitk
C. The -k option shows kernel messages only when used with journalctl. The other options shown do not query the Journal.
61. Which command must you run after making a change to email aliases on a server running Postfix?
A. service postfix restart
B. newaliases
C. alias -n
D. postfix -e
B. The newaliases command re-creates the aliases database on servers running Postfix, sendmail, and qmail. There is no need to restart the mail server after running newaliases. The alias command shown in option C will create an alias for the command shell but is not related to Postfix.
62. You need to log output to the systemd Journal from a script. Which of the following commands facilitates this scenario?
A. systemd-log
B. systemd-logger
C. systemd-logm
D. systemd-cat
D. The systemd - cat command logs to the systemd Journal. When given a parameter such as a command, both STDOUT and STDERR are logged. The other commands shown as options are not valid.
63. Which command can be used to remove print Jobs from the queue?
A. lprm
B. lpdel
C. lpqman
D. lprmj
A. The lprm command is used to help manage printer queues by removing Jobs. The other commands shown are not valid.
64. When running from a shell script, which command enables logging to syslog?
A. logd
B. login
C. logit
D. logger
D. The logger command is used to send messages to syslog and can be executed in a shell script context in order to take advantage of the robustness of syslog without having to write separate log management into the script.
65. You need to find the mail queue path on a Postfix server. You’re using postconf -d to view all parameters. Which parameter contains the mail queue path on a Postfix server?
A. mqueue
B. queue_dir
C. mailq_path
D. mqueue_path
C. The mailq_path parameter contains the path to the mail queue for Postfix. You can use this to diagnose problems with the queue directories. The other parameters shown are not valid in Postfix.
66. Which of the following options can be given to journaictl in order to filter based on a service name?
A. _SYSTEMD-SERVICE
B. _SERVICENAME
C. _SYSTEMD_SERVICE
D. _SYSTEMD_UNIT
D. The _SYSTEMD_UNIT filter can be used to show messages related to a single service. Multiple _SYSTEMD_UNIT arguments can be given to show messages for multiple services. The other options shown for this question are not valid.
67. Which command can be used to add a job to a print queue?
A. lpadd
B. lkp
C. lp
D. lpprint
C. The lp command, usually used with the -d option to specify the queue name, is used to add a Job to the specified print queue. The other commands shown as options are not valid.
68. Which of the following files enables per-user email forwarding?
A. ~/.mailforward
B. ~/.forward
C. ~/.formail
D. ~/.forwardmail
B. When the .forward file is found within a user’s home directory, forwarding of email will typically occur when mail is destined for that user.
69. Which argument to the mail command sets the subject for the email to be sent?
A. -E
B. -s
C. -c
D. -f
B. The -s option sets the subject for the email to be sent. The -E option informs mail to not send messages that have an empty body. The -c option enables setting of carbon-copy (CC) addresses. The -f option specifies an alternate mailbox and would not be used for this scenario.
70. Which option to the date command can be used to set the date and time?
A. date -f
B. date -t
C. date -change
D. date -s
D. The -s option sets the date and time as specified within the command. If there is another means to automatically set the date, it may override the change. For example, if ntpd is running, that process may alter the date even after it has been set with date -s.
71. Which option to journaictl will trim the Journal data size so that it consumes the amount specified?
A. -clear-size
B. -vacuum-size
C. -delete-size
D. -consume-max
B. The -vacuum-size option to journalctl will trim the journal data files so that they consume the specified size. It is worth noting that the size may not be exactly that specified because journalctl deletes only archived files.
72. Which option to journaictl filters based on time?
A. -since
B. -time
C. -time-t
D. -filter-time
A. The -since option filters journal messages based on the time elapsed since that specified. There is also a corresponding -until option that enables further time filtering.
73. When viewing the syslog configuration, you notice a minus sign (-) preceding several log files. What is the significance of the - sign in the configuration?
A. The use of - indicates that the log may be rotated any time.
B. The use of - indicates that the system can utilize other logging facilities when appropriate.
C. The use of - omits the disk sync process for every entry into the log.
D. The use of - comments out the line.
74. Which option to ipr sends a print Job to a given destination?
C. The use of - indicates that syslog does not need to sync to disk for every log entry. This can greatly improve performance for busy systems but may cause log entries to be lost if the sync process has not been run prior to a system crash or other issue.
74. Which option to ipr sends a print Job to a given destination?
A. -P
B. -a
C. -p
D. -h
A. The -P option sends a print job to the specified destination. Of the other options shown, -h disables banner printing, and the remaining options do not exist for lpr.
75. Which Postfix-related command is used to provide an overview of the number of messages in the incoming and active queues arranged by age?
A. queuelist
B. postq
C. qshape
D. queueshow
C. The qshape command displays information regarding the number and age of the messages in the Postfix incoming and active queues. Other queues can also be viewed using the command as well. The other commands shown as options for this question are not valid.
76. Within the journald configuration file, which option is used to configure the maximum space used by Journal files?
A. SystemFileSizeLimit
B. SystemMaxFile
C. SystemMaxSize
D. SystemMaxUse
D. The SystemMaxUse configuration option configures how much space journal files can take on the system. The other options shown are not valid, but it is worth noting that there are several options for controlling journal sizes and these options should be examined as part of preparation.
77. Within which directory hierarchy are queue-related messages stored for Postfix?
A. /var/mqueue
B. /var/spool/mailq
C. /var/spool/postfix
D. /var/postfix
C. The /var/spool/postfix directory contains directories and files related to the mail queue for Postfix. The other directories listed are not valid for this scenario.
78. Which option to journaictl can be used to specify an alternate location for Journal data, such as might be the case when retrieving Journal data from a rescue system or a filesystem copy?
A. -alt
B. -journal-location
C. -journal-dir
D. -directory
D. The -directory or -D option can be used to specify an alternate location for the Journal data and would support the scenario described. The other options are not valid with journaicti for the scenario described.
79. Within which directory are system logs normally kept on a Linux system?
A. /etc/logs/
B. /var/logs/
C. /var/log/
D. /tmp/log/
C. The /var/log/ directory is the normal location for system logs, and daemons will typically use this hierarchy for logs as well. For example, some Linux distributions use /var/log/journal/ for systemd Journals. The other directories shown as options do not exist by default.
80. Which shortcut can be used as the destination in an Exim alias to prevent Exim from delivering mail to a certain address, such as when you want to essentially delete the mail rather than deliver it?
A. :del:
B. :block:
C. :blackhole:
D. :deletemail:
C. The : biackhole: option can be used as a destination to prevent Exim from delivering the mail for that particular user or email account. The other options shown for this question are not valid.
81. Which stanza within a CUPS printers. conf configuration file is used to configure a default local printer with CUPS?
A. <LOCAL printerName>
B. <Printer printerName>
C. <DefaultPrinter printerName>
D. <PrintDefault printerName>
C. The <DefaultPrinter printerName> stanza, where printerName is the name of the printer, configures a printer for CUPS.
82. Which of the following commands can be used to remove all jobs queued for printing?
A. lprm -all
B. llrm -del A
C. lprm -
D. lprm -remove ALL
C. The lprm command can be used for this purpose and, when given a single dash, will delete all Jobs from the queue if run as root. The other options given for iprm are not valid.
83. When using the mail command, which option enables setting the From header?
A. -f
B. -r
C. -o
D. -m
B. The -r option enables setting the From header of the email to be sent rather than the currently logged-in user. The -f option specifies a different mailbox and is not useful for this scenario. The -o and -m options do not exist.
84. Which character sequence is used to precede the host or IP in order to specify that TCP should be used for remote system logging in /etc/rsyslog.conf?
A. @TCP
B. @@
C. @
D. :tcp@
B. The @@ symbol specifies that TCP should be used rather than the default @ that normally precedes a host using UDP for remote logging.
85. Within the /etc/systemd/journald.conf file, which key/value pair will enable the Journal to be persistent?
A. Keep=All
B. Store=Persistence
C. Storage=Persistent
D. Keep=Persist
C. The Storage=Persistent key/value pair within the [Journal] stanza of the configuration file enables persistent storage for the Journal. The other key/value pairs are not valid.
86. Which command can be used to monitor the status of chronyd?
A. chronyc
B. chronystat
C. chrony-stats
D. chronyd-stat
A. The chronyc command can be used for monitoring the status of time updates. The other options shown are not valid commands.
87. Within which directory will you find configuration files for various logs that are to be rotated with logrotate?
A. /etc/logrotate
B. /etc/logs
C. /etc/logrotate.d
D. /var/spool/logrotate
C. Individual configuration files for various log file rotation policies are found in /etc/logrotate.d. This directory is included in the primary configuration file /etc/logrotate.conf.
88. Which of the following commands is used to view the pending messages queue on a Postfix server?
A. postqueue -p
B. postconf -pending
C. postqueue -f
D. postsuper pending
A. The postqueue -p command and option view the pending queue. The postqueue -f command causes the queue to be flushed. The other commands shown are valid, but their options are not.