Title: LPIC 102 Q/A / 08 Essential System Services

Q: Which of the following commands is used to examine the systemd journal or log file?
journallist
ctlj
journalctl
jctl
A: 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.

Q: Which system logging facility is used for messages from the kernel?
syslog
kernel
kern
system
A: 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.

Q: To what server address can you set a Network Time Protocol (NTP) client in order to receive time from a regionally local server?
127.0.0.1
192.168.1.100
ntp.example.com
pool.ntp.org
A: 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.

Q: What is the name of the systemd service that provides logging facilities?
systemd-journald
systemd-loggingd
systemd-syslog
journalctl
A: 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.

Q: 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?
new www-data.www-data mode 600
create 600 www-data www-data
new 600 www-data
createlog mode 600 user www-data group www-data
A: 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.

Q: Within which directory hierarchy will you find configuration files related to printing with the Common UNIX Printing System (CUPS) printing system?
/etc/cupsd
/etc/cups.d
/etc/CUPS
/etc/cups
A: 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.

Q: 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?
Allow 192.168.1.0/25
Allow 192.168.1.0/24
Allow 127.0.0.0/8
AllowHosts 192.168.1.0
A: 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.

Q: Which of the following commands will set the date immediately and can be used from the command line in a script?
ntpd
ntpdate pool.ntp.org
settime
time
A: 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.

Q: When executing the ntpq command, you receive a message like read: Connection refused. What would this typically indicate?
The network is down.
The NTP daemon is not running.
The use of NTP is administratively prohibited.
The current user does not have permission to execute ntpq.
A: 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.

Q: Which command is used to query and work with the hardware clock on the system?
hwc
ntpdate
systime
hwclock
A: 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.

Q: Which directory contains a listing of available time zones on a Linux system?
/etc/timezones
/etc/tzdata
/usr/share/zoneinfo
/usr/share/timezones
A: 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.

Q: Which syslog level is used to provide informational messages?
kern
emerg
debug
info
A: 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.

Q: Within /etc/ntp.conf, which of the following configuration lines sets the location of the drift file?
drift /var/lib/ntp/drift
driftfile /var/lib/ntp/drift
drift-file /var/lib/ntp/drift
driftconfig /var/lib/ntp/drift
A: 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.

Q: 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?
mailadmin@example.com
sendmailadmin@example.com
maillogadmin@example.com
logmailadmin@example.com
A: A. The mail 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.

Q: Which of the following commands is used to determine the amount of disk space used by systemd journal logfiles?
journalctl --disk
journalctl -du
journalctl --disk-usage
journalctl -ls
A: 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.

Q: Which of the following commands displays the current mail queue on a Postfix server?
qmail
mailqueue
mail -q
mailq
A: 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.

Q: When you’re running the NTP daemon, which command can you execute to work with the NTP server in an interactive mode?
ntpd
ntpdate
ntpq
ntp-interactive
A: 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.

Q: Assume that you want all email for the root user to be sent to admin@example.com. Which of the following lines in /etc/aliases will accomplish this task?
admin@example.com-> root
root ->admin@example.com
root,admin@example.com
root:admin@example.com
A: 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.

Q: When you’re working with klogd, which option can be used to control the file to which messages are logged?
-d
-f
-v
-l
A: 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.

Q: Which set of programs or packages can be used for setting the system time on a device that is offline frequently?
chrony
htpoffline
ntpd-off
chrondate
A: 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.

Q: Which of the following commands places a file into the print queue?
lpr
lpd
lpq
lpx
A: 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.

Q: Which of the following options to the sendmail command will print information about the mail queue?
-bi
-queue
-bp
-f
A: 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.

Q: Which function of the hwclock command will set the hardware clock to the current system time?
-w
-s
-a
-m
A: 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.

Q: What is the default port for the CUPS administrative web interface?
tcp/53
tcp/8080
udp/456
tcp/631
A: 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.

Q: Which of the following commands causes sendmail to attempt to deliver the messages in its queue?
sendmail -q
sendmail -b
sendmail -f
sendmail -v
A: A. The -q option causes sendmail to attempt to deliver messages from the queue. Add the -v option to display verbose output.

Q: You need to create an email address to accept email for abuse@example.com. 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 admin@example.com and security@example.com?
Create a .forward in the home directory for the abuse user and forward email accordingly.
Within /etc/aliases, add this: abuse:admin@example.com,security@example .com.
Create a .forward file for root and forward email accordingly.
Within /etc/aliases, add this: abuse:admin@example.com\tsecurity@example .com.
A: 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.

Q: Which of the following commands sets the hardware clock to Coordinated Universal Time (UTC) based on the current system time?
hwclock --systohc --utc
hwclock --systohc --localtime
hwclock --systohc
hwclock --systoutc
A: 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.

Q: You need to delete all messages from the queue on a Postfix server. Which of the following commands will perform this action?
postqueue -remove
rm -rf
postfix -f
postsuper -d ALL
A: 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.

Q: Which of the following URLs can be used to view a list of completed print jobs in CUPS?
http://localhost:631/jobs?which_jobs=completed
http://localhost:631?completed
http://localhost:631/?completed
http://cups/jobs=completed
A: 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.

Q: Which option to the journalctl command will continuously update the display as new log entries are created?
-tail
-t
-f
-l
A: 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 journalctl. The -t option shows messages for the given syslog identifier. There is no -tail or -l option.

Q: 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?
$Port 514
$UDPServerRun 514
$Listen 514
$UDPListen 514
A: 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.

Q: Which of the following commands causes the mail queue to be processed on a Postfix server?
postqueue -f
postqueue -D
postfix -q
postsuper -q
A: 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.

Q: 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?
ntpd -noskew
ntpd -skewcheck=off
ntpd -g 0
ntpd -s 0
A: 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.

Q: Which option in journald.conf controls the maximum file size for individual journal logs?
SystemMaxFileSize
MaxFile
LogFileSize
LogSize
A: 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.

Q: Which command can be executed to view completed print jobs?
lpstat -q
lpq
lpstat -W completed
lpqueue -c
A: 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.

Q: 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?
after-rotate
run-script
rotatecomplete
postrotate
A: 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.

Q: 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?
TCP/23
TCP/25
TCP/110
TCP/143
A: 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.

Q: Which command should be executed after making a change to the sendmail access database /etc/access?
makemap
makedb
newaccess
rebuilddb
A: 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.

Q: When working with syslog-ng, which of the following is the correct path and filename for the primary configuration file?
/etc/syslog-ng/syslog-ng.conf
/etc/syslog/syslog-ng.conf
/etc/syslog-ng/ng.conf
/etc/syslog-ng/ngd.conf
A: A. The configuration file for syslog-ng is stored in /etc/syslog-ng and is named syslog-ng.conf. There is not typically an /etc/syslog directory, even on systems without syslog-ng.

Q: 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?
syslog
kern
local#
user
A: 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.

Q: 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?
usermod -aG printerusers username
usermod -aG lpadmin username
usermod -gA lpadm username
usermod -a lpadm username
A: 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.

Q: Which option within a logrotate configuration file disables compression of the log file?
compressoff
limitcompress
nocompression
nocompress
A: 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.

Q: Which command should be used to enable printer sharing through CUPS?
cupsctl --enable-sharing
cupsc --share
cupsctl --share-printers
cupsc --printer-sharing
A: 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.

Q: Which command can be used to gather and display statistics about mail processed on a server running sendmail?
mailq
mailstats
statmail
sendmailstats
A: 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.

Q: You need to determine the size of the systemd journals on the system. Which option to journalctl is used for this purpose?
--disk-use
--disk-usage
--disk-space
--disk-used
A: B. The --disk-usage option shows the amount of space consumed by active and archived journals. The other options shown are not valid.

Q: 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?
systemctl restart cups.service
systemctl restart cups-service
systemctl reboot cups.target
systemctl restart cups.target
A: 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.

Q: 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?
-pri debug
-prior debug
-d debug
-p debug
A: 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.

Q: Which option in a CUPS configuration file causes the daemon to listen on all interfaces on port 631?
Port 631
Listen All:631
Listen 127.0.0.1:631
Port All:631
A: 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.

Q: Which command is used to remove an email from the mail queue with Postfix?
postsuper -d
postmaster
postfix -d
postdel
A: 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.

Q: Which option to journalctl will clear logs older than five days?
--clear=5d
--vacuum-time=5d
--delete-older=5d
--clear-time=5d
A: B. The --vacuum-time option will be used for this scenario. Time can be specified in seconds, minutes, hours, days, months, weeks, and years.

Q: When configuring email forwarding with Procmail, which of the following files is used as a user-based configuration file for Procmail?
/home/procmail.conf
~/.procmailrc
/etc/procmail.conf
~/procmail.conf
A: 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.

Q: Which of the following definitions in /etc/aliases will deliver mail destined to root to two email addresses, admin@example.com and webmaster@example.com?
[root] =admin@example.com, webmaster@example.com
root: admin webmaster
root: admin, webmaster
root:admin@example.com, webmaster@example.com
A: 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.

Q: Which of the following commands views the contents of a message that exists in the Postfix queue?
postshow
postless
postmore
postcat
A: D. The postcat command shows the contents of a message from the Postfix queue. The other commands shown are not valid.

Q: Within which file will you find errors related to delivery of mail on a Postfix server?
/var/log/mail
/var/log/postfix.log
/var/log/mail.err
/var/log/postfix.err
A: 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.

Q: 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?
BEGIN mail.example.com
SMTP mail.example.com
HELO mail.example.com
EHLO mail.example.com
A: 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.

Q: Which option to timedatectl shows the available time zones?
list-timezones
show-tz
--tzinfo
--timezones
A: 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.

Q: 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?
The file is a symlink to a timezone in /usr/share/zoneinfo.
The /usr/share/zoneinfo file is a symlink to /etc/localtime.
The /etc/localtime file is a hard link to /usr/share/zoneinfo.
The time zone cannot be set because the file must exist as its own separate file.
A: 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.

Q: You need to set the correct time zone on a server. How can you tell what the current time zone is set to?
Run the date command.
Run the tzdata command.
Examine /proc/timezone.
Examine /etc/tzdata.
A: A. The date command shows the current time zone. The other options shown will not work.

Q: Which of the following is the configuration file used by the Chrony package?
/etc/chrony.cfg
/etc/chrony/default.cfg
/etc/chrony.conf
/etc/chrony.d/chrony.cf
A: C. The /etc/chrony.conf file is the configuration file used by the Chrony package. The other files do not exist by default.

Q: Which option to journalctl queries for only kernel messages?
-ok
-okern
-k
-limitk
A: C. The -k option shows kernel messages only when used with journalctl. The other options shown do not query the journal.

Q: Which command must you run after making a change to email aliases on a server running Postfix?
service postfix restart
newaliases
alias -n
postfix -e
A: 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.

Q: You need to log output to the systemd journal from a script. Which of the following commands facilitates this scenario?
systemd-log
systemd-logger
systemd-logm
systemd-cat
A: 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.

Q: Which command can be used to remove print jobs from the queue?
lprm
lpdel
lpqman
lprmj
A: A. The lprm command is used to help manage printer queues by removing jobs. The other commands shown are not valid.

Q: When running from a shell script, which command enables logging to syslog?
logd
login
logit
logger
A: 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.

Q: 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?
mqueue
queue_dir
mailq_path
mqueue_path
A: 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.

Q: Which of the following options can be given to journalctl in order to filter based on a service name?
_SYSTEMD-SERVICE
_SERVICENAME
_SYSTEMD_SERVICE
_SYSTEMD_UNIT
A: 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.

Q: Which command can be used to add a job to a print queue?
lpadd
lkp
lp
lpprint
A: 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.

Q: Which of the following files enables per-user email forwarding?
~/.mailforward
~/.forward
~/.formail
~/.forwardmail
A: 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.

Q: Which argument to the mail command sets the subject for the email to be sent?
-E
-s
-c
-f
A: 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.

Q: Which option to the date command can be used to set the date and time?
date -f
date -t
date --change
date -s
A: 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.

Q: Which option to journalctl will trim the journal data size so that it consumes the amount specified?
--clear-size
--vacuum-size
--delete-size
--consume-max
A: 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.

Q: Which option to journalctl filters based on time?
--since
--time
--time-t
--filter-time
A: 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.

Q: When viewing the syslog configuration, you notice a minus sign (−) preceding several log files. What is the significance of the − sign in the configuration?
The use of − indicates that the log may be rotated any time.
The use of − indicates that the system can utilize other logging facilities when appropriate.
The use of − omits the disk sync process for every entry into the log.
The use of − comments out the line.
A: 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.

Q: Which option to lpr sends a print job to a given destination?
-P
-a
-p
-h
A: 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.

Q: Which Postfix-related command is used to provide an overview of the number of messages in the incoming and active queues arranged by age?
queuelist
postq
qshape
queueshow
A: 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.

Q: Within the journald configuration file, which option is used to configure the maximum space used by journal files?
SystemFileSizeLimit
SystemMaxFile
SystemMaxSize
SystemMaxUse
A: 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.

Q: Within which directory hierarchy are queue-related messages stored for Postfix?
/var/mqueue
/var/spool/mailq
/var/spool/postfix
/var/postfix
A: 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.

Q: Which option to journalctl 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?
--alt
--journal-location
--journal-dir
--directory
A: 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 journalctl for the scenario described.

Q: Within which directory are system logs normally kept on a Linux system?
/etc/logs/
/var/logs/
/var/log/
/tmp/log/
A: 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.

Q: 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?
:del:
:block:
:blackhole:
:deletemail:
A: C. The :blackhole: 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.

Q: Which stanza within a CUPS printers.conf configuration file is used to configure a default local printer with CUPS?
<LOCAL printerName>
<Printer printerName>
<DefaultPrinter printerName>
<PrintDefault printerName>
A: C. The <DefaultPrinter printerName> stanza, where printerName is the name of the printer, configures a printer for CUPS.

Q: Which of the following commands can be used to remove all jobs queued for printing?
lprm --all
lprm --del A
lprm -
lprm --remove ALL
A: 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 lprm are not valid.

Q: When using the mail command, which option enables setting the From header?
-f
-r
-o
-m
A: 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.

Q: 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?
@TCP
@@
@
:tcp@
A: B. The @@ symbol specifies that TCP should be used rather than the default @ that normally precedes a host using UDP for remote logging.

Q: Within the /etc/systemd/journald.conf file, which key/value pair will enable the journal to be persistent?
Keep=All
Store=Persistence
Storage=Persistent
Keep=Persist
A: 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.

Q: Which command can be used to monitor the status of chronyd?
chronyc
chronystat
chrony-stats
chronyd-stat
A: A. The chronyc command can be used for monitoring the status of time updates. The other options shown are not valid commands.

Q: Within which directory will you find configuration files for various logs that are to be rotated with logrotate?
/etc/logrotate
/etc/logs
/etc/logrotate.d
/var/spool/logrotate
A: 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.

Q: Which of the following commands is used to view the pending messages queue on a Postfix server?
postqueue -p
postconf -pending
postqueue -f
postsuper pending
A: 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.