CompTIA® Linux+™ Practice Tests

Exam XK0-005

Third Edition

Steve Suehring

Copyright © 2022 by John Wiley & Sons, Inc. All rights reserved.

Published by John Wiley & Sons, Inc., Hoboken, New Jersey.

Published simultaneously in Canada.

978-1-119-87961-9
978-1-119-87962-6 (ebk.)
978-1-119-87963-3 (ebk.)

No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 750-4470, or on the web at www.copyright.com. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at www.wiley.com/go/permission.

Trademarks: WILEY, the Wiley logo, and the Sybex logo are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. CompTIA and Linux+ are trademarks or registered trademarks of CompTIA, Inc. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned in this book.

Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Website is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Website may provide or recommendations it may make. Further, readers should be aware the Internet Websites listed in this work may have changed or disappeared between when this work was written and when it is read.

For general information on our other products and services or for technical support, please contact our Customer Care Department within the United States at (800) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.

Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic formats. For more information about Wiley products, visit our web site at www.wiley.com.

Library of Congress Control Number: 2022932612

Cover image: © Jeremy Woodhouse/Getty Images

Cover design: Wiley

Acknowledgments

Thank you to Kenyon Brown, Kim Wimpsett, and the team responsible for bringing this title to and through the publication process.

About the Author

Steve Suehring is an associate professor of Computing and New Media Technologies at the University of Wisconsin-Stevens Point. Prior to joining the faculty at UWSP, Steve worked in industry for many years. Steve has written several technical books. More information is available at www.braingia.org or follow him on Twitter: @stevesuehring.

About the Technical Editor

Jason W. Eckert is an experienced technical trainer, systems architect, software engineer, and best-selling author in the technology industry. With 45 industry certifications, over 30 years of technology and programming experience, 4 published apps, and 25 published textbooks covering UNIX, Linux, security, Windows Server, Microsoft Exchange Server, PowerShell, BlackBerry Enterprise Server, and video game development, Mr. Eckert brings his expertise to every class that he teaches at triOS College. He was also named 2019 Outstanding Train-the-Trainer from the Computing Technology Industry Association (CompTIA). For more information about Mr. Eckert, visit jasoneckert.net.

Introduction

This book provides practice questions for the CompTIA Linux+ certification Exam XK0-005. The questions are multiple choice, and the difficulty levels vary. The balance of questions closely mirrors the exam objective weighting in emphasis of certain technologies.

How to Get Linux+ Certified

Tests are administered by CompTIA's global testing partner, Pearson VUE. For more information on taking the exam, visit the CompTIA website at www.comptia.org. You can also visit Pearson VUE at www.pearsonvue.com.

How to Use This Book and the Interactive Online Learning Environment and  Test Bank

This book is intended as a supplement to CompTIA Linux+ Study Guide Exam XK0-005, 5th Edition. Ideally, you already own that title and can use the practice questions in this book as you work through the objectives.

This book contains 1,000 questions related to technologies that have been identified by CompTIA as necessary for an individual to obtain Linux+ certification. If you have the requisite skills and experience, then you can attempt the questions within the book, looking up answers as needed. The book can also be used to identify areas where you may need to seek out additional experience and knowledge.

The online test bank at www.wiley.com/go/sybextestprep includes all the questions from the book. Take these practice exams just as if you were taking the actual exam (without any reference material). If you get more than 90 percent of the answers correct, you're ready to take the certification exams.

Note Like all exams, the Linux+ certification from CompTIA is updated periodically and may eventually be retired or replaced. At some point after CompTIA is no longer offering this exam, the old editions of our books and online tools will be retired. If you have purchased this book after the exam was retired, or are attempting to register in the Sybex online learning environment after the exam was retired, please know that we make no guarantees that this exam's online Sybex tools will be available once the exam is no longer available.

Go to www.wiley.com/go/sybextestprep to register and gain access to this interactive online learning environment and test bank with study tools.

Linux+ Certification Exam Objectives: (XK0-005)

Exam objectives can be found at www.comptia.org/certifications/linux.

How to Contact the Publisher

If you believe you’ve found a mistake in this book, please bring it to our attention. At John Wiley & Sons, we understand how important it is to provide our customers with accurate content, but even with our best efforts an error may occur. In order to submit your possible errata, please email it to our Customer Service Team at wileysupport@wiley.com with the subject line “Possible Book Errata Submission.”

Chapter 1
System Management (Domain 1.0)

Which command is used to load a module and its dependencies automatically?

modprobe

lsmod

insmod

rmmod

Which option given at boot time within the GRUB2 boot entry configuration will boot the system into single-user mode?

single-user

su

single

root

What is the command to display the default target on a computer running systemd?

systemctl defaults

update-rc.d defaults

systemctl runlevel

systemctl get-default

Which command is used to obtain a list of USB devices?

usb-list

lsusb

ls-usb

ls --usb

Which command can be used to obtain a list of currently loaded kernel modules?

insmod

modlist

ls ––modules

lsmod

When running with a Unified Extensible Firmware Interface (UEFI) system, to which partition will the EFI system partition typically be mounted?

/etc/efi

/efi

/sys/efi

/boot/efi

Assuming that a USB disk contains a single partition and is made available on /dev/sdb, which command mounts the disk in /media/usb?

mount /dev/sdb1 /media/usb

usbconnect /dev/sdb0 /media/usb

mount /dev/sdb0 /media/usb

usbmount /dev/sdb1 /media/usb

What is one reason a device driver does not appear in the output of lsmod, even though the device is loaded and working properly?

The use of systemd means drivers are not required for most devices.

The use of an initrd.img means support is enabled by default.

The system does not need a driver for the device.

Support for the device has been compiled directly into the kernel.

Which option to rmmod will cause the module to wait until it's no longer in use to unload the module?

-test

-b

-w

-unload

Which command will output a new GRUB configuration file and send the output to the correct location for booting?

update-grub

update-grub boot > /boot/grub.cfg

grub-rc.d

grub-boot

What is the maximum number of primary partitions available on an MBR partitioning system?

Two

Four

One

Five

When working with disk partitions through a tool like fdisk, you see the type 0x82. Which type of partition is this?

Linux

Linux swap

NTFS

FAT

Which file should you edit when using GRUB2 in order to define or set options like the timeout?

/etc/default/grub

/etc/grub/boot

/etc/boot/grub.d

/grub.d/boot

Which option for the grub2-mkconfig command sends output to a file instead of STDOUT?

-stdout

--fileout

-o

-f

Of the following choices, which size would be most appropriate for the /boot partition of a Linux system?

At least 1 GB.

Between 100 MB and 200 MB.

/boot should not be partitioned separately.

Less than 5 MB.

Which of the following commands initializes a physical disk partition for use with LVM?

lvmcreate

pvcreate

vgextend

pvs

Which of the following commands installs GRUB into the MBR of the second SATA disk?

grub2-install /dev/hdb2

grub2-install /dev/sda2

grub2-config /dev/sda

grub2-install /dev/sdb

Which command is used to create a logical volume with LVM?

pvcreate

lvmcreate

lvcreate

volcreate

What is the logical order for creation of an LVM logical volume?

Physical volume creation, volume group creation, logical volume creation

Physical volume creation, logical volume creation, volume group creation

Logical volume creation, physical volume creation, volume group creation

LVM creation, format, partition

Which command should be run after making a change to the /etc/default/grub file?

grub

grub-mkconfig

grub-inst

reboot

Which command is used to change details of a logical volume?

lvmcreate

pvcreate

lvchange

lvmscan

A hard drive is reported as hd(0,0) by the GRUB Legacy configuration file. To which of the following disks and partitions does this correspond?

/dev/hdb2

/dev/hda0

/dev/disk1

/dev/sda1

Which of the following commands installs GRUB into the master boot record (MBR) of the first SATA drive?

grub-install /dev/hda

grub-install /dev/sda

grub-install /dev/hd0,0

grub -i /dev/hda

Which option given to a yum command will install a given package?

update

configure

install

get

After a new hard drive is inserted into the system, what is the correct order to make the drive ready for use within Linux?

Use fdisk to create partitions, and then mount the partitions.

Mount the partitions.

Use fdisk to create partitions and mount -a to mount all the newly created partitions.

Use fdisk to create partitions, then format the partitions using a command such as mkfs, and then mount the partitions.

When working with an rpm package file and using rpm2cpio, by default the output is sent to which location?

STDOUT

The file cpio.out

The file a.out

The file /tmp/cpi.out

Which of the following describes a primary difference between ext2 and ext3 filesystems?

ext3 was primarily a bug-fix update to ext2.

ext3 includes journaling for the filesystem.

ext3 completely changed the tools needed for management of the disks.

ext3 has no significant differences.

According to the Filesystem Hierarchy Standard (FHS), what is the correct location for add-on application software packages?

/etc

/var

/tmp

/opt

Which option to the mount command will mount all filesystems that are currently available in /etc/fstab?

-f

-d

-a

-m

Which option of the systemctl command will change a service so that it runs on the next boot of the system?

enable

startonboot

loadonboot

start

Which option to xfs_metadump displays a progress indicator?

-g

-p

-f

-v

The system is running out of disk space within the home directory partition, and quotas have not been enabled. Which command can you use to determine the directories that might contain large files?

du

df

ls

locate

Which file contains information about the filesystems to mount, their partitions, and the options that should be used to mount them?

/etc/filesystems

/etc/mounts

/etc/fstab

systemd.mount

According to the FHS, what is the proper mount point for removable media?

/etc

/srv

/tmp

/media

How many SCSI devices are supported per bus?

7 to 15

2 to 4

12

4

Which option to umount will cause the command to attempt to remount the filesystem in read-only mode if the unmounting process fails?

-o

-r

-f

-v

Which of the following represents the correct format for the /etc/fstab file?

<directory> <device> <type> <options>

<device> <type> <options>

<device> <type> <options> <directory> <dump> <fsck>

<device> <directory> <type> <options> <dump> <fsck>

Which of the following commands is used to identify the UUID for partitions?

blkid

partprobe

find

cat

The xfs_info command is functionally equivalent to which command and option?

xfs_test -n

xfs_list

tunexfs -i

xfs_growfs -n

Which of the following commands will create a btrfs filesystem on the first SATA drive?

mkfs /dev/sda1

mkfs.btrfs /dev/sda

mkfs.btr2fs /dev/sda1

mkfs –b /dev/sda

Which command and option can be used to determine whether a given service is currently loaded?

systemctl ––ls

telinit

systemctl status

sysctl -a

Which command can be used to change the partitioning scheme for a disk, such as to change the size of existing partitions without deleting them?

resize2fs

parted

mkfs

rfdisk

Which of the following commands will mount a USB device at /dev/sdb1 into the /mnt/usb directory, assuming a VFAT filesystem for the USB drive?

mount -t vfat /dev/sdb1 /mnt

usbmount /dev/sdb1 /mnt/usb

mount -t vfat /dev/sdb1 /mnt/usb

mount -t usb /dev/sdb1 /mnt/usb

Which option within gdisk will change the partition name?

n

b

v

c

Which command on a systemd-controlled system would place the system into single-user mode?

systemctl stop

systemctl isolate rescue.target

systemctl single-user

systemctl runlevel one

Which options to fsck can be used to check all filesystems listed in /etc/fstab while excluding the root partition?

-NR

-AR

-X

-C

Which option in /etc/fstab sets the order in which the device is checked at boot time?

options

dump

fsck

checkorder

Which file is used to indicate the local time zone on a Linux server?

/etc/timez

/etc/timezoneconfig

/etc/timezone

/etc/localtz

Within which directory will you find files related to the time zone for various regions?

/etc/timezoneinfo

/etc/zoneinfo

/var/zoneinfo

/usr/share/zoneinfo

Which option best describes the following, gathered with the ls -la command?

lrwxrwxrwx. 1 root root 35 Jul 8 2014
.fetchmailrc -> .configs/fetchmail/.fetchmailrc

It is a file called .fetchmailrc that is linked using a symbolic link.

It is a file called .configs/fetchmail/.fetchmailrc that is owned by lrwxrwxrwx.

It is a directory called .fetchmailrc that is owned by user Jul.

It is a local directory called .configs/fetchmail/.fetchmailrc.

Which environment variable controls the format of dates and times, such as a 12-hour or 24-hour formatted clock?

LOCALE_DATE

DATE_FORMAT

LC_TIME

LC_DATE

Which of the following encodings provides a multibyte representation of characters?

ISO-8859

UTF-8

ISO-L

UFTMulti

Which command can be used to view the available time zones on a system?

tzd

/etc/locale

timedatectl

tzsel

Which option to lspci is used to display both numeric codes and device names?

-numdev

-n

-nn

-devnum

Which of the following values for the LANG variable will configure the system to bypass locale translations where possible?

LANG=COMPAT

LANG=NONE

LANG=C

LANG=END

If you need to temporarily reconfigure all locale variables and settings for a given session, which environment variable can be used?

LC_LIST

LC_GLOBAL

LC_ALL

ALL_LOCALE

Which of the following commands will set the systemwide time zone to 'America/Los_Angeles'?

ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime

ln -sf America/Los_Angeles ; /etc/localtime

ln -sd /etc/localtime /usr/share/timezone/America/Los_Angeles

ln -sf /etc/localtime /usr/share/zoneinfo/America/Los_Angeles

Which locale-related variable is used for currency-related localization?

LC_MONE

LC_CURRENCY

LC_MONETARY

LC_CURR

Which command is used to query and work with the hardware clock on the system?

hwc

ntpdate

systime

hwclock

Which option to the date command can be used to set the date and time?

date -f

date -t

date --change

date -s

Which function of the hwclock command will set the hardware or BIOS clock to the current system time?

-w

-s

-a

-m

Which of the following commands sets the hardware or BIOS clock to UTC based on the current system time?

hwclock --systohc --utc

hwclock --systohc --localtime

hwclock --systohc

hwclock --systoutc

Which of the following commands shows the current default route without performing DNS lookups on the IP address(es) involved?

netstat -rn

netstat -n

netstat -r

netstat -f

A Serial ATA (SATA) disk will use which of the following identifiers?

/dev/hdX

/dev/sataX

/dev/sdX

/disk/sataX

Which of the following commands adds a default gateway of 192.168.1.1 for interface eth0?

route add default gateway 192.168.1.1 eth0

eth0 --dg 192.168.1.1

route add default gw 192.168.1.1 eth0

route define eth0 192.168.1.1

Which option for the host command will query for the authoritative name servers for a given domain?

-t ns

-t all

-ns

-named

Which option for the ping command enables you to choose the interface from which the ICMP packets will be generated?

-i

-I

-t

-a

Which of the following commands queries for the mail servers for the domain example.com?

dig example.com mx

dig example.com

host -t smtp example.com

dig example.com smtp

Which of the following addresses represents the localhost in IPv6, such as you might find in /etc/hosts?

0:1

::1

127:0:1

:127:0:0:1

Which command can be used to listen for netlink messages on a network?

ip monitor

netlink -a

ip netlink

route

Which of the following configuration lines in /etc/nsswitch.conf causes a lookup for group information to first use local files and then use LDAP?

group: files ldap

lookup: group [local ldap]

group: [local ldap]

group: localfiles ldap

Which of the following dig commands sends the query for example.com directly to the server at 192.168.2.5 rather than to a locally configured resolver?

dig example.com @192.168.2.5

dig -t 192.168.2.5 example.com

dig -s 192.168.2.5 example.com

dig server=192.168.2.5 example.com

Which of the following commands will enumerate the hosts database?

getent hosts

gethosts

nslookup

host

Which of the following configuration lines will set the DNS server to 192.168.1.4 using /etc/resolv.conf?

dns 192.168.1.4

dns-server 192.168.1.4

nameserver 192.168.1.4

name-server 192.168.1.4

Which of the following commands adds a route to the server for the network 192.168.51.0/24 through its gateway 192.168.22.1?

route add -net 192.168.51.0 netmask 255.255.255.0 gw 192.168.22.1

route add -net 192.168.51/24 gw 192.168.22.51

route -net 192.168.51.0/24 192.168.22.1

route add 192.168.51.1 -n 192.168.22.0//255.255.255.0

Which of the following commands shows network services or sockets that are currently listening along with sockets that are not listening?

netstat -a

netlink -a

sockets -f

opensock -l

When partitioning a disk for a mail server running Postfix, which partition/mounted directory should be the largest in order to allow for mail storage?

/etc

/usr/bin

/mail

/var

Which of the following commands will change the default gateway to 192.168.1.1 using eth0?

ip route default gw 192.168.1.1

ip route change default via 192.168.1.1 dev eth0

ip route default gw update 192.168.1.1

ip route update default 192.168.1.1 eth0

Which of the following commands displays the Start of Authority information for the domain example.com?

dig example.com soa

dig example.com authority

dig example.com -auth

dig -t auth example.com

Assume that you want to enable local client services to go to hosts on the network without needing to fully qualify the name by adding the domain for either example.com or example.org. Which option in /etc/resolv.conf will provide this functionality?

search

domain

local-domain

local-order

Which of the following commands prevents traffic from reaching the host 192.168.1.3?

route add -host 192.168.1.3 reject

route -nullroute 192.168.1.3

route add -null 192.168.1.3

route add -block 192.168.1.3

Which of the following commands will emulate the ping command in Microsoft Windows, where the ping is sent for four packets and then the command exits?

ping -n 4

ping -t 4

ping -p 4

ping -c 4

You need to prevent local clients from going to a certain host, www.example.com, and instead redirect them to localhost. Which of the following is a method to override DNS lookups for the specified host?

Add a firewall entry for the IP address of www.example.com to prevent traffic from passing through it.

Delete www.example.com from the route table using the route command.

Add a null route to prevent access to the IP address for www.example.com.

Add an entry for www.example.com in /etc/hosts to point to 127.0.0.1.

Which of the following commands should be executed after running ip route change?

ip route flush cache

ip route reload

ip route cache reload

ip route restart

Which option should be used to send a DNS query for an SPF record with dig?

-t txt

-t spf

-t mx

-t mailspf

When you're viewing the available routes using the route command, one route contains flags UG while the others contain U. What does the letter G signify in the route table?

The G signifies that the route is good.

The G signifies that the route is unavailable.

The G signifies that this is a gateway.

The G signifies that the route is an aggregate.

Which of the following commands requests a zone transfer of example.org from the server at 192.168.1.4?

dig example.org @192.168.1.4 axfr

dig example.org @192.168.1.4

dig example.org @192.168.1.4 xfer

dig example.org #192.168.1.4 xfer

Which yum option displays the dependencies for the package specified?

list

deplist

dependencies

listdeps

Which of the following commands can be used to display the current disk utilization?

df

du

diskutil

diskuse

You are working with a legacy CentOS 5 system and need to re-create the initial RAM disk. Which of the following commands is used for this purpose?

mkinitrd

mkramdisk

mkdisk --init

mkfs.init

Which of the following commands is used to display the currently loaded modules on a running system?

ls -mod

lsmod

tree

mod --list

Which of the following commands creates a list of modules and their dependencies?

lsmod

depmod

modlist

listmod

Which option to sysctl displays all values and their current settings?

-a

-b

-d

-c

Which of the following commands installs a kernel module, including dependencies?

lsmod

modprobe

modinst

instmod

Which command is used to determine the modules on which another module depends?

modinfo

modlist

modprobe

tracemod

Which of the following commands inserts a module into the running kernel but does not resolve dependencies?

lsmod

modinstall

insmod

moduleinst

Which option to modprobe will remove a module and attempt to remove any unused modules on which it depends?

-v

-r

-d

-f

Within which of the following directories will you find blacklist information for modules loaded with modprobe?

/etc/blacklist

/etc/modprobe.d

/etc/blacklist.mod

/etc/modprobe

When working with a CentOS 6 system, which command is used to create the initial RAM disk?

mkinit

dracut

mkraminit

mkinitfs

If you'd like a value set with the sysctl command to take effect on boot, within which file should you place the variable and its value?

/etc/sysctl.cfg

/etc/sysctl.conf

/lib/sysctl

/var/sysctl.conf

Which of the following options to modprobe will show the dependencies for a module?

--show-deps

--show-depends

--deps

--list-depends

Which options for the rpm command will display verbose output for an installation along with progress of the installation?

-ivh

-wvh

––avh

––ins-verbose

When working with UEFI, which of the following commands changes the boot order for the next boot?

efibootmgr -c

efibootmgr -b -B

efibootmgr -o

efibootmgr -n

Which bootloader can be used to boot from ISO with ISO9660 CD-ROMs?

ISOLINUX

EFIBOOT

ISOFS

BOOTISO

When using UEFI, which of the following files can be used as a bootloader?

shim.uefi

shim.efi

shim.fx

efi.shim

Which of the following commands, executed from within the UEFI shell, controls the boot configuration?

bootcfg

bcfg

grub-install

grcfg

Which of the following can be identified as an initial sector on a disk that stores information about the disk partitioning and operating system location?

Minimal boot record (MBR)

Master boot record (MBR)

Init sector

Master partition table (MPT)

When using PXE boot, which file must exist within /tftpboot on the TFTP server for the system that will use PXELINUX for its bootloader?

pxelinux.tftp

pxelinux.boot

pxelinux.conf

pxelinux.0

Which option to grub-install will place the GRUB images into an alternate directory?

--boot-dir

-b

-boot

--boot-directory

When using a shim for booting a UEFI-based system, which of the following files is loaded after shim.efi?

grubx64.cfg

grub.conf

grubx64.efi

efi.boot

Part of the EXT tools, which option to the mke2fs command sets the type of filesystem to be created?

-f

-a

-t

-e

Which file is used to store a list of encrypted devices that are to be mounted at boot?

/etc/cryptdev

/etc/crypttab

/etc/encrtab

/etc/fsencrypt

Which command will search for a package named zsh on a Debian system?

apt-cache search zsh

apt-get search zsh

apt-cache locate zsh

apt-search zsh

Within which directory will you find the repositories used by yum?

/etc/yum.conf

/etc/repos

/etc/yum.conf.d

/etc/yum.repos.d

You are performing an xfsrestore. The xfsdump was executed with a block size of 4M. Which option do you need to invoke on xfsrestore in order for it to successfully use this dump?

-b 4M

-g 1M

-i 1M

-k 1028K

You see the word defaults within /etc/fstab. Which options are encompassed within the defaults?

ro, exec, auto

rw, suid, dev, exec, auto, nouser, async

rw, exec, auto, nouser, async

rw, exec, nouser, async, noauto, suid

Which of the following options to xfsdump sets the maximum size for files to be included in the dump?

-p

-s

-z

-b

Which partition type is used to indicate a software RAID array, such as an array built with mdadm?

0xmd

-x-

0xRD

0xFD

When working with World Wide Identifiers (WWIDs), within which directory on a Red Hat server will you find symlinks to the current /dev/sd device names?

/dev/disk/wwid

/dev/wwid

/dev/disk/by-id

/dev/sd.wwid

Which of the following commands displays information about a given physical volume in an LVM setup?

pvdisp

pvlist

pvdisplay

pvl

When viewing information in /dev/disk/by-path using the command ls -l, which of the following filenames represents a LUN from Fibre Channel?

/dev/fc0

pci-0000:1a:00.0-fc-0x500601653ee0025f:0x0000000000000000

pci-0000:1a:00.0-scsi-0x500601653ee0025f:0x0000000000000000

/dev/fibre0

Which of the following commands displays path information for LUNs?

luninfo -a

ls -lun

multipath -l

dm-multi

Which command is used to remove unused filesystem blocks from thinly provisioned storage?

thintrim

thtrim

fstrim

fsclean

When using tune2fs to set an extended option such as stripe_width, which command-line option is needed to signify that an extended option follows?

-extend

-E

-e

-f

Which option to mdadm is used to create a new array?

--create

--start

--begin

--construct

Information about logical volumes can be found in which of the following directories?

/dev/lvinfo

/dev/map

/dev/mapper

/dev/lvmap

Which option to mdadm watches a RAID array for anomalies?

--mon

--watch

--monitor

--examine

When running mdadm in monitor mode, which option within /etc/mdadm.conf sets the destination for email if an issue is discovered?

MAILTO

MAILADDR

MAILFROM

MAILDEST

When using the ip command, which protocol family is used as the default if not otherwise specified?

tcpip

ip

inet

arp

Which command is used for setting parameters such as the essid, channel, and other related options for a wireless device?

ifconfig

iwconfig

wlancfg

ifcfg

Which of the following commands shows network sockets and their allocated memory?

ss -m

mpas

mem

free

Which option to the ss command shows the process IDs associated with the socket?

-l

-a

-p

-f

On a Debian system, within which directory hierarchy will you find configuration information and directories to hold scripts to be run when an interface is brought up or taken down?

/etc/netconf

/etc/netconfig

/etc/net.conf.d

/etc/network

Which of the following characters are valid for hostnames in /etc/hosts?

Alphanumerics, minus, underscore, and dot

Alphanumerics, minus, and dot

Alphanumerics and dot

Alphanumerics

Which of the following configuration lines in /etc/resolv.conf enables debugging?

debug

options debug

option debug

enable-debug

The system contains an NFS mounted filesystem that has become unreachable. Which option should be passed to umount in order to force the unmounting of the filesystem?

-nfs

--fake

-f

-n

Which of the following commands will send the output of the grub2-mkconfig command to the correct location for booting?

grub2-mkconfig --output=/boot/grub2/grub.cfg

grub2-mkconfig --file=/boot/grub2.menu

grub2-mkconfig --file=/boot/grub.lst

grub2-mkconfig --output=/boot/menu.lst

Which PXE Linux binary file is required for booting from HTTP or FTP?

lpxelinux.0

pxelinux.http

netpxlinux.0

netpxe.0

The file /etc/grub2.cfg is typically a symbolic link to which file?

/boot/grub.conf

/boot/grub2/grub.cfg

/boot/grub2.conf

/etc/sysconfig/grub2.cfg

Which of the following describes a difference between vmlinuz and vmlinux?

vmlinuz is used for zOS systems, and vmlinux is used for x86 architecture.

vmlinuz is used for 64-bit systems, and vmlinux is used for 32-bit systems.

vmlinuz is compressed, whereas vmlinux is not.

vmlinuz contains additional binary code for certain systems.

Which of the following is the location in which kernel modules are stored?

/usr/modules

/modules

/usr/lib/modules/{kernel-version}

/usr/modules/{kernel-version}

Which rpm option can be used to verify that no files have been altered since installation?

-V

-v

––verbose

––filesum

Which of the following is not typically used to store shared libraries?

/lib

/etc/lib

/usr/lib

/usr/local/lib

Which of the following commands updates the package cache for a Debian system?

apt-get cache-update

apt-cache update

apt-get update

apt-get upgrade

You need to update the configuration files for package repositories. Within which directory are details of the current package repositories stored on a Debian system?

/etc/apt.list

/etc/sources.list

/etc/apt/sources.list.d/

/etc/apt.d/sources.list

Which of the following commands is used to change the keyboard layout settings?

keybrdctl

keyctl

localectl

localemap

Which of the following directories contains configuration files related to networking?

/etc/netdevices/

/etc/netcfg/

/etc/config/network/

/etc/sysconfig/network-scripts/

You need to change the label that has been applied to a filesystem. The filesystem is formatted as EXT4. Which EXT tool can be used to change the label?

e2label

e4label

fslabel.ext4

fslabel

Which command should be used to make changes to the choices made when a Debian package was installed?

dpkg-reconfigure

dpkg -r

dpkg ––reconf

apt-get reinstall

Which option for yum performs a search of the package cache?

seek

query

––search

search

Assume you need to add a kernel module with a custom command, such as to specify options at load time. Within which file could you add this configuration?

/etc/modprobe-cfg

/etc/modprobe.conf

/etc/modprobe.cf

/etc/modprobe.cfg

Which command option for rpm can be used to show the version of the kernel?

rpm kernel

rpm -q kernel

rpm search kernel

rpm ––list kern

Which command is used to install a kernel into the /boot directory, using the files from /usr/lib/kernel?

kernel-ins

ins-kernel

install-kernel

kernel-install

Which option in /etc/yum.conf is used to ensure that the kernel is not updated when the system is updated?

exclude=kernel*

exclude-kernel

updatekernel=false

include-except=kernel

When using fdisk to partition a disk, you have two partitions created for the system but still have leftover space, also called unallocated space, on the drive. What is another name used to refer to unallocated space?

Highly available

Redundant

Raw device

Partition forward

Which command searches for and provides information on a given package on a Debian system, including whether the package is currently installed?

dpkg -i

dpkg -s

apt-cache

apt-info

Which of the following installs a previously downloaded Debian package?

dpkg -i <package name>

apt-install <package name>

apt-slash <package name>

dpkg -U <package name>

You need to obtain information about a package installed on an OpenSUSE system that uses the zypper command. Which of the following options to the zypper command displays information about the package?

inf

getInfo

info

i

Which type of storage would be the most appropriate format to store a large object as a single file in a cloud environment?

File

ext2

cifs

Blob

You need to find available packages on a Fedora system managed by the dnf package system. Which option to the dnf command looks for a given package?

search

info

find

locate

Which of the following real filesystems can be resized using resize2fs?

nfs

xfs

ext3

cifs

Which subcommand to the virsh command is used to connect to the hypervisor?

plug

hypervisorconnect

conhyper

connect

You need to determine if ASCII and Unicode are supported on the system. Which option to the iconv command shows the available character sets on a given system?

--showchar

--show

--list

--all

Which of the following best describes the /dev/ filesystem?

The /dev/ filesystem is used for storing device information for connected devices.

The /dev/ filesystem is used for configuration files.

The /dev/ filesystem is used for development.

The /dev/ filesystem is used to list devices for compilation into the kernel.

Which of the following files shows the currently mounted filesystems?

/etc/fstab

/proc/mounts

/fs

/root/mounts

When working with a Microsoft Windows–based filesystem, you see that it is mounted as a CIFS mount. What does CIFS stand for?

Common Information File Sharing

Common Internet File System

Cloned Internet File Sharing

Created In Five Seconds

When using sed for a substitution operation, which option must be included so that the substitution applies to the entire line rather than just the first instance?

g

a

r

y

Which option to the blkid command purges the cache to remove devices that do not exist?

-p

-a

-g

-m

While you can use blkid to obtain the UUIDs for filesystems in order to facilitate storage space monitoring and disk usage, which location on the filesystem also shows this information?

/dev/diskbyuuid

/dev/uuid

/dev/fs/uuid

/dev/disk/by-uuid

In a scripting scenario, you need to enable legacy locations for things like networking. Which file can be used for storing network configuration?

/etc/netdev

/etc/networking

/etc/sysconfig/network

/etc/sysconfig/netdev

You are attempting to use rmdir to remove a directory, but there are still multiple files and other directories contained within it. Assuming that you're sure you want to remove the directory and all of its contents, what are the command and arguments to do so?

rm -f

rm -rf

rmdir -a

rmdir -m

Which of the following commands will provide the usernames in a sorted list gathered from the /etc/passwd file?

cat /etc/passwd | awk -F : '{print $1}' | sort

sort /etc/passwd | cut

echo /etc/passwd

cat /etc/passwd | awk '{print $1}' | sort

What will be the result if the touch command is executed on a file that already exists?

The access timestamp of the file will change to the current time when the touch command was executed.

The file will be overwritten.

There will be no change.

The file will be appended to.

Which option to both mv and cp will cause the command to prompt before overwriting files that already exist?

-f

-Z

-r

-i

Which file contains the current list of partitions along with their major and minor numbers and the number of blocks?

/dev/disk

/dev/partitions

/proc/disk

/proc/partitions

Assuming a block storage device used for virtualization of sda, which file can be used to view the number of read I/O requests for the device?

/proc/sys/sda

/proc/sys/sda/stat

/sys/block/sda/stat

/sys/disk/sda/stat

The current hierarchy on the server contains a directory called /usr/local. You need to create an additional directory below that called /usr/local/test/october. Which command will accomplish this task?

mkdir -p /usr/local/test/october

mkdir /usr/local/test/october

mkdir -r /usr/local/test/october

mkdir -f /usr/local/test/october

What command is used to bring a command to foreground processing after it has been backgrounded with an &?

bg

fore

4g

fg

You are using the Vi editor to change a file, and you need to exit. You receive a notice indicating “No write since last change.” Assuming you want to save your work, which of the following commands will save your work and exit Vi?

:wq

:q!

dd

x

When using a multipath device managed by multipathd and found in /dev/disk/by-multipath, what is the name given to the identifier for that device that is globally unique?

UUID

WWID

GUID

DISKID

You have attempted to stop a process using its service command and also using the kill command. Which signal can be sent to the process using the kill command in order to force the process to end?

-15

-f

-9

-stop

When editing with Vi, which command changes into insert mode and opens a new line below the current cursor location?

f

a

o

i

While recovering from a kernel panic and using the console, you are having difficulty working with the console due to continual messages being displayed on the console itself. Which option to dmesg can be used to disable logging to the console?

-o "no logging console"

-D

-Q

-F

Which option to rmmod forces the module to be unloaded?

-f

-a

-w

-h

Which command-line option modifies the behavior of depmod such that only newer modules are added when comparing modules.dep?

-A

-B

-C

-D

Which command prints device and partition information in a tree-like structure, including partition size and current mount status?

fsck

lsblk

blkshow

shblk

You need to create a script for use with the parted command. When using the parted command to obtain a list of partitions, which additional option formats the output such that it can be more easily parsed by a script?

-p

-S

-m

-v

Which command is used to create an Ethernet bridge?

bridgecon

brctl

bridgeman

BridgeManager

Which kill signal can be sent in order to restart a process?

-HUP

-RESTART

-9

-SIG

Which command will move all files with a .txt extension to the /tmp directory?

mv txt* tmp

move *txt /temp

mv *.txt /tmp

mv *.txt tmp

When using nslookup interactively, which of the following commands changes the destination to which queries will be sent?

dest

server

queryhost

destination

Another administrator made a change to one of the local scripts stored in /usr/local/bin and used for administrative purposes. The change was also immediately reflected in the copy of the script in your home directory. However, when you examine the file with ls, it appears to be a normal file. What is the likely cause of such a scenario?

The file was executed after edit.

The administrator copied the file to yours.

Your file is a hard link to the original.

The file has been restored from backup.

Which option to ln creates a symlink to another file?

-sl

-s

-l

--ln

When using ls -la to obtain a directory listing, you see an object with permissions of lrwxrwxrwx. What type of object is this?

It is a directory.

It is a symlink.

It is a temporary file.

It is a local file.

On a system using SysVinit as part of the basic boot process, in which directory are startup and shutdown scripts for services stored?

/etc/init-d

/etc/init

/etc/sysV

/etc/init.d

Which option to the cp command will copy directories in a recursive manner?

-v

-R

-Z

-i

Which option to df displays the output in human-readable format?

-h

-m

-j

-s

Which command creates a TCP connection to the server www.example.com on port 80?

nc www.example.com 80

nc www.example.com

nc www.example.com:80

nc:80 www.example.com

Which option to the file command specifies that file should examine compressed files?

-a

-z

-w

-b

Which option to Vim enables editing of binary or executable files?

-a

-b

-c

-d

When using the rmdir command, which option also removes child directories?

-c

-p

-m

-a

Emptying or clearing a block device is sometimes accomplished by writing zeroes to the device. Which file is used for this purpose?

/dev/format

/dev/go

/dev/zero

/tmp

Which option to zip updates files within the archive but does not add files?

-a

-f

-d

-e

Which of the following will execute a job through cron at 12:15 a.m. and 12:15 p.m. every day?

0,12 15 * * *

15 0,12 * * *

15 * * * 0/12

*/12 * * * 15

Which file is used to provide a list of users that can add and delete cron jobs?

/etc/cron.job

/etc/cron.allow

/etc/cron.users

/etc/crontab

Which of the following commands schedules a series of commands to execute one hour from now?

atq +1hr

at now + 1 hour

atq

at -1

Which of the following best describes the /proc filesystem?

/proc contains information about files to be processed.

/proc contains configuration files for processes.

/proc contains information on currently running processes, including the kernel.

/proc contains variable data such as mail and web files.

Which option to fdisk provides a list of partitions on a given device?

-s

-l

-e

-d

Within which directory would you find a list of files corresponding to the users who have current cron jobs on the system?

/var/spool/cron/crontabs

/var/spool/jobs

/etc/cron

/etc/cron.users

Which command deletes an at job with an ID of 3?

atq

at -l

atrm 3

rmat 3

Which of the following is used as a system-wide cron file?

/etc/cron.d

/etc/cron.sys

/etc/crontab

/etc/cron.tab

Within which directory will you find scripts that are scheduled to run through cron every 24 hours?

/etc/cron.daily

/etc/cron.weekly

/etc/cron.hourly24

/etc/crontab

The system that you're working with recently had a hard drive failure, resulting in degraded storage. A new hard drive has been installed and Linux has been restored from backup to the drive. However, the system will not boot and instead shows a grub > prompt. Within the grub > prompt, which command will show the current partitions as seen by GRUB?

ls

showPart

partitionlist

ps

A legacy PATA disk is used to boot the system. You recently added an internal DVD drive to the computer, and now the system will no longer boot. What is the most likely cause?

The BIOS has identified the DVD drive as the first disk, and therefore the system can no longer find the Linux partition(s).

The hard drive became corrupt when the DVD drive was installed.

The hot swap option has not been enabled in the BIOS.

The DVD drive is not detected by the computer and needs to be enabled first in the BIOS and then in Linux prior to installation.

Which of the following will run a command called /usr/local/bin/changehome.sh as the www-data user when placed in /etc/crontab?

1 1 * * * www-data /usr/local/bin/changehome.sh

www-data changehome.sh

*/1 www-data changehome.sh

* * */www-data /usr/local/bin/changehome.sh

Which command and option are used to update a Debian system to the latest software?

apt-update

apt-get upgrade

dpkg -U

apt-cache clean

You need to write a script that gathers all the process IDs for all instances of Apache running on the system. Which of the following commands will accomplish this task?

ps auwx | grep apache

pgrep apache

processlist apache

ls -p apache

Which command can be run to determine the default priority for processes spawned by the current user?

prio

nice

renice

defpriority

Which of the following commands shows the usage of inodes across all filesystems?

df -i

ls -i

du -i

dm -i

Which command will list the cron entries for a given user as denoted by <username>?

crontab -l -u <username>

crontab -u <username>

cron -u <username>

cronent -u <username>

You are having difficulty with an interface on the server, and it is currently down. Assuming that there is not a hardware failure on the device itself, which command and option can you use to display information about the interface?

ifconfig -a

ifup

netstat -n

ifconfig

Which option to the traceroute command will use TCP SYN packets for the path trace?

-T

-t

-s

-i

When troubleshooting an issue where SSH connections are timing out, you think the firewall is blocking SSH connections. Which of the following ports is used for Secure Shell communication?

TCP/23

TCP/25

TCP/22

TCP/2200

Which options for netcat will create a server listening on port 8080?

netcat -p 8080

nc -l -p 8080

nc -p 8080

nc -s 8080

Which of the following commands displays the Start of Authority information for the domain example.com?

dig example.com soa

dig example.com authority

dig example.com -auth

dig -t auth example.com

When configuring a local NTP server role, to what server address can you set the server's NTP client?

127.0.0.1

192.168.1.100

ntp.example.com

pool.ntp.org

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

You are troubleshooting a DNS problem using the dig command and receive a “status: NXDOMAIN” message. Which of the following best describes what NXDOMAIN means?

NXDOMAIN means you have received a non-authoritative answer for the query.

NXDOMAIN means the domain or host is not found.

NXDOMAIN indicates a successful query.

NXDOMAIN signifies that a new domain record has been added.

Which of the following commands can be used to restart the CUPS service after a configuration change on a server running systemd?

systemctl restart cups.service

systemctl restart cups

systemctl reboot cups.target

systemctl restart cups.target

You need to temporarily prevent users from logging in to the system using SSH or other means. Which of the following describes one method for accomplishing this task?

Run touch /etc/nologin.

Disable sshd.

Remove /etc/login.

Add a shadow file.

When expiring a user account with usermod -e, which of the following represents the correct date format?

YYYY-MM-DD

MM/DD/YYYY

DD/MM/YY

MM/DD/YY HH:MM:SS

Which of the following commands can be used to stop a given service, such as httpd.service, from starting on boot with a systemd-based system?

systemctl disable httpd.service

systemctl stop httpd.service

systemd disable httpd.service

systemd enable httpd.service boot=no

Which of the following commands searches the entire filesystem for files with the setuid bit set?

find ./ -perm suid

find / -perm 4000

find / -type suid

find / -type f -perm setuid

You are upgrading the kernel that has been previously compiled on the same server. Which of the following commands incorporates the contents of the existing kernel configuration into the new kernel?

config --merge

make oldconfig

merge config

int configs

Which of the following commands should you execute after making changes to systemd service configurations in order for those changes to take effect?

systemd reload

reboot

systemctl daemon-reload

systemctl reboot

As a system administrator, you need to change options for automount. Which of the following files is the default configuration file for the autofs automounter?

/etc/autofs

/etc/auto.master

/etc/autofs.conf

/etc/automounter.conf

Which of the following directory hierarchies contains information such as the WWN for Fibre Channel?

/sys/class/wwn

/sys/class/fc_host

/sys/class/fclist

/sys/class/fc/wwn

Which option to the rsync command provides archive mode?

-r

-o

-a

-f

When compiling software such as with the gcc compiler, which of the following is the recommended name for a file containing commands and relationships used with the make command?

Makefile

makefile

make.file

Makefile.txt

You have downloaded a source file with the extension .gz. Which of the following commands will uncompress the file?

unzip

gunzip

dezip

uncomp

Which target for make, typically included in the makefile for most projects, will place compiled files into their final destination and perform other operations such as making the appropriate files executable?

list

distclean

run

install

When creating a local package repository, which option within the .repo file in /etc/yum.repos.d/ is used to set the URL for the repository?

url

repourl

httpurl

baseurl

When running the lsblk command, there is no separate partition listed for /boot. From which partition is the system likely booted?

There is a /boot partition under the / partition.

The /boot partition is hidden.

The system has not yet built the /boot partition.

The /boot partition does not show up with lsblk.

Which of the following commands displays the currently open ports and the process that is using the port?

netstat -a

lsof -i

ps auwx

netlist

Which option to the wget command logs output?

-r

-o

-b

-k

When executed on a systemd-enabled server, the service status command is equivalent to which command?

systemd status

journald status

service-systemd status

systemctl status

Which signal to the kill command can be used to signal that BIND should reload, including its configuration?

-15

-1

-9

-2

You are troubleshooting a daemon process and have started the daemon manually from the command line so that it does not fork into the background. Which key combination can be used to terminate the daemon?

Ctrl+A

Ctrl+B

Ctrl+C

Ctrl+D

Which service command is used to shut down a service?

shutdown

stop

norun

runstop

Which subcommand with hostnamectl can be used to set the type of machine on which it is running?

set-machine

machine-type

set-type

chassis

Which option to the curl command sets the local filename to which the output will be saved?

-f

-o

-O

-l

Which of the following commands searches a server for files with the setgid bit enabled?

find / -perm 4000

find ./ -perm setgid

grep setgid *

find / -perm 2000

You need to redirect output for a long-running process but do not need to see or capture the output. To which location can you redirect output so that it does not consume disk space?

A regular file

/dev/null

/dev/random

A network interface

Which target for the service command will cause a daemon to reread its configuration files without restarting the daemon itself?

read

load

start

reload

You have executed a daemon process manually from the command line and now need to suspend the process. Which key combination can be used for this purpose?

Ctrl+S

Ctrl+C

Ctrl+Z

Ctrl+B

You have been asked to recommend a simple command-line-based text editor for a beginning user. Which of the following should you recommend?

Vi

Nano

nc

ShellRedirect

You need to ensure that a service does not start on a systemd system. Which systemctl command should be used for this purpose?

disable

delete

mask

norun

Which command can be used to print using a specially formatted string?

printf

echo

print

here

You need to copy a file to a remote system, but that remote system does not have FTP or any other file-sharing services running. You have the ability to SSH into the server. Which of the following commands can be used for this purpose?

scp

ncftp

go

xfer

Which of the following describes a method for changing the sort order when using the top command such that the highest memory utilizers will be shown at the top of the list?

Within top, type o and then select mem.

Within top, press Shift+F, scroll to %MEM, press s to select, and then press Q to quit.

Within top, press S and then select %MEM.

Within top, press Shift+S, select %MEM, then press Q to quit.

Which option to the fsck command causes it to run the check even if the filesystem is apparently marked as clean?

-f

-m

-a

-c

One of your customers needs to transfer a large file and is asking for FTP to be enabled on the server. Thinking of security, what options can you offer that are more secure?

USB

Email (SMTP)

SSL

SFTP

You need to extract files from a backup created with an older version of HPUX. The tar command does not seem to work for these files. Which of the following may be able to extract from this backup?

gzip

bzip2

cpio

hpb

You believe that the system has been broken into and files may have been changed. After taking the system offline and unmounting one of the affected partitions, what could you do next?

Use dd to make an image of the partition to preserve it.

Create a backup using tar.

Examine the partition with fdisk.

Use mkfs to reformat the partition.

Which option to the zip command causes the command to traverse directories?

-g

-m

-r

-a

You are working on a Debian system and need to set ownership on a file such that the user used to execute Apache can write to the file. What command can you use to determine which user Apache is running as?

ps auwx | grep apache

ls -a

free | grep httpd

monapache

When scripting for build automation, you need to run a configure script prior to running the make command. Which of the following will execute the configure script, assuming that it's in the same directory as the script invoking it?

configure

./configure

../configure

/configure

Which command can be used to change the size of a logical volume when using Logical Volume Manager?

vgs

lvresize

vgcreate

lvs

Which file contains information about RAID arrays on a Linux system?

/proc/mdstat

/raidstat

/var/raidinfo

/etc/raid.txt

When working with mdadm, which command-line argument is used to specify things like striping and parity?

--layout

-R

--level

-x

Which command displays Desktop Management Interface information?

dmidump

dlad

dmid

dmidecode

SSHFS is an example of which type of filesystem use?

Attachment

Disk

RAID

FUSE

Which of the following best describes .rpmnew and .rpmsave files?

The .rpmnew file contains RPM files and their hashes while .rpmsave contains a list of saved hashes.

The .rpmnew file contains new RPM files available for download while .rpmsave contains a list of files that have been saved locally.

The .rpmnew file contains a list of RPM files that have changed since the last save while .rpmsave is a backup of the last .rpmnew file.

The .rpmnew file contains a new configuration file for a package when local changes exist to the configuration file while .rpmsave contains the local configuration file when a new file is included in the package.

You are using the top command to monitor processes and you notice that the nc command is consuming a lot of CPU cycles. Which command can be used to change the priority of the command?

renice

nice

ps

top

Which command is used to create a packaged application to be distributed with Flatpak?

flatpak-builder

flatpak-create

flatpak-pack

flatpak-compile

Which background process runs to maintain the list of snap packages available on an Ubuntu system?

snapper

snapperd

snapdaemon

snapd

Which tool is used to create a sandboxed AppImage package?

appimagetool

apptool

ocon

app-ocon

Which network-related tool combines elements of both ping and traceroute?

tcpdump

wireshark

mtr

nmcli

Which option to resolvectl specifies the protocol?

-f

-x

-p

-m

Which command shows the background processes related to the current shell?

jobs

htop

pidof

-m

Which of the following commands displays Media Access Control (MAC) to IP address association?

arp

-x

-p

-m

As root, you run the command cd ~ followed by pwd to print the working directory. What is the expected output?

/home

/root

/sbin

/bin

Which command can be used to determine a file type?

file

xz

lsof

prep

When running the ps command you notice that a process has a Z in the state field. What does Z represent?

Sleeping

Running

Stopped

Zombie

You need to kill a process using its name rather than its process id. Which command can be used for this purpose?

pkill

pend

pterminate

kp

You need to change directory one level up from the current directory. Which command accomplishes this task?

cd .

cd ~

mv ~

cd ..

Chapter 2
System Operations and Maintenance (Domain 2.0)

You need to delete a user from the system, including their home directory. Which of the following utility commands accomplishes this task?

userdel

userdel -r

userdel -R

deluser

You need to enable the web server (running as the www-data user and group) to write into a directory called /home/webfiles. Which commands will accomplish this task in the most secure manner?

chgrp www-data /home/webfiles ; chmod 775 /home/webfiles

chmod 777 /home/webfiles

chgrp www-data /home/webfiles ; chmod 711 /home/webfiles

chmod 707 /home/webfiles

Assume that passwords must be changed every 60 days. Which command will change the date of the user's last password change without the user actually changing the account password?

chage -f

chage -W

chage -l

chage -d

What is the order in which user configuration files are located on login to a Bash shell?

.bash_login, .profile, /etc/profile

.bash_profile, .bash_login, .profile

.profile, .bash_login, .bash_profile

.bash_login, .bash_profile, .profile

Within which directory should you place files to have them automatically copied to a user's home directory when the user is created?

/etc/userhome

/etc/templateuser

/etc/skel

/home/skel

Which bash parameter or option will cause the shell to be executed without reading the initialization files?

--no-rc

--no-init

--norc

--rc-none

You need to create a function that will be available each time you log in to the system. Within which file should this function be placed?

.bash_profile

.rc

/etc/profile

.bash_run

Assuming X forwarding has been enabled on the SSH server, which environment variable is used to set the location for newly spawned windows from within an SSH session?

DISPLAY

XTERMINAL

XTERM

XDISP

Which of the following options in the SSH configuration file needs to be enabled so that X sessions can be sent over an SSH connection?

X11Connect yes

X11Forwarding yes

ForwardX yes

XForward yes

Which file contains user information such as username and real name and is readable by all users of the system?

/etc/pass

/etc/shadow

/etc/passwd

/etc/userinfo

Which of the following commands changes a group called DomainAdmins to DomainUsers?

groupmod -n DomainUsers DomainAdmins

groupchg DomainAdmins DomainUsers

chgroup DomainAdmins DomainUsers

group -N DomainAdmins DomainUsers

When running useradd, which option needs to be specified in order for the user's home directory to be created?

-h

-m

-x

-a

Which of the following commands locks out password-based login for a user but does not prevent other forms of login?

usermod -L

userdel -r

useradd -h

userlock

Which of the following commands produces a report listing the last password change date for all users on the system?

passwd -a

passwd -S

passwd -a -S

passwd --all

Which file contains a list of usernames, UIDs, and encrypted passwords?

/etc/passwd

/etc/shadow

/etc/encpass

/etc/grouppass

Which command is used to change a user's home directory to /srv/data/username and move the contents at the same time?

usermod -d /srv/data/username -m

homedir -m /srv/data/username

userex -m /srv/data/username

userchg /m /srv/data/username -d

Which option to useradd will add groups for a user?

-g

-x

-l

-G

Which option to useradd creates a system user rather than a normal user?

-r

-s

-a

-S

Which file contains encrypted password information for groups?

/etc/group

/etc/gshadow

/etc/gsecure

/etc/group.conf

Which of the following best describes a valid use of the groupdel command?

You may force group deletion with the -f option.

If a user's primary group is to be deleted, that user must be deleted first or have their primary group changed.

Groupdel can be run at any time, regardless of group membership.

The -r option for groupdel will recursively change users’ GIDs after group deletion.

Which of the following commands displays the UID, primary group, and supplemental groups for a given user?

id

getid

passwd

chage

Which option to the usermod command is used to change a given user's real name?

-R

-n

-d

-c

A user needs to work with printers and 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

You need to examine who is currently logged in to the system. Which of the following commands will display this information?

listuser

fuser

ls -u

w

Within the following entry in /etc/shadow, to what does the number 15853 refer? mail:*:15853:0:99999:7:::

The UID of the mail user

The number of files owned by mail

The date of the last password change (since 1/1/1970)

The number of days until the account expires

Which of the following commands displays a listing of who is logged in to the server along with the date and time that they logged in?

whois

who

loggedin

curusers

Which of the following commands adds a group?

groupadd

addgrp

grpadd

creategroup

Which of the following commands enables the sticky bit for a user on a file called homescript.sh?

chmod +sticky homescript.sh

chmod 755 homescript.sh

chmod u+t homescript.sh

chown u+sticky homescript.sh

The umask reports as 022. What is the permission that will be in effect for a newly non-executable created file?

u+rw, g+r, w+r

755

644

a+r

Which of the following best describes the relationship between UIDs and GIDs on a Linux system when an authentication server is being configured?

The UID and GID are the same across the system for a given user.

Each user has a UID and GID that are the same and are created when the user is created.

The UID represents the user, while the GID is a globally unique user ID.

There is no direct relationship between UID and GID.

When you're configuring a server for an SNMP server role, which ports need to be allowed through the firewall for SNMP traffic?

Ports 23 and 25

Ports 110 and 143

Ports 80 and 443

Ports 161 and 162

You need to look at information on logins beyond what was captured by the current log file for the last command. Which option to the last command can be used to load information from an alternate file?

-a

-t

-e

-f

When creating a certificate authority server role, which of the following commands generates a private key for use with SSL and places it into the file /etc/ssl/example.com.private?

openssl genrsa -out /etc/ssl/example.com.private

openssl generate-private > /etc/ssl/example.com.private

openssl genpriv > /etc/ssl/example.com.private

openssh genkey -out /etc/ssl/example.com.private

Which of the following options within an OpenSSH server configuration is used to determine whether the root user can log in directly with an SSH client?

PermitRootLogin

AllowRoot

RootLogin

PermitDirectRootLogin

Which option to ssh creates a port forwarding to which remote clients can also connect?

-L

-R

-P

-E

Which subcommand of openssl is used to create a Certificate Signing Request (CSR) for Secure Sockets Layer (SSL)/Transport Layer Security (TLS)?

req

csr

gencsr

newcsr

Within which directory should scripts and other files to run at login be stored?

/etc/login

/etc/profile

/etc/bash.defs

/etc/profile.d

Using udev to configure a network adapter for use with a firewall so that it has a specific and consistent name, you edit the udev rules file. Which option within the rules file ensures that the device will always have a name of eth0?

ATTR-NAME="eth0"

NAME="eth0"

DEV_NAME="eth0"

NAME_DEV="eth0"

You are configuring a database service and need to open the default port for MySQL on the firewall. Which port is the default for MySQL?

6592

25

389

3306

When configuring Apache for a web server role, which of the following directives tells the server the location of the SSL private key?

SSLKeyFile

SSLCertificatePrivateKey

SSLCertificateKeyFile

SSLPrivateKey

Which of the following commands will correctly change the group ownership of the file called a.out to users?

chgrp users a.out

chgrp a.out users

groupchg a.out users

grpchg users a.out

Which option to umask will display the permissions to be used in a POSIX format?

-P

-p

-S

-v

Which option to chown recursively changes the ownership?

-f

-R

-a

-m

Which option to chgrp will change group ownership of all files within a given directory?

-directory

-d

-R

-V

When sourcing a file in bash, which chmod command would be necessary to provide the minimum privileges in order for the file to be sourced correctly, assuming that your current user owns the file?

chmod 600

chmod 755

chmod 777

chmod 400

Which of the following commands removes an expiration from an account?

sudo chage -l username

sudo chage -E -1 username

sudo chage -E now username

sudo chage --noexpire username

You need to determine whether LDAP integration is working correctly. In order to do so, you would like to obtain a list of users, as read by /etc/nsswitch.conf. Which command can be used for this purpose?

getuser

getent

usermod

userlist

A command has the following listing obtained with ls -la:

-rwsr-xr-x 1 suehring suehring 21 Nov 2 13:53 script.sh

What does the s denote within the user permissions in the listing?

The suid bit has been set for this program.

This is a symlink.

The file will not be executable.

The file is a special system file.

Which system logging facility is used for messages from the kernel?

syslog

kernel

kern

system

What is the name of the systemd service that provides logging facilities?

systemd-journald

systemd-loggingd

systemd-syslog

systemd-logger

Which configuration option in /etc/logrotate.conf will cause the log to be emailed to admin@example.com when the log rotation process runs for the selected log?

mail admin@example.com

sendmail admin@example.com

maillog admin@example.com

logmail admin@example.com

You are deploying an Exim server and need to work with the firewall to ensure that the proper incoming ports are open. Which protocol and port should you allow inbound for normal SMTP traffic?

TCP/23

TCP/25

TCP/110

TCP/143

Which port(s) and protocol(s) should be opened in a firewall in order for the primary and secondary name servers to communicate for a given domain?

udp/53

Both tcp/53 and udp/53

tcp/53

udp/53 and tcp/503

When examining open ports on the server, you see that TCP port 3000 is listed with no corresponding protocol name, such as smtp, imaps, and so on. In which file would you find a list of port-to-protocol translations that could be customized to add this new port?

/etc/ports

/etc/p2p

/etc/ppp

/etc/services

On which port does ICMP operate?

TCP/43

UDP/111

UDP/69

ICMP does not use ports.

Which of the following commands displays account information such as expiration date, last password change, and other related details?

usermod -l

userinfo -a

chageuser -l

chage -l

Which command is used to create a public/private key pair for use with SSH?

ssh -k

ssh-keygen

ssh-genkey

ssh -key

Within which file should you place public keys for servers from which you will accept key-based SSH authentication?

~/.ssh/authorized_keys

~/.ssh/keys

~/.ssh/keyauth

~/.sshd/authkeys

You need to execute a command as a specific user. Which of the following commands enables this to occur?

sudo -u

sudo -U

sudo -s

sudo -H

Which option in /etc/sudoers will cause the specified command to not prompt for a password?

PASSWORD=NO

NOPASSWD

NOPASSWORD

NOPROMPT

Which of the following commands will display kernel parameters related to resource limits such as CPU time, memory, and other limits for the currently logged-in user?

reslimit

limitres -a

ulimit -a

proclimit -n

When working with TCP wrappers, which line within the /etc/hosts.deny file will prevent any host within the 192.168.1.0/24 network from accessing services that operate from xinetd?

BLOCK: 192.168.1.0/24

REJECT: 192.168.1.0

ALL: 192.168.1.0/255.255.255.0

NONE: 192.168.1/255.255.255.0

You are using an RSA-based key pair for SSH. By default, what is the name of the private key file in ~/.ssh?

id_rsa

id_rsa.priv

id_rsa.key

rsa_key.priv

Which option to the su command will execute a single command with a non-interactive session?

-s

-u

-c

-e

When working with digital signatures, after specifying the key server, which option to gpg is used to specify the key to send to the key server?

key-name

keyname

send-key

sendkey

Which of the following commands should be used to edit the /etc/sudoers file?

Any text editor such as Vi or emacs

editsudo

visudo

visudoers

Which file can be used to store a server-wide cache of hosts whose keys are known for SSH?

/etc/sshd_known_hosts

/etc/ssh_known_hosts

~/.ssh/known_hosts

/root/ssh_known_hosts

Which option within /etc/sshd/sshd.conf (or /etc/ssh/sshd_config) can be changed to prevent password-based authentication?

PasswordAuthentication

Passwords

AllowPass

AllowPasswords

Which of the following commands generates a GnuPG key pair?

gpg --gen-key

gpg --key

gpg --send-key

gpg --create-key

Which file is used as the default storage for public keyrings for gpg?

publickeys.gpg

pubring.gpg

public.gpg

pubkeys.gpg

Which option to the su command is used to obtain the normal login environment?

-u

-U

-

-login

Which option enables SSL configuration for a given website or server?

SSLEngine

SSLDirect

SSLEnable

SSLConnect

When using the net command in an Active Directory single sign-on (SSO) environment, which option enables authentication using Kerberos?

-b

-k

-l

-a

Within which directory are individual configuration files stored for the Pluggable Authentication Module (PAM) mechanism?

/etc/pamd

/etc/pam

/etc/pam.d

/etc/pam.conf.d

On which port does the slapd LDAP daemon listen for connections?

389

3389

3306

110

Which PAM module prevents logins from accounts other than root when the file /etc/nologin exists?

pam_login.so

pam_preventlogin.so

pam_nologin.so

pam_logindef.so

Which PAM module is responsible for normal or standard password authentication?

pam_auth.so

pam_login.so

pam_unix.so

pam_standardlogin.so

Which PAM module provides a mechanism for checking and enforcing the strength of passwords in order to enforce a password policy?

pam_passwdstr.so

pam_cracklib.so

pam_libpasswd.so

pam_strpass.so

Which format should the certificate and key be in for a Postfix TLS configuration?

PKCS

PEM

TLS

SSL

Which iptables chain is used to create a port redirect?

REDIRECT

PREROUTING

PORTREDIR

ROUTING

Which of the following commands saves the current set of iptables rules into a file?

save-iptables

iptables-create

iptables-save

ipt-save

Which of the following commands lists the current iptables rules while not attempting to resolve host or port names?

iptables -L

iptables -List -no-resolve

iptables -a

iptables -nL

Which of the following directories contains configuration files for the fail2ban system?

/etc/fail2ban.cfg

/etc/fail2ban.d

/etc/f2b

/etc/fail2ban

Within an OpenSSH configuration, which option disables the use of empty passwords?

DisableEmptyPass

PermitEmptyPasswords

EmptyPasswordAuth

PermitPasswordLength

Which of the following commands sets the default policy for the INPUT chain to discard packets that don't have a specific rule allowing them?

iptables INPUT DROP

iptables chain INPUT policy DROP

iptables -P INPUT DROP

iptables POLICY=DROP CHAIN=INPUT

When configuring VPN service through a firewall, on which port and protocol does OpenVPN listen?

ICMP/1194

UDP/1194

TCP/1194

VPN/1194

Which of the following best describes the difference between the DROP and REJECT targets in iptables?

Both DROP and REJECT do the same thing.

DROP silently discards packets, while REJECT sends back an ICMP acknowledgment.

REJECT silently discards packets, while DROP sends back an ICMP acknowledgment.

DROP sends back a direct message, and REJECT sends a redirect.

Which of the following partial iptables rules sets up a configuration that limits log entries to three per minute?

-m limit 3 -j LOG

-m limit --limit 3/minute --limit-burst 3 -j LOG

-m limit --limit 3

-m limit --limit-minute 3 --burst 3 -j LOG

Which of the following partial iptables rules allows incoming ICMP traffic?

-A INPUT -p ICMP -j ACCEPT

-A IN -P ICMP

-A INPUT -P ACCEPT-ICMP

-A IN -P ICMP -j ACCEPT

Which of the following partial iptables rules blocks all traffic from source IP 192.168.51.50?

-A INPUT -p ALL 192.168.51.50 -j ACCEPT

-A INPUT -p ALL -s 192.168.51.50 -j DROP

-A INPUT -p ALL -s 192.168.51.50 -j BLOCK

-A INPUT -p ALL -f 192.168.51.50 -j DISCARD

Which of the following partial iptables rules will allow all hosts to connect to TCP port 2222?

-A INPUT -p TCP -s 0/0 --destination-port 2222 -j ACCEPT

-A TCP -s ALL -p 2222 -j ACCEPT

-A INPUT -p TCP -s *.* --destination-port 2222 -j ALLOW

-A INPUT --destination-port */* -j ACCEPT

Which of the following commands enables forwarding such as would be used for NAT?

echo "1" > /proc/sys/net/ipv4/nat

echo "1" > /proc/sys/net/ipv4/ip_forward

iptables --enable-forwarding

ip-forward --enable

Within a jail configuration for fail2ban, which configuration option sets the name and location of the log file to monitor for failures?

logpath

monitor

logfile_mon

monitor_log

Which command sends a copy of the public key identity to another server for use with SSH?

ssh-key

ssh-copy-key

ssh-sendkey

ssh-copy-id

Which option in /etc/sudoers sets the destination address for administrative and security emails related to sudo?

mail

mailto

secmail

adminmail

Which port should be allowed through a firewall for NTP communication?

Port 139

Port 161

Port 123

Port 194

You are looking for files related to the SSL configuration on the server. After looking in /etc/ssl, within which other directory might the files reside?

/etc/sslconfig

/usr/share/ssl

/etc/pki

/etc/private

Which OpenSSH configuration directive is used to specify the users who will be allowed to log in using SSH?

AllowUsers

PermitUsers

UsersAllowed

AllowedUsers

Which option within a LOG target for iptables sets a string that will be prepended to log entries?

--log-prefix

--prepend

--log-prepend

--log-str

Within the SELinux configuration, which option controls whether the policy will be targeted or strict?

SEPOLICY

SELINUXTYPE

SETARGET

SELINUXPOLICY

Which of the following best describes the status of SELinux when the command getenforce returns Permissive?

A Permissive return means SELinux is enabled but rules are not enforced, although DAC rules are still in effect.

A Permissive return means SELinux is not enabled.

A Permissive return means SELinux is enabled, although rules are not enforced and DAC rules are not in effect.

A Permissive return means SELinux is using an enforcing policy.

Which of the following describes the primary difference between the configuration files ssh.conf and sshd.conf (typically found in /etc/sshd/ or /etc/ssh/)?

sshd.conf is the configuration file for the system SSH, and ssh.conf is the options configuration file.

sshd.conf is the configuration file for the system SSH daemon, and ssh.conf provides system-wide client SSH configuration.

sshd.conf is used when SSH will be disabled, and ssh.conf is used when SSH is enabled.

sshd.conf is the first configuration file read for a client connection, while ssh.conf is the first configuration read for a server configuration.

When you're working with PAM, a module that is marked as required has failed. Which of the following describes what happens to the other modules in that realm?

Processing stops immediately when a failure of a required module occurs.

Processing stops after all required modules are processed.

Processing continues until another required module is encountered.

Processing continues through other modules but ultimately fails.

What is the UID of the root account?

1000

0

100

65535

Using a system such as Google Authenticator to provide multifactor authentication is an example of which type of token?

Hardware

Software

Virtual-based

Usage-based

Within which directory are the predefined zones for firewalld?

/etc/firewalld/

/usr/lib/firewalld/zones/

/usr/firewalld/zones/

/etc/firewall/zones

You need to set a bootloader password for GRUB. To do so, which of the following configuration options should be set in /boot/grub/grub.conf?

login

prompt

boot-passwd

password

Assuming that the output from the sestatus command indicates that SELinux is in Permissive mode, which of the following commands is used to change the mode to Enforcing?

setenforce en

setenforce 1

setenforce on

setenforce --enable

Your organization uses ssh-agent for authentication assistance with SSH. Which command can be used to add a private key to ssh-agent?

ssh-privkey

ssh-agent-key

ssh-add

ssh-addkey

When working with access control lists (ACLs), which of the following commands is used to display information about the access control list for a given file?

getfacl

getacl

acldisp

showacl

You need to provide a special username and other parameters related to a specific host to which you connect using SSH. To which file should you add this information?

~/.ssh/hosts

~/.ssh/known_hosts

~/.ssh/config

~/.ssh/hostconfig

You are using chmod in order to change several web-related files so that the web server/public can read them. Which option should you add to the chmod command in order for the permissions to inherit to other files?

-R

-v

-i

-M

Which option to setsebool writes the current values to disk so that they will be applied at next reboot?

-A

-P

-D

-M

When working with AppArmor, within which directory are profiles and application permissions located?

/etc/apparmor/

/etc/apparmor.d/

/etc/appa.d/

/etc/armor.d/

When using Kerberos authentication, which of the following commands shows the ticket cache?

ktix

ktel

kcache

klist

Which of the following options to the ls command displays ownership and permission information?

-m

-l

-b

-f

Which option to getsebool returns the entire list of SELinux booleans?

-a

-b

-c

-d

Which AppArmor command uses netstat to determine the network-related processes that do not have AppArmor profiles?

aa-profiles

aa-netstat

aa-unconfined

aa-netlist

Which group can be used to restrict access to execute the su command?

super

admins

wheel

runsu

You need to change the SELinux security context of a file. Which of the following commands should be used for this purpose?

setcontext

sesecon

chcon

setcon

Which of the following is an advantage of using an SSL-based VPN client?

The transport may be able to get around firewalls that otherwise block VPN traffic.

The use of SSL makes default configuration easier.

The use of SSL means keys do not need to be configured.

The use of SSL makes no difference.

When configuring PKI on a Red Hat system, which options are available as hashing algorithms when RSA is used as a key type?

SHA256withRSA

MD4

SHA2048

SHAwithEC

Which of the following passwords can be used to secure a system such that it will not boot, even if the attacker has physical access to place a USB boot disk in the computer?

GRUB password

UEFI/BIOS password

Root password

SHA1 password

Which option to the restorecon utility can be used to view the current contexts without making changes?

-n

-r

-g

-p

You need to view the SELinux contexts for various processes on the system. Which of the following commands will accomplish this task?

showcon

proccon

lcon -Z

ps -Z

Which PAM module can be used to lock accounts after failed login attempts?

pam_lock

pam_tally2

pam_loginlock

pam_watchlog

Which of the following commands places all AppArmor profiles into complain mode?

aa-complain /etc/apparmor.d/*

aa-enable -complain /etc/apparmor.d/*

aa-enable -complain /etc/apparmor/*

aa-complain /etc/apparmor/*

Which option within the sshd_config file sets per-user configuration?

UserConf

Match User

Per-User

Conf User

Which option to the firewall-cmd command sets the current runtime configuration to be available on next reboot of the computer?

--set-perm

--make-perm

--runtime-to-permanent

--current-to-persistent

When working with ufw, you need to allow SSH traffic. Which of the following commands facilitates this scenario?

ufw allow tcp/22

ufw enable ssh

ufw allow ssh

ufw enable tcp/21-22

Which of the following is the name for the firewall control software associated with Netfilter?

iptables

ipt

netfw

netfilterfw

When you're copying files using scp, which port needs to be open in the firewall?

TCP/21

TCP/22

TCP/20 and TCP/21

UDP/53

You are viewing the contents of a directory with the ls command but do not see files that begin with a single dot (.). Which option to ls shows those files?

-a

-b

-c

-d

Which option to ssh specifies the private key to use for authentication?

-m

-i

-k

-a

You have found that the owner of the Apache process is www-data. Assuming that the file does not have read privileges, what command will change the ownership of a file, given as <filename>, such that www-data can write to the file?

chown www-data <filename>

chown apache-www-data <filename>

chmod www-data +w <filename>

chmod www-data.apache <filename>

When using sudo in a scripted environment, which option can be used to specify a noninteractive mode?

-f

-m

-n

-l

Which command is used to turn off AppArmor profiles?

aa-disable

aa-turnoff

aa-enable -d

aa-off

Which command and option are used to view the SELinux security context of a given file?

ls -context

file -Z

ls -Z

sel -context

Digital signatures can be provided in Linux through which of the following commands?

gds

gpg

dmc

gds2

You need to make a change to the global behavior of AppArmor. To avoid editing the profiles directly, which directory contains common settings that can be changed instead?

/etc/apparmor.d/configs

/etc/apparmor/globals

/etc/apparmor/edits

/etc/apparmor.d/tunables

Which of the following directories contains configuration for UFW?

/etc/ufwd

/etc/ufw.d

/etc/ufw

/etc/ufirewall

Which software can be used in connection with iptables in order to more effectively block traffic from entire network ranges?

ipblock

ipset

iplist

ipcoll

You have created a public key and private key for use with SSH. The contents of which key should be copied to a remote host in order to enable authentication?

The public key.

The private key.

Both the public and private keys.

Neither the public nor the private key. It must be generated on the remote host.

What is the octal notation to specify that a directory should have read+write+execute permissions for the owner and read+execute permissions for the group and other?

711

644

755

777

Which option to sestatus shows the context of a file?

-f

-v

-m

-a

Which option to chage sets the maximum days that a password is valid?

-v

-m

-M

-d

Which option within an SSH server configuration enables authentication using Kerberos?

UseKerberos

KerberosAuthentication

EnableKerberos

KerberosEnable

You are working with iptables-save to examine the contents of tables in a scripted environment. Which option to iptables-save can be used to specify the table name rather than outputting information for all tables?

-t

-a

-s

-i

Ports below what number are considered to be the well-known ports?

256

512

1024

65535

Which PAM module is responsible for enforcing limits such as the maximum number of logins and CPU time used?

pam_enforce.so

pam_limittest.so

pam_max.so

pam_limits.so

When using LDAP for authentication, what will be logged with the loglevel set to 0×10 in a slapd.conf configuration file?

No debugging

Trace debugging

Stats logging

Packets sent and received

On which port does LDAP over SSL listen for connections?

389

443

636

3128

Which of the following PAM modules can be used for authorization and authentication scenarios using external files?

pam_fileauth.so

pam_listfiles.so

pam_filesauth.so

pam_fileauth.so

Which option to ssh-keygen sets the type of key that will be created?

-k

-t

-e

-i

You are attempting to remove a software package from a Debian system. Which command removes the package?

apt-cache remove-update

apt-cache remove

apt-get remove

apt-get delete

Which of the following configuration options sets a hard limit of 25 processes for a user called suehring in /etc/security/limits.conf?

suehring hard proc 25

suehring hard nproc 25

suehring proc 25 hard-limit

proc 25 suehring hard

Which command is used to configure kernel parameters for a new GPU driver added to the system?

gpuctl

gpuload

sysconfig

sysctl

Which type of module interface for PAM is used to set a policy such as the time of day that a user can log in?

auth

account

password

policy

Which command can be used to set file attributes such as making a file immutable?

chr

fattr

chattr

fop

Which range of UIDs is typically used by service accounts?

1 to 999

1 to 100

32,768 to 65,535

1,000 to 1,999

Which message type(s) should be queried when looking for SELinux access denials or violations?

AVC

DEN

AVC,USER_AVC

STOP,VIOL

Which option is used to display information about current file attributes?

lsfile

lsattr

showfile

exattr

Which of the following describes a key difference between a self-signed certificate and a certificate issued by a trusted certificate authority?

A self-signed certificate is valid for only 30 days.

A self-signed certificate will be automatically trusted by clients when attempting to connect.

A self-signed certificate will need to be manually trusted by clients when attempting to connect to a service that uses the certificate.

There is no practical difference between a self-signed certificate and one issued by a trusted certificate authority.

Which of the following software packages can be used to scan a host for rootkits?

rkfind

wxps

tmroot

Chkrootkit

Within which file is the default umask set?

/etc/profile

/etc/umask

/defaults/umask

/etc/user.defs

After recovering from kernel panic, you would like to look at what might have happened. Which of the following files contains the kernel ring buffer messages?

/var/log/dmesglog

/var/log/start.log

/var/log/kern.log

/var/log/bootlog.txt

Which of the following commands is used to examine the systemd journal or log file?

journallist

ctlj

journalctl

jctl

Assuming that the $ModLoad imudp configuration option has been set in the /etc/rsyslog.conf configuration file 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

Which option in journald.conf controls the maximum file size for individual journal logs?

SystemMaxFileSize

MaxFile

LogFileSize

LogSize

Which option within a logrotate configuration file disables compression of the log file?

compressoff

limitcompress

nocompression

nocompress

Which of the following files should be used to display a message to users prior to logging in locally?

/etc/loginmesg

/etc/logmessage.txt

/etc/issue

/etc/banner

Which file contains a message that is displayed after successful login?

/etc/loginbanner

/etc/issue

/etc/motd

/etc/message

When working with System Security Services Daemon (sssd), which command is used to discover and join an Active Directory domain for a single sign-on (SSO) authentication scenario?

joinad

adjoin

realm

realm-ad

You need to provide SSL certificates for several hosts within your organization, some of which are public-facing. Which type of certificate should be used for this purpose?

Wildcard certificate

Self-signed certificate

Certificate-in-escrow

Unchained certificate

Within which file are values related to password aging defined on a system that uses /etc/shadow?

/etc/shadow.defaults

/etc/shad.defs

/etc/login.defs

/etc/shadow.conf

When working with nftables to maintain a stateful firewall, which connection state represents a packet or session that has not yet been established?

new

unseen

clear

conn_new

Which file sets the global or default values for the ssh command client behavior?

/etc/ssh/config

/etc/ssh/client_config

/etc/ssh/ssh_config

/etc/ssh/sshd_config

When using dynamic port forwarding with SSH, which type of proxy is used?

Squid

Internal

Curb

Socks

Which polkit function is used to create a rule?

addRule()

createRule()

NewRule()

ruleAdd()

You need to relabel after changing SELinux policies. Which of the following commands triggers the autorelabel process?

autorel

touch /.autorelabel

selinux -rel

systemd-relabel

Which command can be used to create a new SELinux policy using a logfile of actions that have been denied by SELinux policy ?

updatese --log

selinux --audit

audit2allow

genserules --log

You have used getenforce to verify that the current mode is Enforcing and need to change certain rules in real time. Which command can be used for this purpose?

systemd-selinux

sechange

semanage

setsepol

Assuming a Fedora system, which command can be used to change the policy, such as changing from minimum to targeted?

setse --policy

system-selinux

selinux-change

system-config-selinux

Which of the following is the correct syntax to remove the group ID (SGID) bit on a directory using the chmod command?

chmod group-sgid directory

chmod g-s directory

chmod sgid -r directory

chmdo -r gs directory

When using pkexec with PolicyKit, which option specifies the user under which the program will be executed?

--username

--account

--user

--login

Which of the following is the correct syntax to enable port forwarding so that connections to local port 5150 will be sent to www.example.com on port 80?

-L www.example.com:80->5150

-L 5150:www.example.com:80

-L 5150->www.example.com:80

-F 5150->www.example.com:80

Which of the following represents an accurate statement about stateless firewalls?

Stateless firewalls have three zones: internal, external, and DMZ.

Stateless firewalls are the only type available in Linux.

Stateless firewalls examine packet headers to connect related packets.

Stateless firewalls examine source and destination.

Which configuration option within /etc/login.defs sets the minimum value for a user ID (UID)?

UID_MIN

MIN_UID

USERID_MIN

UID_MINIMUM

Assuming that you own and operate the domain example.com, when viewing additional details about an SSL certificate, the valid hosts are shown as *.example.com. Based on this information, what can you tell about this certificate?

It is a wildcard certificate.

It is a self-signed certificate.

It is invalid for example.com.

It uses an invalid hostname.

Chapter 3
Scripting, Containers, and Automation (Domain 3.0)

You are writing a shell script using Bash and need to print the contents of a variable. Which of the following commands can be used to do so?

echo

lf

sp

varpt

Which of the following packages provides orchestration for Linux in an agentless manner?

Ansible

Puppet

Automat

vid

Which of the following commands can be used to execute a command with a customized environment?

set

env

run

crun

Which of the following commands, when used with git, retrieves the latest objects from a repository and attempts to incorporate those changes into the local working copy of the repository?

fetch

pull

retr

get

Which of the following best describes the concept of infrastructure as code?

The management of switches and routers using compiled programs

The management of servers and other systems using scripting, source code management, and automation

The deployment of hardware using Agile methodologies

Planning for bugs in infrastructure code and allowing time to fix them

Which of the following commands changes a file called script.sh, which is located in your home directory, such that it can be executed by the owner of the file and no one else?

chmod 700 ~/script.sh

chown +x /script.sh

chmod ~/script.sh +x

chmod 777 /home/script.sh

Which command can be used to add functions and variables to the current shell?

source

echo

en

src

Which of the following is the correct method for invoking the Bash shell for a script, typically found as the first line of the script?

#!/BASH

#!bash

#!/bash

#!/bin/bash

You need to send output from a command to a log file. Overwriting the contents of the log file is acceptable. Which of the following characters is used to redirect output in such a way as to fulfill this scenario?

|

<

>

&

You need to create a new empty git repository called repo. Which of the following sequences accomplishes this task?

mkdir repo; cd repo; git init --bare

mkdir repo; git init repo/

git init repo –md

git create repo/

Which of the following terms is used in orchestration and automation scenarios to refer to the collection of devices being managed?

Device collection

Inventory

Machines

UsableObjects

You need to print output from a Bash script such that single quotes appear in the outputted string. Which character should be used as an escape sequence in order to get the single quotes into the output?

/

'

?

\

Which exit code indicates success for a Bash script?

0

1

2

EOF

Which of the following commands produces output sit sat set?

echo s{i,a,e}t

echo s(i,a,e)t

echo s[i,a,e]t

echo s/i,a,e/t

Which of the following characters or character sequences begins a comment in a Bash script?

/*

//

#

'

Which, if any, file extension is required in order for a Bash script to execute?

.sh

.bash

.bat

No special extension is necessary.

After fetching changes for a previously cloned git repository, which git command is used to incorporate the changes from that branch into the local copy?

put

push

merge

inc

Which of the following best describes the role of an agent in software orchestration?

An agent is software that listens for and executes commands from the server.

An agent is used to migrate from one operating system to another.

An agent is a hardware-based token used for authentication.

An agent is not used in software orchestration.

Being able to deploy additional servers in response to high demand or load is an example of which type of automation?

Build

Compile

Infrastructure

Config

Which command can be used to indicate a local variable within a Bash script?

localvar

ll

local

%local%

Which git command is used to retrieve a repository from a remote server?

clone

checkout

co

retr

You need to echo the name of the script back to the user for usage or help output. Which positional parameter can be used for this purpose?

$me

$1

$myname

$0

Which of the following commands can be used to print the contents of the current shell environment?

echoenv

printenv

showenv

envvar

You are writing a while loop in a Bash script and need to compare two string values. Which operator is used for this purpose?

-ne

=

equal

eq

You need to create a Bash script that will loop continually and perform some commands within the loop. Which of the following lines will accomplish this task?

if [ $exit -eq "exit" ]

while true; do

for ($i = 0, $i++)

continue until ($exit)

Which of the following commands changes the location to which HEAD is pointing with git?

git point

git checkout

git change

git load

You need to declare a variable as part of the environment prior to running a Bash script. Which of the following commands accomplishes this?

dec

create

export

get

Which of the following commands displays the contents of the PATH variable in Bash?

echo PATH

echo $PATH

echo $CURPATH

ext $PATH

Which character sequence is used to execute a command within a subshell in a Bash script?

$()

subs()

$%

$(~

You need to make a change to the configuration of the SSH daemon across your infrastructure. Being able to do so from a central server is an example of which type of automation?

Security

Automated configuration management

Development configuration management

Usability management

Which option is used with the env command in order to remove a variable from the environment?

-r

-u

-n

-d

Within a Bash script, you need to run two commands but only run the second command if the first succeeds. Which of the following metacharacters can be used to accomplish this task?

<>

&

& &

|

You need to redirect the output from a command and append that output to a file. Which of the following character sequences accomplishes this task?

>

>>

|

^

You need to obtain a directory listing of all files and directories except those that begin with the letter p. Which of the following commands accomplishes this task?

ls -l !p

ls -l [!p]

ls -l [^p]

ls -l [^p]*

Which of the following files is used within a git repository in order to indicate files and file patterns that should not be versioned?

novers

.gitignore

gitignore.txt

gitnover

You need to iterate through a directory listing and perform an operation on certain files within it. To accomplish this task, you will be using a Bash script and a looping construct. Which looping construct is most appropriate for this purpose?

until

do

for

foreach

You are debugging a Bash script written by a different system administrator. Within the script, you see a command surrounded by backquotes, or `. What will be the result of surrounding the command with backquotes?

The command will execute and send all output to the console.

The command will not execute.

The command will execute as if the $() command substitution was used.

The command will execute and send all output to /dev/null.

Which git command displays a short history of commits along with the commit ID?

showhist

list

log

hist

You are committing code to a git repository and need to include a message on the command line. Which option enables this behavior?

-m

-h

-f

-l

Compiling software when a developer commits code to a certain branch in a repository is an example of which type of automation?

Infrastructure

Build

Complex

DevOps

You are working with a MySQL database and need to read in several SQL commands from a file and send them into the MySQL CLI for execution. You will be using STDIN redirection for this. Which of the following commands is correct, assuming a filename of customers.sql?

mysql < customers.sql

mysql | customers.sql

mysql > customers.sql

mysql >< customers.sql

You are collaborating on a coding project using git as the source code management tool. Teammates are saying that they cannot see your code, although you have been committing code regularly. Which of the following is most likely the problem?

You have not added commit messages.

You need to send the commit IDs to the teammates.

You have not executed git push to send the code to the server.

You are committing using the -h flag.

Which option to the chmod command performs a recursive change?

-re

-R

-c

-v

Which character sequence is used to indicate the default case within a case statement in a Bash script?

()

*.*

**

*)

Which character sequence indicates the end of an if conditional in a Bash script?

}

fi

end

endif

What is the name of the default branch in a git repository?

source

main

primary

first

You need to use the output from a command as input for another command. Which character facilitates this scenario?

>

|

!

`

Which git command shows the current state of the working copy of a repository?

git list

git status

git state

git view

Which option to the echo command suppresses the ending newline character that is normally included?

-a

-n

-d

-y

Determining the version of software installed on each client node is an example of collecting information for which collection in an automated infrastructure?

Inventory

Group

Procedure

Build

You need to redirect STDERR from a command into a file to capture the errors. Which character sequence can be used for this purpose?

>

%2>

2>

%%>

You need to make a change to your git environment because your email address has changed. Which of the following commands ensures that your new email address will be used for all subsequent commits?

git config user.email

git change email

git config email.addr

git config email.address

Which shell built-in command is used to display a list of read-only variables?

ro

readonly

env-ro

ro-env

Assume that you're using the Bash shell and want to prevent output redirects from accidentally overwriting existing files. Which command and option can be used to invoke this behavior?

setoutput -f

overwrite=no

overwrite -n

set -C

You have received a file that does not have a file extension. Which command can you run to help determine what type of file it might be?

grep

telnet

file

export

Which of the following commands will display the last 50 lines of your command history when using Bash, including commands from the current session?

bashhist 50

history 50

cat .bash_history

tail -f .bash_history

When using Bash, how would you execute the last command starting with a certain string, even if that command was not the last one that you typed?

Precede the command with ! and then the string to search for.

Search for the command in history.

Precede the command with a ? and then the string to search for.

This is not possible with Bash.

Which shell built-in command can be used to determine the location from which a given command will be run?

type

when

find

help

Which command is used to read and execute commands from a file in the Bash shell?

run

execute

source

func

You need a command to be executed on logout for all users. Within which file should this be placed (assume all users are using Bash)?

~/.bash_logout

/etc/bash.bash_logout

/home/.bash_logout

/etc/bash_logout

Which of the following commands removes an environment variable that has been set?

profile --unset

env -u

set -u

import

When setting the shebang line of a shell script, which of the following commands will help to determine the location of the interpreter automatically?

#!/usr/bin/env bash

#!/bin/bash

#!env

/bin/int bash

Which of the following best describes the PS1 environment variable?

PS1 is used to set the location of the PostScript command.

PS1 is used to define the default shell prompt for Bash.

PS1 is used as a per-system variable.

PS1 is user-defined and does not have a default value or setting.

Which variable within a Bash script is used to access the first command-line parameter?

$ARG

$0

$1

$ARG0

Which of the following commands will print a list of six numbers beginning at 0?

list 0-5

seq 0 1 5

echo 0-5

seq 0 1 6

Which of the following commands will execute a script and then exit the shell?

run

source

./

exec

Which command within a shell script awaits user input and places that input into a variable?

exec

get

read

prompt

What characters are used to mark a sequence of commands as a function within a shell script?

Parentheses to declare the function (optional), and curly braces to contain the commands

Curly braces to declare the function, and parentheses to contain the commands

Square brackets to declare the function, and curly braces to contain the commands

Run quotes to denote the function

Which character sequence is used to terminate a case statement in a Bash script?

end

done

esac

caseend

Which option to declare displays output in a way that could then be used as input to another command?

-o

-n

-p

-m

Which characters are used to denote the beginning and end of the test portion of a while loop in a shell script?

Parentheses ( )

Curly braces { }

Square brackets [ ]

Double quotes " "

When using the test built-in with one argument, what will be the return if its argument is not null?

false

true

unknown

-1

Which environment variable is used when changing directory with the tilde character, such as cd ~ ?

HOMEDIR

HOMEPATH

HOME

MAILPATH

You would like to examine the entries for a single file through the git commit history. Which command should be used for this purpose, assuming a filename of nhl_scores.php?

git log --history nhl_scores.php

git log --follow nhl_scores.php

git history nhl_scores.php

git commit-history nhl_scores.php

Which of the following best describes attributes of an inventory within an automated continuous integration/continuous deployment (CI/CD) infrastructure?

Parameters such as the client IP address and software versions

The number of client nodes

The software used on the server for the orchestration

The architectural pattern for deployment

Which operator should be used when comparing integers to determine if one is equal to another in a Bash script?

-ro

===

-eq

-fe

You would like to run several commands in succession but not have the output sent into the next command. Which of the following metacharacters will accomplish this task?

&

>

;

|

Which escape sequence is used to denote the alert or bell?

\a

\b

\c

\d

Which of the following is a valid variable declaration in a Bash script, setting the variable NUM equal to 1?

NUM = 1

$NUM = 1

NUM= 1

NUM=1

Which of the following commands will obtain the date in seconds since the epoch and place it into a variable called DATE within a shell script?

DATE="$(date +%s)"

DATE="date"

DATE="$(date)";

DATE="$date %s"

Which sequence is used to mark the beginning and end of the commands to execute within a for loop in a shell script?

Curly braces { }

The keywords do and done

Semicolons ;

Tabs

Which option to the declare command will create a variable that is read-only?

-r

-ro

-p

-x

Which environment variable controls the format of dates and times, such as a 12-hour or 24-hour formatted clock?

LOCALE_DATE

DATE_FORMAT

LC_TIME

LC_DATE

Which option to netstat displays interface information in a table-like format that might be suitable for use with scripting?

-i

-r

-t

-l

You are running a shell script from within your SSH session. Which key combination can be used to terminate the script?

Ctrl+X

Ctrl+-

Ctrl+C

Ctrl+Esc

Which of the following conditionals in a Bash script will test if the variable DAY is equal to SUNDAY?

if ($DAY == "SUNDAY")

if ($DAY -eq "SUNDAY")

if [ $DAY == "SUNDAY" ]

if [ DAY = "SUNDAY" ]

Which of the following commands adds ~/code/bin to the path?

PATH=~/code/bin:$PATH

PATH=/code/bin:$PATH

PATH=/home/code/bin:$PATH

PATH=PATH:~/code/bin

Which option to git merge can be used to attempt to roll back a merge that has conflicts?

--rollback

--abort

--rewind

--restart

Which environment variable can be used to change the default path for a new git repository created with git init?

GIT_DIR

GIT_HOME

GIT_DEST

GIT_LOC

Which character sequence is used to add a horizontal tab using echo with a Bash script?

\h

\t

\a

\f

You need to exclude a build file, called build.o, from being tracked by git. Which character sequence can be used in the .gitignore file to exclude or ignore that file in all directories?

build.o

/build.o

**/build.o

build.*

Which file-globbing sequence will match all files that begin with an uppercase A or an uppercase F?

[AF]*

[af]*

*AF*

AF*

Assuming a remote name of origin, which git command can be used to obtain additional information about the remote?

git show origin

git remote show origin

git show remotes

git remote list

Which character sequence displays the number of command-line arguments that were passed to a Bash script?

$NUM

$CLA

$+

$#

Which environment variable can be set if you wish to automatically log users out of their shell after a certain period of inactivity?

TIMEOUT

TMOUT

TO

IDLETIME

You are debugging a Bash script and notice a line that contains echo $NUM #sending $NUM to output. What will be the result of this line when executed?

It will not output anything because it is commented out.

It will cause a syntax error because it is invalid syntax.

It will output the contents of the NUM variable.

It will output the sequence "$NUM".

When cloning a repository with git clone, you need to change the name of the remote so that it is not called origin. Which option can be added to git clone to accomplish this task?

--origin

--remote

--name

--remote-name

When working in a virtual server environment, which column within iostat output shows the amount (percentage) of time spent in an involuntary wait scenario due to the hypervisor?

proc

wait

user

steal

If you need to temporarily reconfigure all locale variables and settings for a given session, which environment variable can be used?

LC_LIST

LC_GLOBAL

LC_ALL

ALL_LOCALE

A set of commands to execute on a client node is an example of which type of infrastructure automation?

Procedure

Subset

Agent

Collection

Which character sequence is used to indicate the end of an individual clause within a case statement in a Bash script?

//

'eol

;;

<

Which of the following commands removes a currently defined aliased command?

remove

rm

unalias

delete

Which of the following tests will determine if a file exists in the context of a shell script?

-a

-e

-m

-i

Which of the following values for the LANG environment variable will configure the system to bypass locale translations where possible?

LANG=COMPAT

LANG=NONE

LANG=C

LANG=END

Which option to the git config command shows all of the configuration parameters that have been set?

--list

--show

-u

--display

Which character sequence should be used if you need to redirect STDERR to a file and append to the file?

2>

2>>

&>>

1>>

When working with infrastructure as code, you have received a file with a .yml extension. What is the likely format for the contents of this file?

YAML

XML

Tab-delimited

Text

Which of the following best describes the result of the command cat /etc/passwd | cut -d: -f1 > users.txt?

The first field will be extracted from the passwd file and placed into a file called users.txt.

The second field will be extracted from the passwd file and placed into a file called users.txt.

The passwd file will be separated based on a colon and output placed into users.txt.

The passwd file will be sent to the terminal where only fields beginning with a colon will be shown and placed into a file called users.txt.

Which shell built-in can be used to move positional parameters down, where $2 becomes $1, $3 becomes $2, and so on?

move

rev

shift

dec

You are using git pull to obtain changes to a shared repository. Which option should you add to git pull in order to prevent autocommit so that you can look at the results of the merge first?

--pre-merge

--no-auto

--nc

--no-commit

Which of the following pairs indicates the beginning and end of an until loop in a Bash script?

do; done

start; stop

beg; end

until; litnu

Which exit code is used to indicate a general error within a Bash script?

0

1

256

−1

You need to redirect STDIN until a certain character combination is encountered. Which of the following operators can be used for this purpose?

>STDIN

<<

<&

>

Assuming that a file has been previously added to a repository with git add, which option to the git commit command can be used to automatically add and commit the file?

-a

-b

-c

-d

Which locale-related environment variable is used for currency-related localization?

LC_MONE

LC_CURRENCY

LC_MONETARY

LC_CURR

Which of the following lines added to .profile in a user's home directory will set their time zone to Central time?

TZ=/Central ; export TZ

TIMEZONE='America/Chicago' ; export TIMEZONE

set TZ=/Central

TZ='America/Chicago'; export TZ

Which of the following creates an array in a Bash script?

ARRAY=(val1 val2)

ARRAY = "val1 val2"

ARRAY_PUSH($ARRAY,"val1","val2");

ARRAY{0} = "val1"

Which test within a shell script while loop will examine one value to see if it is less than another?

-less

-lessThan

-lt

-lthan

Assuming that a space-separated list of values has been defined as LIST="one two three four", which of the following for loop constructs will iterate through the elements in the list?

for LIST

for VAR in LIST

for VAR in $LIST

for $LIST -> $VAR

Which keyword(s) is/are used to begin an alternate condition within a Bash script?

if

else if

elif

elsif

Within which directory does git store a local copy of the repository metadata?

.gitmeta

gitlocalmeta

.git

git

You need to redirect both STDERR and STDOUT to a file. Which of the following character sequences accomplishes this task?

2>

2>&1

2+1

+2+1

Within a Bash script, you need to run two commands but only run the second command if the first fails. Which of the following metacharacters can be used to accomplish this task?

<>

&

& &

||

Which of the following commands creates a new branch called project1 and points the HEAD toward that branch?

git branch project1

git checkout project1

git checkout -b project1

git create project1 -H

Which of the following best describes the difference between a while and an until loop in a Bash script?

A while loop always executes once; an until loop does not.

An until loop always executes once; a while loop does not.

A while loop executes as long as a condition is true; an until loop executes until the condition is false.

An until loop executes until a condition is true; a while loop executes until a condition is false.

Which statement can be used in a Bash script to determine if variable $num1 is greater than $num2, assuming both variables contain integers?

if [ "$num1" -gt "$num2" ]

if [ "$num1" > "$num2" ]

if ($num1 -gta $num2)

if [ $num1 gt $num2 ]

Which of the following protocols is typically used for agentless infrastructure orchestration?

SMTP

ICMP

SSH

FTP

Which of the following character sequences expands or interpolates a variable called VAR within a Bash script?

VAR

$(VAR}

${VAR}

*VAR*

You are creating a configuration file in JSON format for use with Terraform. Which of the following is the expected file extension for this configuration file?

.tf

.txt

.tf.json

.tfjs

Which of the following commands displays the status of a pod on a Kubernetes cluster?

kubectl status

kubectl pod status

kubectl status pods

kubectl get pod

Which of the following best describes the relationship between pods and containers with Kubernetes?

Pods and containers are the same.

Pods can contain multiple containers.

Containers can contain multiple pods.

There is no relationship between pods and containers.

When working with a network configuration, which of the following terms refers to a computer with two network interfaces?

Bridging

Dual-homed

Overlay

Forwarding

You are using a container image for a cloud deployment and are building a stateful application that must store data between deployments. Which type of storage should be used?

Ephemeral volume

Bridged volume

Container image

Persistent volume

Which of the following describes the difference between NAT and bridging in a virtualization environment?

NAT uses the host adapter IP address for all network activity, while bridging enables the virtual machine to get its own IP.

NAT enables the virtual machine to get its own IP, while bridging uses the host adapter IP address for all network activity.

NAT is used to enable external clients to access the virtual machine, and bridging joins two virtual machines together.

NAT and bridging refer to the same thing in virtualization.

When cloud-init is used for bootstrapping and deployment of an EC2 instance, which file format should be used for the configuration files?

XML

YAML

HTML

JS

When troubleshooting a file that is not found, you notice that the file location is linked as ../file.txt. Which type of path has been used for this file?

Virtual

Symbolic

Relative

Absolute

Working with a file called test.php to determine line count, the output from the wc command is 14 18 293 test.php. Which of the three digits corresponds to line count?

14

18

293

None of the options are line count.

Which type of logging driver is the default for Docker containers?

json-file

sql

normal

yaml-file

Which docker command removes an image from a host node?

del

rem

rmf

rmi

Which of the following best describes an overlay network when used with technology such as Kubernetes?

An overlay network is a newly deployed network that uses real-world IP addresses on top of existing private IP addresses.

An overlay network is a virtual network used for communication between containers.

An overlay network is used for IPv6 communication on top of IPv4 infrastructure.

An overlay network is used for communication between wifi-enabled hosts and containers.

Linkerd, Consul Connect, and Istio are examples of software to provide which type of abstraction when working with Kubernetes?

Service mesh

Virus scanning

Multifactor authentication

Mapping

Which of the following commands will send the contents of /etc/passwd to both STDOUT and a file called passwordfile?

cat /etc/passwd > passwordfile

var /etc/passwd | passwordfile

cat /etc/passwd | tee passwordfile

echo /etc/passwd | stdout > passwordfile

What is the default delimiter used by the cut command?

Colon

Tab

Space

Comma

What option is used to change the number of lines of output for the head and tail commands?

-l

-f

-g

-n

Which of the following egrep commands will examine /etc/passwd to find users that are using either /bin/bash or /usr/bin/zsh for their shell environment?

grep sh /etc/passwd

egrep '/*/.sh$' /etc/passwd

grep '/*/.=sh$' /etc/passwd

egrep '/*/..?sh$' /etc/passwd

Which of the following commands searches each user's .bash_history file to determine if the user has invoked the sudo command?

find /home -name "bash_history" | grep sudo

find /home -name ".bash_history" | xargs grep sudo

find /home/.bash_history | xargs grep sudo

find /home -type history | xargs grep sudo

Which command can be used to convert lowercase letters to uppercase letters across an entire file?

du

touc

conv

tr

When using sed for a search and replace operation, which option must be included so that the substitution applies to the entire line rather than just the first instance?

g

a

r

y

Which Bash environment variable is used to obtain the exit status of the most recent pipeline?

$.

$E

$STAT

$?

Which of the following is valid syntax for creating a pull request with the git command?

pull-req

pull

request

request-pull

Which character combination sets the body of the message to STDIN when using the mail command?

<

>

<<<

|

Which command will find directories with names beginning with 2019 located beneath the current directory?

find ./ -name "2019"

find ./ -type d -name "2019"

find / -type d "2019"

find ./ -type d -name "2019*"

Which of the following best describes the difference between merging and rebasing in Git?

Merging reapplies changes from the first commit of the origin master branch to create a new snapshot and commit.

Rebasing reapplies changes from one branch to the other.

Merging reapplies changes from one branch to the other.

Rebasing uses soft links to re-create the merge history.

Which of the following formats are used for SaltStack configuration files?

YAML

JSON

TXT

DOC

Which option to git tag enables searching through the tags for a given repository?

-s

-a

-d

-l

Which of the following is most accurate when referring to host networking with virtualization or containerized applications?

Host networking is necessary for service communication to the outside world.

Communication is limited to localhost through inter-process communication.

Communication will flow through the host network stack.

Virtualization and containerized applications cannot use host networking.

Which command is used to obtain a pre-built docker image from a known repository?

install

inst

build

pull

Which of the following commands is a simple pager that is found on most Linux systems?

more

pg

grep

mr

Which of the following docker commands shows the current running containers?

container show

container ls

list -containers

show container

The default format for an OVF template uses which document standard?

YML

XML

OVFMeta

HTML

Which command can be used to search the contents of all files below your current location for files that contain the characters DB?

grep -r "DB" *

grep -ri "DB" *

cat * | less

cat *.txt | grep DB

Which docker command creates a container from an image and starts that image?

run

go

make

start

Which docker command sends an image to the Docker Hub registry or to a local registry?

go

send

push

upload

Which configuration option with a Docker configuration shows the ports that will be opened when the image is started?

PORT

EXPOSE

OPEN

LISTEN

Which of the following commands can be used to connect to a Docker container?

docker telnet

docker open

docker go

docker attach

Which of the following commands will provide the usernames in a sorted list gathered from the /etc/passwd file?

cat /etc/passwd | awk -F : '{print $1}' | sort

sort /etc/passwd | cut

echo /etc/passwd

cat /etc/passwd | awk '{print $1}' | sort

Which option for the wc command prints the number of lines given as input?

-f

-a

-l

-o

What is the default number of lines printed by the head and tail commands, respectively?

10 for head, 5 for tail

5 for head, 10 for tail

10 for both head and tail

3 for both head and tail

When using Docker compose to create a single-node multi-container application, which format is required for the configuration file?

JSON

YAML

PDF

XML

You have been asked to create a template for virtualization. The template will be in JSON format. Which of the following is the correct name for JSON?

Just Simple Object Nodes

JavaScript Object Notation

Java Standard Object Notation

JavaScript Standard Object Notation

When you're working to design a Kubernetes-based application, what is the name for a container that acts as a proxy to connect to services outside of the pod?

ProxyCloud

Ambassador

Sideload

Integration Container

Chapter 4
Troubleshooting (Domain 4.0)

While troubleshooting a network service that does not appear to start, which option to the ss command shows the current TCP listening sockets?

-lt

-ct

-m

-f

You are examining a problem report where a USB disk is no longer available. Which command is used to obtain a list of USB devices?

usb-list

lsusb

ls-usb

ls --usb

You have lost the password for a server and need to boot into single user mode. Which option given at boot time within the GRUB configuration will start the system in single user mode to enable password recovery and/or reset?

single-user

su

single

root

Which of the following is a good first troubleshooting step when a hard disk is not detected by the Linux kernel?

Unplug the disk.

Check the system BIOS.

Restart the web server service.

Run the disk-detect command.

Which command and option are used to set the maximum number of times a filesystem can be mounted between running fsck?

tune2fs -c

dumpe2fs

tune2fs -m

setmount

When checking filesystems with the fsck command, which option skips checking of the root filesystem?

-A

-M

-R

-S

You have connected a USB disk to the system and need to find out its connection point within the system. Which of the following is the best method for accomplishing this task?

Rebooting the system

Viewing the contents of /var/log/usb.log

Connecting the drive to a USB port that you know the number of

Running dmesg and looking for the disk

How many SCSI devices are supported per bus?

7 to 15

2 to 4

12

4

Within which folder are systemd unit configuration files stored?

/etc/system.conf.d

/lib/system.conf.d

/lib/systemd/system

/etc/sysconfd

You are troubleshooting a service not starting on time. Which network unit target waits until the network is up, such as with a routable IP address?

network.target

network-online.target

network-up.target

network-on.target

To which file should a unit file be symlinked in order to disable the unit file?

/etc/systemd/unit.disable

/etc/systemd/disabled

/tmp/disabled

/dev/null

You are troubleshooting a service that does not stop correctly. During troubleshooting, you find that the command to stop the service needs to be changed. Which configuration option specifies the command to execute for stopping a service?

StopCmd

ExecStop

StopScript

StopSvc

You are working with a service dependency issue where a service is starting even though it depends on a different service. The unit file currently lists the dependency with Wants=. To what should the Wants= be changed to in order to make the requirement stronger between the two services?

Needs=

LoadFirst=

Verify=

Requires=

When troubleshooting potential collisions for a network interface, which option to the ip command displays additional information that includes a count of collisions?

-s

-c

-o

-f

Which of the following is true of Linux swap space?

Swap is used to hold temporary database tables.

Swap is used as additional memory when there is insufficient RAM.

Swap is used by the mail server for security.

Swap is used to scrub data from the network temporarily.

You are running a Linux instance on a cloud provider and notice slow performance. Which CPU time metric helps to determine if cycles are being used by other instances on the same hypervisor?

HyperV

CircleTime

Steal

CrossProc

You need to examine the hardware to determine if the processor supports virtualization. Which command can be used to display the status of virtualization support?

cpustat

cpuinfo

lscpu

brcxpu

When you're troubleshooting a file access issue for a user, which command can be run in order to determine if the issue is related to SELinux policy?

ls -P

pol --info

showpol

ls -Z

Which of the following commands can be used to help troubleshoot an application crash that may be related to system calls?

strace

systemt

systemd-trace

systemd-debug

Which setting should be changed in journald.conf in order to ensure that journal log files are written to disk?

Location=

Persistence=

Storage=

WriteTo=

As part of troubleshooting services not starting on time, you need to add a service to be started before another to an already-existing systemd unit file. What delimiter is used to separate services with the Before= and After= configuration options in a systemd unit file?

Comma

Semicolon

Colon

Space

When using the du command to diagnose which directories are large, you would like to summarize the output in a more human-friendly format. Which option(s) should be used?

--summarize

-uh

-h

-sh

Which option to tune2fs forces the operation to complete in the event of a problem such as corruption?

-f

-m

-x

-k

You have purchased new SSD hardware that uses the NVMe protocol, but you cannot find the disks in the normal /dev/sd* location where you have traditionally found such storage. In which location should you look for these drives?

/dev/nd*

/dev/nvme*

/dev/nv*

/dev/nvme/*

Which of the following commands mounts /dev/sda1 in the /boot partition?

mount /dev/sda /boot

mount /boot /dev/sda1

mount /dev/sda1 /boot

mount -dev sda1 /boot

Using vmstat to examine the run queues on a single processor system with four cores reveals that there are six jobs in 'r' status. Which of the following describes the current situation?

There are four jobs running and two waiting in the run queue.

There are six jobs running.

There is one job running and there are five in the run queue.

The 'r' column describes regulated processes and not the run queue.

Which command is used to search for physical volumes for use with LVM?

lvmcreate

pvcreate

lvmdiskscan

lvmscan

Which configuration option within a systemd timer unit file causes the program to execute a certain number of seconds or minutes after the system has booted?

OnBootSec

StartupCommand

StartCmdSec

CmdSec

You are troubleshooting an issue reported by a user and suspect it may be related to their environment variables. What command should the user run in order to view the current settings for their environment when using Bash?

environment

env

listenv

echoenv

Which command can be used to determine the default CPU scheduling priority for a given user?

nice

sked

pri

sched

Users are reporting that various programs are crashing on the server. Examining logs, you see that certain processes are reporting out-of-memory conditions. Which command can you use to see the overall memory usage, including available swap space?

tree

pgrep

uptime

free

You suspect that there is high CPU utilization on the system and need to perform further troubleshooting. Which command can be used to determine the current load average along with information on the amount of time since the last boot of the system?

uptime

sysinfo

bash

ls -u

You need to start a long-running process that requires a terminal and foreground processing. However, you cannot leave your terminal window open due to security restrictions. Which command will enable you to start the process and return at a later time to continue the session?

fg

bg

kill

screen

You are troubleshooting an NFS filesystem that will not unmount. Which option within the mount point's systemd mount file can be used to force the mount point to be unmounted?

NFSUmount=

Timeout=

Options=

ForceUnmount=

You have backgrounded several tasks using &. Which command can be used to view the current list of running tasks that have been backgrounded?

procs

plist

jobs

free

You suspect there is a runaway process on the server. Which command can be used to kill any process by using its name?

killproc

killname

killall

kill -f

You are using top to investigate a report of the system processing being slow. A developer reports that that the id column within %Cpu(s) output of top is reporting as 98.3 and they would like to know which PID is associated with that much CPU. What should you tell them?

The id column represents the average delay for a process.

The id column is CPU time related to user processes.

The process ID will need to be found with the ps command to determine which PID corresponds to the id output.

The number that corresponds to id represents idle time of the CPU and not the time used by a process ID.

When an fsck is running on an ext3 filesystem, the process is taking longer than expected and requiring input from the administrator to fix issues. What option could be added to fsck next time so that the command will automatically attempt to fix errors without intervention?

-o

-V

-y

-f

You are using a storage area network (SAN) that keeps causing errors on your Linux system due to an improper kernel module created by the SAN vendor. When the SAN sends updates, it causes the filesystem to be mounted as read-only. Which command and option can you use to change the behavior of the filesystem to account for the SAN bug?

mount --continue

tune2fs -e continue

mkfs --no-remount

mount -o remount

Which command is used to format a swap partition?

fdisk

mkswap

formatswap

format -s

The system is running out of disk space within the home directory partition, and quotas have not been enabled. Which command can you use to determine the directories that might contain large files?

du

df

ls

locate

Which option is set on a filesystem in order to enable user-level quotas?

quotaon

enquota=user

usrquota

userquota

Which option to quotacheck is used to create the files for the first time?

-f

-u

-m

-c

While troubleshooting a file permission issue, you wrote a Bash script containing an if conditional. Which of the following tests will determine whether a file exists and can be read by the user executing the test?

-e

-s

-a

-r

Which start-up type is the default for systemd services if no Type= or BusName= options are specified?

oneshot

exec

simple

none

Which command can be used as a means to elevate privileges to run a command as root?

asroot

elev

sudo

runroot

To which shell can a user account be set if they are not allowed to log in interactively to the computer?

/bin/bash

/bin/tcsh

/bin/zsh

/bin/false

When troubleshooting disk usage, which of the following commands is used to determine the amount of disk space used by systemd journal log files?

journalctl --disk

journalctl -du

journalctl --disk-usage

journalctl -ls

Which command can be used to determine the current time-zone setting while troubleshooting a time-zone configuration issue?

timedatectl status

timedate --gettz

tzdata --list

timezone --show

Which of the following is not used as a private address for internal, non-Internet use?

172.16.4.2

192.168.40.3

10.74.5.244

143.236.32.231

Which of the following commands adds a default gateway of 192.168.1.1 for interface eth0?

route add default gateway 192.168.1.1 eth0

eth0 --dg 192.168.1.1

route add default gw 192.168.1.1 eth0

route define eth0 192.168.1.1

Which option for the host command will query for the authoritative nameservers for a given domain?

-t ns

-t all

-ns

-named

Which option for the ping command enables you to choose the interface from which the ICMP packets will be generated?

-i

-I

-t

-a

Which of the following commands queries for the mail servers for the domain example.com?

dig example.com mx

dig example.com

host -t smtp example.com

dig example.com smtp

You need to test SSL connectivity to a web server at www.example.com. Which of the following commands accomplishes this task?

rd www.example.com -L

curSSH https://www.example.com

openssl https://www.example.com:443

openssl s_client -connect www.example.com:443

Which command can be used to listen for netlink messages on a network?

ip monitor

netlink -a

ip netlink

route

Which of the following dig commands sends the query for example.com directly to the server at 192.168.2.5 rather than to a locally configured resolver?

dig example.com @192.168.2.5

dig -t 192.168.2.5 example.com

dig -s 192.168.2.5 example.com

dig server=192.168.2.5 example.com

Which of the following commands will enumerate the hosts database?

getent hosts

gethosts

nslookup

host

Which of the following configuration lines will set the DNS server to 192.168.1.4 using /etc/resolv.conf?

dns 192.168.1.4

dns-server 192.168.1.4

nameserver 192.168.1.4

name-server 192.168.1.4

Which of the following commands adds a route to the server for the network 192.168.51.0/24 through its gateway of 192.168.51.1?

route add -net 192.168.51.0 netmask 255.255.255.0 gw 192.168.51.1

route add -net 192.168.51/24 gw 192.168.1.51

route -net 192.168.51.0/24 192.168.51.1

route add 192.168.51.1 -n 192.168.51.0//255.255.255.0

Which of the following commands shows network services or sockets that are currently listening along with sockets that are not listening?

netstat -a

netlink -a

sockets -f

opensock -l

Which of the following represents a correct configuration line for /etc/hosts?

192.168.1.4 cwa.braingia.org cwa

cwa.braingia.org cwa 192.168.1.4

cwa.braingia.org 192.168.1.8 alias cwa

alias cwa.braingia.org cwa 192.168.1.4

Which command can be used to determine how much time a Linux command takes?

time

cmdtime

timeproc

proctime

Which of the following commands will change the default gateway to 192.168.1.1 using eth0?

ip route default gw 192.168.1.1

ip route change default via 192.168.1.1 dev eth0

ip route default gw update 192.168.1.1

ip route update default 192.168.1.1 eth0

Which option to dumpe2fs displays the bad blocks for a given partition?

-bb

-C

-b

-f

Which option to xfs_check is used to verify a filesystem that is stored in a file?

-v

-a

-f

-d

Which option within a systemd mount file specifies the filesystem to be mounted?

FSPath=

Path=

Where=

What=

Assume that you want to enable local client services to go to hosts on the network without needing to fully qualify the name by adding the domain for either example.com or example.org. Which option in /etc/resolv.conf will provide this functionality?

search

domain

local-domain

local-order

Which of the following commands prevents traffic from reaching the host 192.168.1.3?

route add -host 192.168.1.3 reject

route -nullroute 192.168.1.3

route add -null 192.168.1.3

route add -block 192.168.1.3

Which of the following describes a primary difference between traceroute and tracepath?

The traceroute command requires root privileges.

The tracepath command provides the MTU for each hop, whereas traceroute does not.

The tracepath command cannot be used for tracing a path on an external network.

The traceroute command is not compatible with IPv6.

Which of the following commands will emulate the ping command in Microsoft Windows, where the ping is sent for four packets and then the command exits?

ping -n 4

ping -t 4

ping -p 4

ping -c 4

Which option to journalctl displays log messages as they are being logged?

--tail

--du

-f

-m

Which of the following commands should be executed after running ip route change?

ip route flush cache

ip route reload

ip route cache reload

ip route restart

Which option should be used to send a DNS query for an SPF record with dig?

-t txt

-t spf

-t mx

-t mailspf

When troubleshooting a connectivity issue, you have found that you can reach a server via the Web but cannot ping it and suspect that there are dropped packets. Which of the following best describes a possible cause for this scenario?

TCP traffic has been blocked at the firewall.

The DNS lookup is failing.

ICMP traffic has been blocked.

There is a reject route in place.

When you're viewing the available routes using the route command, one route contains the flags UG and the others contain U. What does the letter G signify in the route table?

The G signifies that the route is good.

The G signifies that the route is unavailable.

The G signifies that this is a gateway.

The G signifies that the route is an aggregate.

Which of the following commands requests a zone transfer of example.org from the server at 192.168.1.4?

dig example.org @192.168.1.4 axfr

dig example.org @192.168.1.4

dig example.org @192.168.1.4 xfer

dig example.org #192.168.1.4 xfer

You are troubleshooting a disk space issue and notice that the journal files are consuming too much space. Which option within journald.conf sets a limit on how much disk space can be used?

MaxDisk=

SystemMaxUse=

MaxSpace=

SpaceLimit=

Although no dependencies may appear in a unit file, a service with a Type=dbus depends on which service?

dbus.socket

dbus.run

dbus.dep

dbus.svc

Which of the following commands scans the IP address 192.168.1.154 for open ports?

nmap 192.168.1.154

lsof 192.168.1.154

netstat 192.168.1.154

netmap 192.168.1.154

You are troubleshooting an NFS filesystem that will not mount. Which option within the mount point's systemd mount file is used to specify the type of filesystem being mounted?

FSType=

Type=

App=

MountType=

What is the file extension used with systemd unit files that provide time-based control of services?

.svc

.cron

.sked

.timer

You are using nmap to scan a host for open ports. However, the server is blocking ICMP echo requests. Which option to nmap can you set in order to continue the scan?

-P0

-no-ping

-s0

-ping-0

Which option within /etc/security/limits.conf is used to control the number of times a given account can log in simultaneously?

nlogins

loginmax

maxlogins

loginlimit

Which option to nmap sets the scan to use TCP SYN packets for finding open ports?

-sS

-sT

-sY

-type SYN

Which option to tune2fs enables the specification of various journal options such as specifying the location of the journal itself?

-a

-J

-x

-A

You are troubleshooting high latency and low throughput with a disk and using iostat to assess performance. Which option to iostat displays information on a per-partition basis for block devices?

-a

-c

-d

-p

Which of the following commands displays blocks in and blocks out as related to I/O?

iorpt

iptraf

vmswap

vmstat

Which of the following commands can be used to display a list of currently logged-in users along with the current load average and time since last reboot?

uptime

w

swap

sysinfo

You need to examine the hardware to determine the amount of memory on the system and the block size. Which command can be used for this purpose?

free

memstat

lsmem

memx

While troubleshooting high latency, you need to collect data on throughput. Which of the following monitoring tools can use SNMP and scripts to collect data for performance-related graphing such as throughput and bandwidth?

ptop

pstree

Cacti

Grafr

Which swapon option silently skips those swap partitions that do not exist?

-u

-e

-i

-o

Which of the following abbreviations is used to signify system time CPU percentage in the output of the top command?

sys

us

sy

system%

Which of the following commands deactivates swap space?

swapoff

swap -off

unmountswap

uswap

Which of the following swapon options displays information on the size of swap space along with its used space?

--list

-a

--show

-h

Which of the following commands displays information about a given physical volume in an LVM setup?

pvdisp

pvlist

pvdisplay

pvl

Which of the following commands looks for LVM physical volumes and volume groups involved in an LVM configuration?

vgscan

lvmscan

lvlist

pvlist

Which of the following commands is used to display a list of physical volumes involved in LVM?

pvdisp

pvlist

pvscan

pvmm

While troubleshooting interface errors, you need to examine the protocol family supported by an interface. When you're using the ip command, which protocol family is used as the default if not otherwise specified?

tcpip

ip

inet

arp

You are using the route command to view routes. However, name resolution is taking a long time and causing delay in the response from the route command. Which option to route can be added to cause it to not perform name resolution?

-d

-e

-f

-n

You have replaced a device on the network but used the IP address from another active device. Which command can be run to remove the MAC address entry from your computer so that it performs the address resolution again?

arp -d

netstat -rn

hostname

dig

When looking to parse the output of the ip command, which option can be set to remove newlines such that the output could be piped to the grep command?

-n

-o

-l

-f

Which option to the arp command creates a new entry for a given IP address to MAC address pair?

-s

-c

-d

--add

Which option to tcpdump displays a list of available interfaces on which tcpdump can operate?

-a

-d

-D

-i

Which option to nmap will cause it to always perform name resolution?

-n

-R

-b

-a

Which of the following commands provides a live traceroute of the route between two hosts, updating the information for each hop in near real time?

traceroute --live

mtr

route -update

liveroute

You are using a local RAID array and investigating a performance issue. When using mdadm in monitor mode, which option sets the polling interval?

--delay

--internal

--interval

--poll

When viewing the results of a traceroute, you see !H. To what does !H refer?

Network unreachable

Host available

Host unreachable

High length

Assuming that policy routing has been enabled in the kernel, which option to the ping command can be used to mark the outgoing request appropriately in order to indicate that the packet should be processed according to a particular policy?

-m

-a

-p

-k

When you're troubleshooting a possible issue with bad blocks on a disk, which option to fsck will report statistics such as CPU time used on completion of the fsck operation?

-s

-r

-l

-f

Which of the following files provides information on memory utilization, including free memory, buffers, cache usage, and several additional items?

/proc/cpuinfo

/proc/memtime

/proc/memuse

/proc/meminfo

Which scan mode for nmap provides an Xmas scan?

-sT

-sS

-sP

-sX

Which option to tcpdump sets the snapshot length of packets to capture?

-s

-l

-d

-c

On which port does the ping command operate for ICMP echo requests?

53

1337

33433

No port

When running the df command, you need to change the scale such that the report shows terabytes instead of bytes. Which option will accomplish this task?

-ST

-BT

-j

-T

Which option to mke2fs is used to check for bad blocks during filesystem creation?

-a

-b

-c

-d

Which option to the ping command shows latency rather than round-trip time?

-L

-i

-U

-d

You suspect that bandwidth limitations may be preventing large files from transferring in a timely manner. Which of the following commands is used to measure network throughput?

tp

iperf

ith

ithrough

You would like to monitor interrupt usage in real time on a Linux server in order to troubleshoot communication ports usage. Which of the following commands can be used for this purpose?

int

moni

itop

imon

You are configuring an RDMA interface. Which of the following commands displays information about InfiniBand devices?

ibmon

ibstat

rdmon

rdstat

You need to increase the performance of process ID 4382 by changing its priority. Which of the following commands will accomplish this task?

renice -5 -p 4382

renice 5 -p 4382

renice 100 4382

renice 4382 +5

Which option to netstat is used to disable DNS or hostname lookups?

-b

-h

-q

-n

You would like to find all of the process IDs associated with the sshd process on an Ubuntu system. Which of the following commands accomplishes this task?

ps -sshd

pidof sshd

pids sshd

ps --a=sshd

Which kill signal sends a hangup to a given process?

1

5

24

30

Which of the following commands displays the current target runlevel on a systemd system?

ls -l /etc/systemd/system/default.target

systemctl default-target

systemd default-target

ls -l /etc/systemd/system-default.target

You would like to change the byte-to-inode ratio on a new filesystem in order to prevent inode exhaustion. Which option to mke2fs accomplishes this task?

-b

-r

-i

-u

Which directory contains information on FibreChannel HBA ports?

/sys/fc/ports

/sys/class/hba

/sys/class/fc_host

/sys/class/fc/ports

Which type of module interface for PAM is used to set a policy such as the time of day that a user can log in?

auth

account

password

policy

You need to create a restrictive access control list (ACL) on a server. Which policy should be the default for the INPUT chain within the firewall?

deny

permit

accept

discard

Which option to the ls command displays the ownership attributes, including user and group owners of a given file or directory?

-o

-a

-l

-d

When creating a daemon process that will be used on the local server, which of the following communication methods should be used?

Localhost/network

Socket

Message-passing

RDP

When using the free command to determine memory usage, which column shows the memory used by the kernel for things like kernel buffers?

used

shared

buffers

cache

Which of the following commands provides a command-line interface into Network Manager?

nmc

dmc

nmcli

netman

Which command displays network usage in a top-like interface?

iftop

iptop

ptop

netcap

You suspect saturation is affecting network performance with your Linux server. Which command can be used to help determine the amount of traffic being passed through a given interface?

netp

sat

iptraf

ipsat

You are looking to optimize the I/O scheduler for your Linux server. Which I/O scheduling algorithm is the default?

deadline

noop

cfq

iqueue

You would like to efficiently manage firewall rules such that you can define a group of IP addresses to which a single rule can be applied. Which command enables you to create a group of IP addresses?

ipgroup

iptables -group

addrgroup

ipset

You are receiving reports of timeouts from users attempting to SSH between servers. Which command should be used to help troubleshoot these reports?

tcptraceroute

ping

telnet

ps

Which command can be used to capture network traffic in pcap format for later analysis by a tool like Wireshark?

tcpcap

pdump

tshark

pcapr

You need to determine the owner of an IP address. You have attempted to use nslookup to determine the hostname, but there was no PTR record for the IP. Which command can be used to determine who owns the IP address?

iplookup

ipowner

whois

bg

Which command can be used to help diagnose latency issues with a disk?

diskstat

statd

fdisk

ioping

Which command can be used to trigger the kernel to update the partition table?

ifdisk

partup

partprobe

uppart

Which of the following commands can be used to display historical performance data across several different parameters?

sar

kernperf

pkern

perfshow

Which option to sysctl displays all of the available parameters?

-a

-b

-c

-d

When examining output from the state column of the ps command, there is a process with a state of D. What state is that process currently in?

Debug

Interruptible sleep

Uninterruptible sleep

Dead

You are troubleshooting a system startup problem that prevents the system from fully booting into a graphical user interface (GUI). Which systemd target could be used to further troubleshoot the issue?

Poweroff

Multiuser

Reboot

SafeMode

You are troubleshooting printer access on a Linux system. On which port does the CUPS printing daemon listen by default?

25

342

631

316

What is the required extension for systemd mount files?

.mount

.service

.fs

.mountd

Which utility can be used to find SELinux context violations?

sestat

secv

convio

ausearch

You have added a new RAID adapter to the system. Which command can be used to ensure that the adapter was detected by the kernel?

showraid

lsadapt

dmesg

raidlist

Which option is used to send a signal to a process when using pkill?

-<SIGNAL>

-s

-i

-h

You are troubleshooting a directory permission issue. The directory and all subdirectories are owned by root. Within the top-level directory there is another directory that has 755 permissions on it. However, a non-root user cannot obtain a directory listing of that subdirectory. Which of the following might be the issue?

Directory permissions from a higher-level directory do not allow a directory listing.

Directory permissions need to be 777 on the subdirectory.

The write permission is needed for the subdirectory.

The other permission needs to be 7 for the subdirectory.

What is the default request size for ioping?

4 bytes

4 KB

512 KB

1024 KB

Within which file can you determine the current I/O scheduler algorithm?

/sys/block/<device>/queue/scheduler

/sys/block/<device>/iosch

/etc/iostat.cfg

/etc/default/ioscheduler

Which option to iftop prevents hostname lookups from occurring?

-d

-a

-t

-n

Which command can be used within the nslookup CLI to change the server to which the query will be sent?

dest

server

srv

auth

What are the minimum permissions needed for a user to write into a directory for which they are not the owner and are not in a group that owns the directory?

Write

Read/write/execute

Read/execute

Write/execute

Which of the following protocols provides a means for authentication to occur external to the Linux system?

SSL

SSH

LDAP

AD

When creating a file, a user is receiving an error. The file is very large. What command can the user execute in order to determine the file size limitation?

limit

ulimit

filelimit

flimit

What are the minimum permissions for a Bash script so that it is executable by everyone without needing to prefix the command with the word bash?

755

644

777

222

Which option within a systemd timer unit file is used to specify when a job should run?

OnCalendar=

Time=

RunAt=

TimedEvent=

Which of the following abbreviations is used to signify time spent waiting for I/O in the output of the top command?

wi

io

wa

iotime%

Which of the following commands retrieves the current group membership list for a user?

groupmem

groups

lsgr

getgr

You have added a swap disk to a Linux server and have executed mkswap. However, on examination of the output from the free command, you see that the swap space is not being used. Which command do you need to execute?

swapon

swap-en

actswap

swpact

Which option to ioping sets the size of the request?

-m

-n

-f

-s

Which option to the dumpe2fs command can be used to display blocks that are reserved because of being marked as bad?

-v

-f

-b

-m

Which command can be used to obtain extended hardware and device information, including information about the motherboard?

mbhw

lsmb

dmidecode

lsallhw

You have found that a SATA disk within a RAID array has gone bad. Which option to mdadm removes the disk from the RAID array, placing it into a degraded state?

rm

fail

rem

del

Which option to whois suppresses the legal disclaimer information from certain registries?

-L

-q

-H

-s

Which option to iftop sets the interface on which iftop will listen?

-m

-i

-l

-a

To which file can you echo “- - -” in order to cause a scan of a SCSI host adapter for new disks?

/sys/bus/scsi/hostscan

/sys/class/scsi_host/hostN/scan

/sys/class/<host>/scan

/etc/scsiadm

A local user is having password issues. When local authentication is performed, which file provides encrypted password information?

/etc/passwd

/etc/shadow

/etc/encrpass

/etc/passen

Which option within a systemd unit file sets the user that a service will run as?

RunAs=

User=

UID=

ID=

The out-of-memory killer has been killing some processes on the system and you suspect that there are memory leaks. Which columns within ps output are helpful for determining current memory usage for a given process?

size and rss

mem and swap

free and cache

phy and vir

Which signal number corresponds to SIGKILL?

1

5

9

12

Which of the following classes is the default class type queried by the host command?

EX

HS

FO

IN

Which option to the netstat command displays the current routing table?

-r

-t

-a

-l

Which option to the du command provides summary output?

-o

-h

-s

-u

Which of the following commands can be used to find zombie processes?

ps -Z

ps | grep Z

ps | grep zombie

ps -a -z

Which command can be used to list all of the detected hardware within a system?

lshw

showhw

lspic

slist

Which option to the ioping command sets the number of requests to send?

-r

-c

-n

-a

Which process state indicates that the process is currently running?

C

R

T

V

A device mismatch is reported by pvs. Which command rescans volume groups after resolving the mismatch?

pv -scanvl

vgscan

rescanvg

vg -scan

Which setting disables automatic power state management on an NVMe drive?

ps_max_latency_us

apst_ps_latency

apst_off

ps_apst_enable

Which timer expression configures a systemd timer unit file to execute once a week?

OnCalendar=*/7

Time=Week

OnCalendar=weekly

TimedEvent=Sunday

Assuming that /var/log/journal exists, which type of storage is used when the Storage= option is set to auto within journald.conf?

none

journal

persistent

volatile

You need to determine the score at which a process will be killed by the out-of-memory killer. Which file can be examined to determine the current setting for that process?

oom_score

oom_setting

outofmem_num

ooe-l

Which option can be set for a systemd mount point in order to cause the boot process to continue even if the filesystem cannot be mounted?

bootcon

nowait

nofail

skip

You need to send a command-line argument into the command started with ExecStart= within a systemd service file. Which character is used to indicate that a command-line argument will be passed?

@

^

>

$

Which option to the su command enables the user to log in as a different user?

-e

-u

-l

-m

Which option to lscpu produces output in JSON format?

-J

-o

--output

-s

When troubleshooting certificate issues you need to view the entire certificate chain. Which option to openssl s_client displays the certificate chain?

-chain

-certchain

-showchain

-showcerts

You are examining a login issue for a user and you need to determine where their home directory is located. Within which file can you find their home directory?

/etc/passwd

/etc/homedirs

/etc/user.conf

/etc/defaults/user

Which option is used to configure how to reload a service using a systemd unit file?

ExecReload=

Reload=

ConfRel=

ExecRes=

Which expression is used to define a timer that should be executed every minute with a systemd timer?

permin

per_min

minute

minutely

Which option to chage is used to set the number of days of inactivity after password expiration until an account is locked?

-I

-X

-EX

-S

Which option within /etc/login.defs is used to configure the maximum number of days until a password change is required?

MAX_PASS_AGE

PASSWORD_AGE

PASS_MAX_DAYS

DAYS_PASSEXP

You are troubleshooting I/O-related issues and need extended information about disk performance. Which option to iostat displays additional information?

-u

-l

-x

-e

Which option to tune2fs displays the current inode size of a filesystem?

-n

-l

-a

-f

Which systemctl command needs to be executed after making a change to a systemd-related configuration file?

systemctl daemon-reload

systemctl reconfig

systemctl regen

systemctl setup

Within the [Timer] section of a systemd timer file, which configuration directive is used to specify the process or service to start?

Service=

Unit=

Proc=

Startup=

When managing a service with a Type=exec setting in its unit file, what needs to happen in order for systemd to mark it as successfully started?

The process needs to return from its execve() call.

The process needs to return from its fork() call.

The process needs to send a signal to systemfork().

The process needs to send the running() signal to systemctl.

Which configuration option is used within a systemd unit file to configure how to handle an out-of-memory killer?

OOMSetting=

OOM=

OOMPolicy=

OOMSignal=

Which option to renice will increase the priority for all processes by the apache user?

renice -1 -A apache

renice -1 -u apache

renice -1 -UA apache

renice apache -a -1

Which option to repquota does not resolve UIDs and GIDs to their names?

-n

-b

-d

-m

Which command is used to change the SELinux type for a file?

chcon

settype

typeset

setype

While troubleshooting a file access issue, you find that the permissions allow the accounting group but that the user is not a member of the group. Which option to the usermod command adds a user to a group?

-ag

-groupadd

-a -G

-addgr

When working with a virtual machine on a hypervisor that handles I/O scheduling, which scheduling mechanism is suggested for virtual machines?

cfq

noop

timed

vm-opt

When you're using journalctl to investigate an issue, which entries are shown first?

Newest entries are shown first.

Oldest entries are shown first.

Failed entries are shown first.

Smallest entries are shown first.

While troubleshooting a script that runs via cron, you find that the script needs elevated privileges through sudo but there will not be a way to enter a password through the script. Which option within /etc/sudoers enables the command to be executed without prompting for a password?

PASS=NO

SKIPPASS

NOPASSWD

NOPASS

Services are not starting in the correct order. Which configuration option can be used within a systemd service unit file to delay a service from starting until another has started?

Before=

Dep=

Order=

Prior=

You are starting a containerized service through systemd but need to ensure that enough memory has been allocated to the container. Which option within a systemd unit file verifies that the specified amount of memory is available?

MinRAM=

VerifyMem=

VerMem=

ConditionMemory=

You are looking for systemd-related unit files that have been created locally on the system. Within which directory are administrator-created unit files found?

/etc/systemd/system

/etc/systemd/admin

/etc/systemd/adminunit

/etc/systemd.admin

Which systemd target stops the system but does not power it down?

poweroff.target

stop.target

offline.target

halt.target

When formatting the Type= option in a systemd mount file, you need to examine the man page referred to as mount(8). Which of the following commands ensures that you're viewing the 8th level man page for mount?

man mount 8

man mount_8

man 8 mount

man -n 8 mount

Which of the following commands can be used to determine if an interface link is operational?

ip link

ip state

eth state

int state

Which target in iptables can be used to log packets that are dropped and can be helpful in determining the cause of packets being lost or blocked?

INV

DEBUG

LOG

CHAIN

When you're troubleshooting a system that won't boot, which of the following lines can be placed on the kernel command line in order to invoke a debugging shell?

debug,shell

systemd.debug-shell=1

shell=debug

emerg=debug

When you're rebooting a system for diagnosis of an issue, the system appears to hang. Which option can be sent to the reboot command in order to bypass some of the normal shutdown process?

-b

-now

-f

-f0

Which option to systemctl can be used to help find stuck jobs?

-stuck

list-jobs

stuck-jobs

--hung-jobs

You need to examine which services are started at a given <target>. Which command will accomplish this task?

systemctl show <target>

systemctl serdep <target>

systemctl <target> list-dep

systemctl list-dep <target>

Which systemd-related daemon is responsible for name resolution?

systemd-dns

systemd-resolver

systemd-nameservice

systemd-resolved

Which option to the dig command follows the DNS lookup recursively starting at the root?

+trace

+fol

+x

+all

When using journalctl to investigate an issue, which option shows the messages related to the specified unit?

-k

-u

-p

-S

Which command can be used to display all of the timers that are currently active with systemd?

systemctl timers

systemctl show-timers

systemctl list-timers

systemctl --timers

You are working with an SSD to run fstrim and receive the return code 64 when complete. What does 64 mean as a return code?

Trim not supported.

Trim succeeded.

Trim succeeded on some filesystems and failed on others.

Trim failed on all filesystems.

Which systemd target can be used to boot into a minimal system that contains a shell and basic services?

comp.target

emergency.target

init.target

small.target

In order to see more verbose boot messages, which keywords should be removed from the kernel boot line?

verbose

quiet splash

silent

littleboot

Which of the following addresses is outside of the subnet defined by 192.168.1.0/25?

192.168.1.56

192.168.1.1

192.168.1.100

192.168.1.200

Which option changes the amount of time that grub waits before booting into the default operating system?

wait

timeout

waiter

hold

While troubleshooting network congestion, which option to the ss command shows the overall number of network connections?

-s

-c

-w

-h

You are troubleshooting a storage problem, and a Serial ATA (SATA) disk or mount point may be missing. Which of the following identifiers is used by SATA disks?

/dev/hdX

/dev/sataX

/dev/sdX

/disk/sataX

Which file within /etc/systemd/resolved.conf.d/ can be used to configure custom DNS servers on a system that uses systemd-resolved for name resolution?

dns_servers.conf

resolverd.conf

nss.conf

dns.conf

You need to configure additional logging in order to troubleshoot a daemon startup issue. Which of the following is the correct syntax and setting for /etc/systemd/system.conf to facilitate additional logging?

Log=All+Debug

LogLevel=Max

LogLevel=Debug

Logging=all

Which option to systemctl can be used to stop one or more jobs that are in progress?

cancel

cancel-jobs

--kill-jobs

--job-kill

Which command is used to change the state of the interface eth0 to UP?

ip link set eth0 up

bringup eth0

ip up eth0

ip ifup eth0

Which character, when prefixed within an ExecStart= option, causes a failure exit status to be recorded but otherwise ignored?

I

%

#

-

Of the following, which is a required section within a systemd service unit file?

[Service]

[Sys]

[RunTimeConfig]

[Svc]

A user is using sudo to run a command and typed their password in wrong. They reported receiving a rude message from the system as a result. Which option has likely been enabled within /etc/sudoers?

fixusers

insults

failme

rude

When you're using journalctl to investigate an issue, which option reverses the display of entries so that newest are shown first?

-a

-r

-g

-t

Due to inode exhaustion, you would like to change the size of inodes on a filesystem. Which option to tune2fs can be used for this purpose?

-I

-i

-s

-v

Another administrator has asked you for help with a machine where user quotas are not working on the root filesystem. While you're troubleshooting the issue, which file should be present to indicate that quotas are enabled?

/user.quotas

/root/aquota.user

/etc/userpol.aquota

/aquota.user

Systemd is not recognizing that a service is starting correctly even though it is running. Attempts to stop the service through systemd have failed. Which configuration option in the service unit file can be used to set the command to run for this situation?

ExecStopPost=

ExecKill=

ExecStopReally=

ExecReallyStop=

You are troubleshooting a systemd mounted filesystem that does not appear to be working. The configuration file, mount-snd.mount, appears to have the correct configuration for both What= and Where= and other options. The filesystem should be mounting an NFS filesystem to /var/snd. Which of the following is a likely cause of this issue?

The configuration file itself needs to be named in a special way, var-snd.mount.

The dependencies are not set up correctly.

The systemd journal is corrupt.

The mount point needs to also be in /etc/fstab.mount.

When troubleshooting disk-related errors you need to change the behavior of the system so that a kernel panic is not triggered. You will use tune2fs -e to change the error behavior. Which of the following are available options for the error behavior?

resched-io and mailadmin

offline and background

continue and remount-ro

ignore and redress

When working with a systemd timer, what is the best possible accuracy setting for the AccuracySec= option?

1m

1ms

1s

1us

Which environment variable contains the primary process ID within a systemd service unit file?

$DPID

$MAINPID

$PID

$PRIMARY_PID

Which configuration option is used within /etc/fstab as the equivalent of the Requires= option in a systemd mount file?

x-systemd.requires

requires

systemd-requires

require-sys

You need to change the startup arguments for a service managed by systemd. Which line within the unit file is used for this purpose?

Command

ExecStart

Startup

StartCmd

Which file contains information on currently mounted filesystems, including their mount options?

/etc/mtab

/etc/fstab

/tmp/files

/etc/filesystems

Which command and option are used to display the number of times a filesystem has been mounted?

tune2fs

cat /etc/fstab

mount -a

less /etc/fsmnt

When you're using lsblk --discard, which columns should have nonzero values to indicate that SSD trim support is enabled?

DISC-GRAN and DISC-MAX

TRIM-EN and TRIM-BYTES

FSTRIM and NUMBYTES

TRIM-BYTES and FSTRIM

Chapter 5
Practice Exam

Which command enables you to view the current IRQ assignments?

view /proc/irq

cat /proc/interrupts

cat /dev/irq

less /dev/irq

Configuration of udev devices is done by working with files in which directory?

/udev/devices

/devices/

/udev/config

/etc/udev

Which command is used to automatically load a module and its dependencies?

modprobe

lsmod

insmod

rmmod

During boot of a system with GRUB, which key can be pressed to display the GRUB menu?

Shift

E

V

H

Which command can be used to view the kernel ring buffer in order to troubleshoot the boot process?

lsboot

boot-log

krblog

dmesg

Which statement best describes the following, displayed using the ls -la command?

lrwxrwxrwx. 1 root root 35 Jul 8 2014 .fetchmailrc
-> .configs/fetchmail/.fetchmailrc

It is a file called .fetchmailrc that is linked using a symbolic link.

It is a file called .configs/fetchmail/.fetchmailrc that is owned by lrwxrwxrwx.

It is a directory called .fetchmailrc that is owned by user Jul.

It is a local directory called .configs/fetchmail/.fetchmailrc.

Which command is used with systemd in order to list the available service units?

systemd list-units

systemctl list-units

systemd unit-list

systemctl show-units

Which option to lspci is used to display both numeric codes and device names?

-numdev

-n

-nn

-devnum

Which command and option can be used to determine whether a given service is currently loaded?

systemctl --ls

telinit

systemctl status

sysctl -a

When partitioning a disk for a mail server running Postfix, which partition/mounted directory should be the largest in order to allow for mail storage?

/etc

/usr/bin

/mail

/var

Which YUM option displays the dependencies for the package specified?

list

deplist

dependencies

listdeps

Which options for an rpm command will display verbose output for an installation along with progress of the installation?

-ivh

-wvh

--avh

--ins-verbose

Which command will search for a package named zsh on a Debian system?

apt-cache search zsh

apt-get search zsh

apt-cache locate zsh

apt-search zsh

Which rpm option can be used to verify that no files have been altered since installation?

-V

-v

--verbose

--filesum

Which of the following command lines would monitor a single process called nagios in a continuous manner?

top -n 1

top -p 23

ps -nagios

top -p`pidof nagios`

Which option to xfs_metadump displays a progress indicator?

-g

-p

-f

-v

The SAN has crashed again, and one of the filesystems in a Linux server has become significantly corrupt as a result. Which command and option can be used to attempt to examine the contents of the drive without causing more damage?

fdisk -f

mke2fs -c

debugfs -c

ls -a

Which of the following commands helps you to determine information about a given window within an X session, including information on the window size and its position?

xkbinfo

xdspy

xwininfo

xver

Which file is used to indicate the local time zone on a Linux server?

/etc/timez

/etc/timezoneconfig

/etc/localtime

/etc/localtz

Within which directory will you find files related to the time zone for various regions?

/etc/timezoneinfo

/etc/zoneinfo

/var/zoneinfo

/usr/share/zoneinfo

Within which directory should you place files in order for the files to be copied to a user's home directory when the user is created?

/etc/skel

/etc/homedir

/home/usertemplate

/etc/template

Which command displays a list of jobs currently scheduled with at?

atlist

atq

atl

at --jobs

Which of the following encodings provides a multibyte representation of characters?

ISO-8859

UTF-8

ISO-L

UFTMulti

On which port does LDAP over SSL operate?

Port 53

Port 389

Port 636

Port 443

Which of the following commands will set an account to expire based on the number of days elapsed since January 1, 1970?

passwd -e

chage -E

usermod -l

chguser

Which option to SSH enables the use of a key for authentication?

-i

-k

-f

--key

In a scripting scenario, you need to prevent sudo from prompting for credentials or for any other reason. Which option to sudo is used to indicate this?

-n

--noprompt

-i

-q

Which runlevel is typically used for single user mode, as indicated in /etc/inittab?

1

2

5

6

Which of the following commands provides an overview of the current memory usage along with swap space and its current utilization?

mem

free

pstat

swap

Which of the following commands can be used to display the current disk utilization, including free space?

df

du

diskutil

diskuse

Which of the following commands displays CPU-related performance information a total of 10 times gathered every 2 seconds?

sar -u 2 10

sar -u 10 2

sar -u 2

uptime -t

Which option to iostat causes the display to output in megabytes?

-k

-l

-m

-o m

You are working with a legacy CentOS 5 system and need to re-create the initial RAM disk. Which of the following commands is used for this purpose?

mkinitrd

mkramdisk

mkdisk --init

mkfs.init

Which compression method is used for creation of a bzImage?

zip

bzip3

gzip

Cannot be determined

Which options to the fsck command will find errors and automatically assume that it should repair them?

-ry

-vy

-my

-xy

What is the name of the unit to which a systemd system is booted in order to start other levels?

default.target

init.target

initial.target

load.target

Which command is used to format a swap partition?

mkfs -swap

mkswap

format -swap

mksw

You see the word defaults within /etc/fstab. Which options are encompassed within the defaults?

ro, exec, auto

rw, suid, dev, exec, auto, nouser, async

rw, exec, auto, nouser, async

rw, exec, nouser, async, noauto, suid

Which command is used to remove unused filesystem blocks from thinly provisioned storage?

thintrim

thtrim

fstrim

fsclean

Which option to mdadm is used to create a new array?

--create

--start

--begin

--construct

Which of the following commands creates a logical volume with LVM?

lvc

lvcreate

lvlist

lvmake

Which of the following commands shows network sockets and their allocated memory?

ss -m

mpas

mem

free

When troubleshooting a potential hardware problem, you need to determine which physical interface is being used for a certain address. One way to accomplish this is with the ping command in order to monitor the activity lights on the device. Which of the following options to ping will flood the interface with ECHO_REQUEST packets?

-e

-a

-c

-f

Which of the following dd commands reads and writes bytes one megabyte at a time?

dd bsl=1024M

dd size=1M

dd bs=1M

dd rw=1M

Which option to the rsync command examines only the file size as a means of determining whether the file should be synchronized?

--filesize

--size-only

--list-size

--file-size

When creating MX records for a zone, which of the following is the highest-priority mail exchanger?

0

10

20

100

On which protocol and port are zone transfer requests sent?

UDP/53

ICMP/53

TCP/143

TCP/53

Which type can be used with the dig command to test a zone transfer?

xfr

transfer

zxfr

axfr

Which of the following files is used to define the filesystems shared by NFS?

/etc/nfs.cfg

/etc/nfs.conf

/etc/export.nfs

/etc/exports

Which option in dhcpd.conf specifies the maximum amount of time that a client is allowed to have a DHCP lease?

max-time

max-lease-time

lease-max

maximum-lease-duration

You are troubleshooting an authentication issue for a user. You believe the system uses local files and LDAP for authentication. Which of the following lines in /etc/nsswitch.conf shows those authentication mechanisms?

passwd: files ldap

passwd [files ldap]

auth: local ldap

auth: localfiles ldap

Which of the following commands can be used to generate a private and public key pair for authentication with SSH?

ssh-createkey

sshkey

ssh-key

ssh-keygen

Which file contains a list of keys that will be accepted for authentication for a given user?

~/ssh/keys

~/.ssh/pubkeys

~/.ssh/keyauth

~/.ssh/authorized_keys

A newly added SATA disk is not showing up during the boot process. Where can you check to begin troubleshooting this issue?

Using system logging

Using debugfs

Within the fdisk utility

Within the computer BIOS or firmware

Which of the following commands will set the environment variable JAVA_PATH equal to /home/user/java2 when using the Bash shell?

invoke JAVA_PATH=/home/user/java2

export JAVA_PATH=/home/user/java2

envvar JAVA_PATH=/home/user/java2

echo JAVA_PATH=/home/user/java2

Which option in .bashrc sets the number of commands to keep in the .bash_history file?

HISTLIMIT

HISTORYFILE

HISTFILESIZE

HISTNUM

You are creating a Bash script of user information. Which of the following commands prints the username and real name of all users in /etc/passwd in a tab-separated format?

cut -d: -f 1,6 /etc/passwd

sed 's/://' /etc/passwd

awk -F: '{print $1,$5}' OFS="\t" /etc/passwd

cat -o "\t" /etc/passwd

Which git clone command will clone a repository called portalutils into a directory called utils?

git clone ssh://sourcehost/portalutils -d utils

git clone ssh://sourcehost:portalutils utils

git clone ssh://sourcehost/:portalutils utils

git clone ssh://sourcehost::portalutils -d utils

Which of the following commands is necessary for making a variable defined in your current shell available to child processes?

export

source

let

def

You are watching another administrator perform some work on a server. As part of that work, the admin uses the following command:

. variables.sh

Which of the following is the equivalent of . variables.sh?

let variables.sh

set variables.sh

source variables.sh

var variables.sh

Which of the following shows a valid Bash function called sayHello?

function sayHello() { echo "hello"; }

function sayHello{}

function sayHello() { echo Hello }

function sayHello() { echo Hello } ;

Which option to useradd sets the number of days between password expiration and when the account is disabled?

-n

-f

-e

-g

Which command option can be used to remove all cron jobs for a given user using the crontab command?

-d

-e

-r

-l

Which command is used to parse log-file entries on a systemd-based system?

logger

journalentry

jrnctl

journalctl

Which of the following syslog facilities captures messages from the lp printing facility?

auth

messages

lpr

root

Which port needs to be allowed through the firewall for standard LDAP traffic to be received by the server?

TCP port 25

TCP port 443

TCP port 143

TCP port 389

Which of the following is the correct syntax to connect to host.example.com using SSH on port 2200?

ssh -l 2200 host.example.com

ssh host; example.com

ssh host.example.com:2200

ssh host:2200 -d example.com

Which option to the tar command preserves permissions?

-x

-v

-z

-p

When working with a patch file, which option can be used to have the patching process ignore white space?

-w

-i

-e

-p

When using the dm-crypt command, which type of encryption is used by default?

plain

SHA-256

LUKS

loop

Which option to journalctl displays the output in reverse, with newest entries first?

-n

-r

-f

-b

Which systemd target can be used as an alternative to rescue mode when recovery is not possible in rescue mode?

emerg

recover

control-recover

emergency

When performing an rsync across devices, you receive errors that file ownership cannot be preserved, likely due to missing users or groups on the destination system. Which option should be removed from the rsync options in order to not preserve user and group ownership?

-go

-o

-no-ownership

-remove-owners

Which option to ping enables the bypass of the routing tables?

-q

-r

-b

-A

Which option to the patch command makes a backup of files?

-d

-b

-s

-c

A piece of software on client machines that listens for connections and executes commands on behalf of the server in an orchestration is commonly known as which of the following?

Executor

Runner

Agent

Host

Which escape characters represent a carriage return and newline in Bash?

\enter

\r\n

\n

\c\n

Which file test within a Bash script checks to see if the file exists?

-f

-o

-l

-p

Which of the following will execute a Bash script called test.sh even if the execute bit is not set?

./test.sh

test.sh --execute

bash test.sh

run test.sh

When testing an exclude pattern for a .gitignore file, which git command and option can be used to see the results of what will be ignored?

git ls-files -i --exclude-standard

git ls-files --ignored

git show-ignored

git -ls ignored

Which of the following characters is used to redirect STDIN, sending the contents of a file called file.txt into a script called script.sh?

script.sh < file.txt

script.sh | file.txt

file.txt | script.sh

./script.sh > file.txt

Which option to the tune2fs command sets the maximum mount count before the system will automatically run fsck on the partition on boot?

-b

-c

-C

-a

Which option to the mount command can be used to simulate the mount process without actually mounting the filesystem?

-q

-v

-l

-f

Which of the following commands shows the current default route without performing DNS lookups on the IP address(es) involved?

netstat -rn

netstat -n

netstat -r

netstat -f

Which tool can be used to measure the memory usage of individual processes in order to aid in capacity planning?

ps

iotop

iostat

ifconfig

When you're viewing statistics with vmstat, which statistic represents the time that the CPU spent waiting for I/O?

sy

us

wa

io

What time intervals are represented by the three numbers in the load-average output obtained with the uptime command?

1, 5, and 15 minutes

5, 10, and 15 minutes

10, 30, and 60 seconds

1, 3, and 5 minutes

Which option to sysctl displays all values and their current settings?

-a

-b

-d

-c

When you're using systemctl to kill a process, what is the default signal sent to a process?

SIGKILL

SIGTERM

SIGINT

SIGCALL

You are having difficulty with shared libraries on the system. Which of the following commands will print the current directories and libraries in the cache?

ldconfig -C

ldd -f

ldconfig -p

ldd -b

Which flag should be found within /proc/cpuinfo in order to determine if a host can be configured with hypervisor support?

rob

vmx

run

dmc

When using ss to determine listening sockets, you need to turn off name resolution. Which option should be passed to ss in order to disable name resolution?

-n

-x

-a

-r

Which option to systemctl shows the current target to which the system will boot?

show

get-default

show-target

get-target

If you suspect there is an active memory leak on the system, which option to the free command displays the output every N seconds apart?

-b

-v

-d

-s

Which docker command displays detailed information about a container?

mine

inspect

show

list

You are working with an image created by dracut. Which command can be used to display the contents of the image?

dsl

dracutls

lsinitrd

drat

Which of the following commands verifies the current status of a chronyd implementation?

chronyd info

chronyc tracking

chrony --info

chrony --detail

You are troubleshooting network issues and notice a potential attack originating from a single IP address. Which command can be used to determine the owner of that IP address?

whoip

ip-owner

ip info

whois

When you're working with the nftables command to build a web front end, which option to nftables prints output in JSON format?

-j

-i

-m

-s

Which of the following commands displays only IPv6-related connections?

ss -o 6

ss 6-ip

ss ipv6

ss -6

Within which directory will you find configuration files for the Postfix mail server on a Debian-based Linux server?

/etc/postfixd

/var/postfix

/etc/postfix

/var/postfixd

A developer is reporting that their webpage called index.html cannot be viewed on the web. While re-creating the issue, you receive the error “Forbidden” in a web browser and you notice that the file’s permissions appear as -rw------- on the server. Using this information, which of the following describes the problem and its solution and, if applicable, the command to correct this issue?

The developer did not load the file into the correct location. Move the file with the command mv /var/web/

The file's permissions do not allow the file to be read and the chmod 644 command will correct the issue.

The file does not exist. Have the developer upload the file to the server.

The file has the wrong extension. Rename the file with ren index.html index.htm

Appendix
Answers to the Review Questions

Chapter 1: System Management (Domain 1.0)

A.  The modprobe command loads the module and its dependencies, if applicable. The lsmod command is used to list currently loaded modules, making option B incorrect. The insmod command will load a given module but not its dependencies. Option D, rmmod, is used to remove a module from memory.

C.  The keyword single given on the Linux kernel command line will boot the system into single-user mode. The other options are not valid.

D.  The systemctl get-default command will show the default target. The other commands and options are not valid.

B.  The lsusb command is used to obtain a basic list of USB devices on a system. This can be helpful when preparing a USB device with a boot image, such as when you need to boot the system from USB. The other commands are not valid. In the case of option D, the ls command is valid, but there is no --usb option.

D.  The lsmod command is used to list currently loaded kernel modules, thereby making option D correct for this question. The insmod command (option A) is used to load modules. Option C is a valid command but not a valid option for that command, and option B does not exist.

D.  The ESP is typically mounted at /boot/efi.

A.  The mount command is used to mount drives in Linux. The source and destination mount point are expected as arguments. Drive partitions begin at number 1, making the first partition number 1.

D.  If a working device does not appear in lsmod, it typically means the kernel has a driver already loaded by virtue of being compiled into the kernel itself rather than loaded through a module. The use of systemd (option A) or an initrd.img (option B) would have no effect.

C.  The -w option causes the module to wait until it's no longer needed prior to unloading. The other options are not valid for rmmod.

A.  The update-grub is an alias or shortcut for the grub-mkconfig -o /boot/grub/grub.cfg command. On some variants of Linux, the update-grub command is known as grub2-update. The other options are not valid for this purpose. Options C and D are not valid commands, while option B contains invalid options and an invalid location for the destination file.

B.  MBR-based disks can be partitioned with up to four primary partitions, one of which can be further partitioned or extended into logical partitions.

B.  0x82 is Linux swap, while 0x83 is Linux. NTFS is 0x07, and FAT is 0.0c.

A.  The /etc/default/grub file can be used for this purpose. You may also edit /boot/grub/grub.cfg, but this was not an option given for this question.

C.  The -o option can be used to specify a destination file to which output will be sent instead of to STDOUT. The other options listed in this question do not exist.

A.  The recommended /boot partition size has increased and it is now recommended to be at least 1 GB. The used space within /boot will increase as more kernels are added, such as during an upgrade process. The size should not be set too small because upgrade processes can fail if the partition becomes full.

B.  The pvcreate command initializes a physical partition for future use as a logical volume with LVM. The pvs command displays information about physical volumes but is not used to initialize the physical disk partition. The vgextend command is valid but not for the scenario provided. The lvmcreate command does not exist.

D.  The grub2-install command is used to install GRUB onto a disk. The second SATA disk would be /dev/sdb, therefore making option D the correct answer.

C.  The lvcreate command is used to create logical volumes with LVM. The pvcreate command initializes physical volumes prior to creating logical volumes. The commands in the other two options for this question do not exist.

A.  Physical volumes are initialized first, followed by volume group creation, and then logical volume creation.

B.  The grub-mkconfig command should be run after making a change to the /etc/default/grub file so that a new configuration file can be created with the changed option(s).

C.  The lvchange command configures details about a logical volume, including whether that volume appears to be available.

D.  GRUB Legacy begins counting at 0 and separates the disk letter and partition with a comma, therefore making 0,0 the first partition on the first disk. Options A and C are not the first disk on the system, and option B contains a nonexistent partition.

B.  The command to install GRUB is grub-install, and the first SATA drive is /dev/sda. A device listed as hda is typically a PATA drive, thereby making those options incorrect.

C.  The yum install command will install a given package. The update option will update a package. The other options listed do not exist.

D.  The first step is to use fdisk to create one or more partitions. Then format the partitions, and then mount the partitions for use. Various filesystem types can be created with mkfs and its subcommands. These filesystem types include ext3, ext4, xfs, and ntfs.

A.  rpm2cpio sends its output to STDOUT by default, and therefore that output needs to be redirected to a file in most cases.

B.  The addition of journaling in ext3 increased filesystem reliability and performance.

D.  The /opt hierarchy is used for add-on application software packages. The /etc hierarchy is configuration information, while /var is also data files but variable files such as mail files. The /tmp directory is for temporary files. Because each path begins with a /, it is considered an absolute path.

C.  The -a option mounts all filesystems in /etc/fstab that are currently available. Of the other options listed, only the -f option is available, and it is a shortcut to the “fake” option, which does not do anything except perform a dry run of the mount.

A.  The enable option configures the service to start on boot. The start option, option D, is used to start a service immediately. The other options are not valid for this command.

A.  The -g option displays progress of the dump. The other options listed do not exist.

A.  The du command will report on disk usage for the specified directory in a recursive manner, unlike the other commands shown here.

C.  The /etc/fstab file is used to store information about the filesystems to mount within the system. The systemd.mount option refers to the configuration files used by systemd related to filesystems.

D.  The /media mount point is used for removable media. See https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html for more information on the FHS.

A.  SCSI supports 7 to 15 devices per bus, depending on the type of SCSI. The lsscsi command displays device information.

B.  The -r option causes umount to attempt to remount in read-only mode. The -v option is verbose mode, and the -f option forces the operation. The -o option does not exist.

D.  The proper order is the device (UUID or partition) followed by the directory to mount that device, followed by its type and options, and then the dump and fsck settings.

A.  The blkid command will show partition UUIDs. You can also get this information with the lsblk -no +UUID <partition> command. The partprobe command is used to update the partition table at the kernel level. The other commands shown in this question do not accomplish the required task.

D.  The xfs_info command is equivalent to xfs_growfs -n.

B.  The mkfs.btrfs command is used to create btrfs filesystems on block storage and does not require the drive to be partitioned.

C.  Out of the options given, the systemctl status command and option are the most appropriate. The telinit and sysctl commands are not used for this purpose. Likewise, the --ls option is not valid for systemctl.

B.  The parted command can be used to resize partitions in such a way. The mkfs command is not used for this purpose, and the other two options do not exist.

C.  The VFAT filesystem is known as vfat to the mount command, and the other elements of the mount command are standard.

D.  The c option in gdisk is used to change the partition name. The n option creates a new partition, the v option verifies the disk, and the b option creates a backup of GUID Partition Table (GPT) data to a file.

B.  The isolate option is used to move the system into the target specified, thereby making option B the correct one. The stop option stops a service. The other options do not exist.

B.  The -A option checks all filesystems in /etc/fstab, while the -R option excludes the root filesystem.

C.  The fsck option, which is represented as a number in the /etc/fstab file, sets the order in which the device is checked at boot time.

C.  The file /etc/timezone is used to indicate the local time zone. The other files listed as options do not exist.

D.  Within the /usr/share/zoneinfo hierarchy, you will find information on the various regions and time zones available. The files within this hierarchy can be symlinked to /etc/localtime.

A.  The listing shows a symbolic linked file created with the ln command located in the current directory, linked to .configs/fetchmail/.fetchmailrc. The file is owned by the root user and root group and was created on July 8, 2014.

C.  The LC_TIME environment variable is used to control the display and behavior of the date and time and can be changed to a different locale in order to achieve the desired display and behavior of date and time formatting. The other options shown for this question do not exist.

B.  UTF-8 provides multibyte character encoding and is generally accepted as the standard for encoding moving forward. ISO-8859 is single-byte encoded. The other answers are not valid.

C.  The timedatectl command includes a list-timezones subcommand to show known time zones. The tzsel command does not exist, but there is a similar command called tzselect that will, by default, display a step-by-step menu to select a time zone. The eventual output will include a region/time-zone line, such as America/Chicago, as output.

C.  The -nn option displays both numbers and device names, thus making option C correct. The -n option (option B) displays only numbers. The other two options do not exist.

C.  Setting LANG=C is an alias for POSIX compatibility and will cause programs to bypass locale translations. The other options shown for LANG are not valid.

C.  The LC_ALL variable can be used to set environment variables such as the locale and will override others. This can be used when there is a need for a temporary change. The other variables listed here are not used for this purpose and are not created by default.

A.  The ln command is used for this purpose, and the -s option creates a symbolic or soft link, while -f forces or overwrites the destination. The other options and order of commands are not valid.

C.  The LC_MONETARY variable is used by certain programs to determine the localization for currency.

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.

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 or chrony is running, one of those processes may alter the date even after it has been set with date -s.

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.

A.  --systohc 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 be local time instead. Therefore, the best option is A.

A.  The netstat command can be used for this purpose, and the -r option displays the current routes. The addition of -n prevents DNS lookups, which can help with performance.

C.  SATA disks are addressed as /dev/sdX, just like a SCSI disk. /dev/hdX is a traditional ATA disk. The other options do not exist.

C.  The route command is used for this purpose, and adding a route is done with the add option. The default gateway is added using the default gw keywords followed by the IP address of the gateway and the adapter.

A.  The host command enables changing of the query type with the -t option. Using ns as the type will query for the name servers for a given domain. There is no all type, and the other options are also invalid.

B.  The -I option enables the choice of interface. A lowercase -i option sets the interval, while -a indicates an audible ping. Finally, -t enables a TTL-based ping only.

A.  The host or dig command can be used for this purpose by setting the type to mx. The mx type will query for the mail exchanger for the given domain. There is no smtp type.

B.  The localhost address for IPv6 can be written as ::1. Addresses shown like 127 represent the IPv4 localhost range but are not written properly for IPv4 or IPv6.

A.  The ip command with the monitor option/subcommand will display netlink messages as they arrive. There is no netlink subcommand for ip, and the route command will not work for this purpose.

A.  The syntax is database: <databasename> with additional database names separated by spaces, as shown in the correct option for this question.

A.  The @ symbol is used to indicate a server to which the query will be sent directly. This can be quite useful for troubleshooting resolution problems by sending the query directly to an authoritative name server for the domain. Of the other options, -t sets the type, and the other options are not valid.

A.  The getent command is used for working with NSS databases, and getent hosts will display the available hosts using the databases configured in /etc/nsswitch.conf.

C.  The configuration option is nameserver, and the value for the option is the IP address of the desired name server. Several options affect how name resolution is performed, such as the number of attempts and timeout. See resolv.conf(5) for more information.

A.  The route command can be used for this purpose, and the syntax includes the network range, denoted with the -net option, followed by the word netmask and the masked bits, followed by the letters gw and the IP address of the gateway. The other options shown are invalid for a variety of reasons, including missing keywords and options and order.

A.  The netstat command is used for this purpose, and the -a option displays all sockets, listening and non-listening. Note that it's frequently helpful to add the -n option, or combine options as in netstat –an, in order to prevent name lookup. Doing so can significantly improve performance of the command.

D.  The partition containing /var should be the largest for a mail server because mail spools are stored within this hierarchy. The /etc/ hierarchy is usually small, as is /usr/bin. The /mail directory does not exist by default.

B.  The ip route command can be used for this purpose, and its syntax uses a change command and the via keyword. The same operation could be completed with the route command but would require deleting the existing gateway first and then re-adding a new default gateway.

A.  The soa type is used to query for Start of Authority records for a domain. Note that in many cases, dig will attempt to look up the domain within a given command and may not appear to have had an error. For example, when running option D (dig -t auth example.com), you will receive information about example.com, and there will be a line in the output saying that dig has ignored the invalid type of auth.

A.  The search option is used for this purpose and can be provided with multiple domain names, each separated by a space or tab. The domain option is valid within /etc/resolv.conf but does not allow for multiple domain names.

A.  The route command can be used for this purpose, and in the scenario described, a reject destination is used for the route. The other options shown are invalid because they use invalid options to the route command.

D.  The -c option provides the count of the number of pings to send. The -n option specifies numeric output only, while -p specifies the pattern to use for the packet content. Finally, the -t option sets the TTL.

D.  The best option for this question is to add an entry for the host in /etc/hosts. Doing so will always cause DNS queries to resolve to 127.0.0.1. The other options are not as robust because they rely on www.example.com always having the same IP address, or the solutions require additional maintenance to constantly add new IP addresses if www.example.com's IP address changes.

A.  The ip route flush cache command should be executed after changing the routes. The other commands shown for this question are not valid.

A.  SPF records are stored in the txt record type in DNS, thereby making -t txt the correct option for this. Of the other answers, only -t mx is valid; it returns the mail exchangers for the given domain.

C.  The G signifies a gateway within the route table.

A.  The axfr type is a zone transfer, and the @ symbol signifies the server to which the query will be sent. There is no xfer type, and option B is just a normal query for the domain sent to the specified server.

B.  The deplist option displays the dependencies for the given package. The list option displays information about a specific package, while the other two options are not valid.

A.  The df command displays information on disk usage and can help with planning disk utilization over time. For example, if you note that disk utilization is increasing significantly, preparations can be made to bring more disks online or even to change the log rotation schedule such that logs are rotated faster, thereby freeing up space.

A.  The mkinitrd command is used on older systems to create the initial RAM disk. The initial RAM disk is used to load (some might say preload) essential modules for things like disks and other vital components needed for booting.

B.  The lsmod command is used to display currently loaded modules. This is useful for scenarios where you are migrating from the stock or distribution-provided kernel to a custom kernel and need to know which modules to compile into the new kernel. Of the other commands, the tree command is valid but not for the scenario provided.

B.  The depmod command is used to create a list of modules. The list is kept in a file called modules.dep, the location of which is dependent on the distribution of Linux in use.

A.  The -a option displays all values and their current settings for sysctl. The -b option is binary and displays values without any newlines. The -d option is an alias for -h, which is help display. There is no -c option. The sysctl options can also be found in /etc/sysctl.conf.

B.  The modprobe command examines dependencies for a given module and loads both the dependencies and the requested module.

A.  The modinfo command provides information on a given kernel module. You can use modinfo to find out the parameters needed for a given module and the modules on which it depends, among other information. The modprobe command is used to load a module. There is no tracemod or modlist command.

C.  The insmod command inserts a module into the running kernel. It does not, however, attempt to resolve dependencies but rather outputs an error if there are dependent modules or kernel symbols that are not available.

B.  The -r option removes the named kernel modules and attempts to remove any modules on which the named module depends, where possible. The -d option sets the root directory for modules, while -v is verbose and -f forces the module to load.

B.  The /etc/modprobe.d directory is used for storing configuration information related to modules such as that used for blacklisting purposes and also for other configuration information such as udev and module options.

B.  The dracut command is used to create the initial RAM disk for newer systems and has replaced the legacy mkinitrd command used for the same purpose.

B.  Variables and values placed in /etc/sysctl.conf will take effect on boot. The other files listed are not valid.

B.  The --show-depends option displays the dependencies for a given module. The other options are not valid for the modprobe command.

A.  The -ivh options will install a file using rpm, displaying both verbose output and hash marks for progress. The other options presented do not exist or do not accomplish the specified task.

D.  The -n option changes the boot order for the next boot only and boots from the specified partition. The -b along with -B modifies and then deletes the option. The -o option sets the boot order. The -c option creates a boot number.

A.  ISOLINUX provides a means by which CD-ROMs formatted as ISO 9660 can be booted. It's very common to have live CDs or rescue/recovery CDs that use ISOLINUX for boot. The other bootloaders are not valid for this purpose or don't exist.

B.  Due to the decidedly insecure decisions made with the design of Microsoft's UEFI, a shim is often needed to enable Linux to boot on a system with UEFI. The file shim.efi can be used as an initial bootloader for this purpose.

B.  The bcfg command within the UEFI shell is used to configure bootloaders on a UEFI-based system. The command can accept various parameters to configure how the bootloader and kernel will load on boot. Of the other commands shown, grub-install is valid but not within the UEFI shell.

B.  The master boot record, or MBR, is the first sector on a disk and contains information about the structure of the disk. If the MBR becomes corrupt, all data on the disk may be lost. The other options shown for this question are not valid.

D.  The file pxelinux.0 must exist within /tftpboot on the TFTP server in order for a system to use PXELINUX for booting. The other files are not valid or necessary for PXELINUX. Once booted, PXE boot can boot using an NFS-mounted filesystem where the filesystem is physically hosted on a different computer.

D.  The --boot-directory option enables you to specify an alternate location for GRUB images rather than the default /boot. The other options shown for this question are not valid.

C.  The shim.efi bootloader loads another bootloader, which is grubx64.efi by default. The other options are not valid filenames for the purpose described.

C.  The -t option sets the filesystem type as ext2, ext3, or ext4. The mke2fs command is typically symlinked from /sbin/mkfs.ext2, /sbin/mkfs.ext3, and /sbin/mkfs.ext4. The -f option forces mke2fs to create a filesystem. The -a and -e options do not exist.

B.  The /etc/crypttab file contains the filesystems and devices that are encrypted such as those with Linux Unified Key Setup (LUKS). The other file locations do not exist by default and are not related to this question.

A.  The apt-cache command is used to work with the package cache, and the search option is used to search the cache for the supplied argument, in this case zsh. The apt-get command is used to work with packages themselves, while the apt-search command does not exist. The apt.conf file, found either in /etc/apt/ or /etc/, contains several options for how apt behaves.

D.  Configuration files related to the repositories for yum are located in /etc/yum.repos.d. Of the other options, /etc/yum.conf is a file and not a directory, and the other directories do not exist.

A.  The block size for import or restore must match the block size used on export or dump. Block size is specified with the -b option, thus making option A correct. The other options are not valid for xfsrestore.

B.  A filesystem with the word defaults for its mount options will be mounted read-write (rw), suid, with the ability to have executables (exec). The filesystem will be auto-mounted (auto), but users will not be able to mount it (nouser). Character and block special devices will be interpreted (dev), and operations on the disk will be performed in an asynchronous manner (async).

C.  The -z option sets the maximum size for files to be included in the dump. The -b option sets the block size but is not related to what is being asked for in this scenario. The -s option sets the path for inclusion in the dump, and -p sets the interval for progress indicators.

D.  A partition type of 0xFD is used for software RAID arrays. This can be set or viewed using a tool such as fdisk. The other options shown are not valid partition types.

C.  The /dev/disk/by-id directory contains symbolic links to /dev/sd, such as /dev/sda. Because WWIDs can be used to identify a device across systems, they are often used within the context of SANs. The other directories listed as options do not exist.

C.  The pvdisplay command shows information about a given physical volume. You can use pvdisplay to view the device on which the PV is built along with the extent size of the PV. The other commands shown are not valid.

B.  Logical unit numbers (LUNs) that contain the characters fc are those found through Fibre Channel. Therein lies the difference between options B and C, where option C contains the letters scsi, which would usually represent a local disk. The other options are not valid.

C.  The multipath command is used for administration of devices such as LUNs and can be used for finding the path to LUNs for a server, such as in a SAN configuration. Related, the multipathd daemon checks for paths that have failed. The other commands are not valid, with the exception of ls: it is valid, but the option shown is not related to LUNs but rather is a combination of various flags to the ls command.

C.  The fstrim command is used to remove blocks that are not in use. The fstrim command is frequently used in a SAN configuration to give back unused storage to the SAN. The fstrim command can also be used with solid-state drives for the same purpose. The other commands shown are not valid.

B.  The -E option signals that an extended option follows, such as stripe_width. The -f option forces an operation but should not be necessary for this solution, and the -e option sets the behavior on error. There is no -extend option.

A.  The --create option enables creation of a RAID array that will use md. The typical argument is the /dev/mdN device along with the level. The other options listed are not valid for mdadm.

C.  The /dev/mapper directory contains information about multipath devices such as logical volumes. The other directories are not valid.

C.  The --monitor option is used to actively watch an array for issues such as disk failure. The monitoring can be done as a daemon and run in the background, thereby alerting when there is an issue.

B.  The MAILADDR option sets the destination address for mail about RAID events that are noted by mdadm when in monitor mode.

C.  The ip command defaults to the inet family if not otherwise specified with the -f option. The command will attempt to guess the correct family and fall back to inet. The other families listed as options for this command are not valid for use with the ip command.

B.  The iwconfig command, which is similar to the ifconfig command, works with an individual wireless interface to set and display parameters. Of the other commands, the ifconfig command is valid but not used for wireless, and ifcfg is intended as a replacement for ifconfig. The other commands are not valid.

A.  The ss command provides many of the same functions as netstat but can show some extended information, such as memory allocation for a given socket. The free command shows memory usage but not by socket, and the other two commands do not exist.

C.  The -p option shows the process IDs associated with a given socket within the ss output. The -a option is all sockets, while -l is listening sockets. The -f option is used to specify the protocol family.

D.  The /etc/network directory contains information on network interfaces and contains directories that then further contain scripts to be executed when interfaces are brought up or down. The other directories listed do not exist.

B.  Only alphanumerics, minus sign or dash, and dot are valid for hosts in /etc/hosts.

B.  Options within /etc/resolv.conf are preceded with the options keyword followed by one or more options such as debug.

C.  The -f option will force the umount to occur. The --fake option is essentially a dry run in that it won't actually unmount a filesystem. The other two options do not exist.

A.  The --output option configures the location for output of the command instead of STDOUT.

A.  The file lpxelinux.0 contains the necessary code to support booting from HTTP and FTP.

B.  The file /etc/grub2.cfg is usually a symbolic link to /boot/grub2/grub.cfg.

C.  The vmlinuz file has been compressed and therefore consumes less disk space than vmlinux. Both contain the Linux kernel in binary format.

C.  Modules are stored in /usr/lib/modules/{kernel-version}.

A.  The -V or, --verify, option will check the files in a given package against versions (or checksums) in the package database. If no files have been altered, then no output is produced. Note that output may be produced for files that are changed during installation or for other reasons. Note also the use of an uppercase V for this option, as opposed to the lowercase v for verbose.

B.  The /etc/lib directory is not typically associated with library files and does not typically exist on a Linux system unless manually created. The other options either contain system libraries or can be used for that purpose.

C.  The apt-get update command will cause the package cache to be updated by retrieving the latest package list from the package sources. There is no cache-update option or update option to apt-cache. The upgrade option is used to update the system's packages, not the cache.

C.  The /etc/apt/sources.list.d/ directory contains repositories for Debian packages. The other file and directory locations do not exist by default.

C.  The localectl command is used to view and configure settings such as the keyboard layout for a given locale. The other commands listed do not exist.

D.  The directory /etc/sysconfig/network-scripts contains files related to network configuration. It is not preferable to edit these files directly any longer but rather to use commands such as nmcli and nmtui through the Network Manager. The other paths do not exist by default.

A.  The e2label command changes the filesystem label. The other commands do not exist.

A.  The dpkg-reconfigure program will cause an already-installed package to be reconfigured or changed. The -r option for dpkg removes a package, thus making option B incorrect. There is no reconf option for dpkg or reinstall option for apt-get.

D.  The search option performs a search of various fields such as the package name and description.

B.  The file /etc/modprobe.conf, which is a legacy file and may be removed in a later version of Linux, contains information on the configuration of modules on the system. The other files do not exist.

B.  The rpm -q kernel command will show the kernel version. You can also use uname -r for the same purpose.

D.  The kernel-install command uses the files found in the /usr/lib/kernel directory to install a kernel and related files into /boot. The other commands listed here are not valid.

A.  The exclude option can be used to exclude certain packages. The argument accepts wildcards, and therefore excluding all kernel* updates will create the desired behavior.

C.  A raw device is one that has not been partitioned. Raw devices are sometimes used for virtualization and also database scenarios, where the higher-layer software manages the disk. The other options shown are not relevant to this answer. Highly available would only typically refer to a redundant disk or network scenario.

B.  The -s option to dpkg searches for the given package and provides information about its current status on the system. The apt-cache command is not used for this purpose, and the -i option for dpkg installs a package. The apt-info command does not exist.

A.  The -i option to dpkg will install a previously downloaded .deb Debian package. The other commands don't exist, and the -U option for dpkg does not exist.

C.  The info option displays information about a given package on a system that uses the zypper tool.

D.  Blob, or Binary Large Object, is a storage format frequently associated with cloud environments. Blob storage enables a single object to be stored as an individual object. The other formats are valid, but none of the other options is the most appropriate mechanism for this scenario. File storage refers to the hierarchy of folders and files that you would see when using a command like ls.

A.  The search option looks for packages by the name given on the command line. The path that is searched can be controlled by the configuration file at /etc/dnf/dnf.conf. The other options are not valid for the dnf command.

C.  The ext2, ext3, and ext4 filesystems can be resized using resize2fs. Both NFS and CIFS are network filesystems and therefore are not relevant to this question.

D.  The connect subcommand connects to the hypervisor. The other options are not valid subcommands for virsh.

C.  The --list option shows the available character sets on the system. Character sets such as ASCII, UTF-8, and UNICODE are displayed if they are supported on the system. The other options given for this question do not exist.

A.  The /dev/ filesystem is used to store information about connected devices, including block and character devices. The /dev/ filesystem also contains special character devices such as /dev/null, /dev/zero, and /dev/urandom. The /etc/ filesystem is used for configuration files, and there are no proscribed directories for development or kernel device lists.

B.  The /proc/mounts file shows the currently mounted filesystems. The file /etc/fstab is used for mounting filesystems but is not kept up-to-date with filesystem mounts as they change. The other files listed do not exist.

B.  CIFS is the Common Internet File System and is now considered a legacy filesystem, having been superseded by SMB3. CIFS is an implementation of SMB typically used by older versions of Microsoft Windows.

A.  The g option, also known as global or greedy, will apply the matched operation to the entire line rather than just the first instance of the match. The other options apply as they would for a Perl Compatible Regular Expression.

C.  The -g option clears the cache to remove devices that do not exist. The -p option bypasses the cache. There are no -a or -m options for blkid.

D.  The /dev/disk/by-uuid file shows the UUID of the disks on a system. The other locations do not exist.

C.  The /etc/sysconfig/network file is created by default but is no longer populated on systems like RHEL7. It can be used in place of Network Manager for environments that rely on this location. The other options given for this question do not exist.

B.  The -rf options to rm will recursively remove contents of a directory, including other directories. The -f option alone will not work in this case because of the additional directories. The options given for rmdir do not exist.

A.  The cat command will display the contents of the file /etc/passwd and then pipe that output to the awk command. The awk command then parses its input, splitting along the specified separator for /etc/passwd, which is a colon (:). The output is then printed and piped to the sort command. The sort command in option B will not work because the cut command requires an argument. Likewise, the echo command in option C will only echo /etc/passwd to STDOUT.

A.  The timestamp of the file will change when touch is run on a file that already exists.

D.  The -i option will cause both cp and mv to be interactive, that is, prompt before overwriting. The -f option will force the command to run, while -r is recursive.

D.  The /proc/partitions file contains a list of partitions on the system along with their major and minor numbers and the number of blocks. The /dev/disk/ option is a directory and not a file and so is not correct for this question. The other options shown do not exist.

C.  The file /sys/block/sda/stat contains information about the sda device. The /sys/block hierarchy contains information about block devices on the system.

A.  The -p option will cause mkdir to create additional levels of directories without error. Running mkdir without options will not work in this case. The -r and -f options to mkdir do not exist.

D.  The fg command will bring a command to the foreground if it has been backgrounded with either & or the bg command.

A.  You need to write the changes to the file, so you'll need :w. The addition of q will also quit. Note that you could use ZZ to write and quit as well. The dd command in Vi deletes a line, while x deletes a single character.

B.  The WWID, or Worldwide Identifier, is globally unique. UUID and GUID are not valid acronyms for multipath devices. UUID is typically found for plain block devices, and GUID is a term sometimes used in applications. There is no DISKID name relevant as a potential answer for this question.

C.  The -9 option invokes SIGKILL, which will force the process to end. The 15 signal is the default. The -f and -stop options do not exist.

C.  The o command opens a new line below the current cursor location. The a command begins an insert-mode session at the character after the cursor, not the line. The i command begins an insert-mode session at the current cursor location.

B.  The -D option tells dmesg to stop displaying messages to the console. The -F option is valid but is used to read from a file, so it is not relevant for this question. There are no -o or -Q options.

A.  The -f option forces unload of the module. The other options are not valid for rmmod.

A.  The -A option examines modules.dep for newer modules rather than regenerating the file automatically if there are no changes. The -C option changes the configuration file location. The other options are not valid for depmod.

B.  The lsblk command shows device information in a tree-like structure and shows the other information specified along with major and minor information and whether the partition is read-only. Of the other options given, fsck is the only command, and it is not used for the purpose described.

C.  The -m option displays output in a machine-readable format. The -v option prints the version of parted. There is no -p or -S option.

B.  The brctl command is used to create ethernet bridges and is also used to manage bridges once they are created. The other options shown are not valid.

A.  Sending -HUP as part of the kill command will restart a process. Of the other options, -9 will kill the process completely. The other two options do not exist as valid means to kill a process.

C.  The mv command is used to move files, and *.txt will look for all files with a .txt extension. Note the fully qualified destination with a / preceding the name tmp.

B.  The server command changes the destination for queries sent from nslookup during the session in which it's used. The other options shown are not valid.

C.  The file is almost certainly a hard link to the original script. While ls won't show this information, the stat command will show that it is a link and also show the inode to which the file is linked.

B.  The -s option to ln creates a symbolic link, or symlink.

B.  The l within the listing indicates a symlink. There is no way to tell if a file or directory is temporary. A directory will display a d instead of an l.

D.  Scripts are stored in /etc/init.d on a system using SysVinit. You may sometimes find these linked from /etc/rc.d/init.d as well. The other options are not valid for this question.

B.  The -R option will copy directories recursively. Note that if the -i option is not enabled, the recursive copy will overwrite files in the destination. The -v option adds verbosity but does not cause any recursion, while the -Z option does not exist.

A.  The -h option displays output in human-readable format, meaning that the output will be displayed as megabytes, gigabytes, terabytes, and so on. The other options are not valid.

A.  The netcat tool used with the nc command can create a network connection, and the format is nc <host> <port>, thus making options other than that incorrect.

B.  The -z option causes file to look inside compressed files. The -b option specifies brief output, and the other options don't exist.

B.  The -b option enables binary and executable editing with Vim. The -c option is related to commands, while the -d option starts Vim in diff mode. There is no -a option.

B.  The -p option removes the hierarchy of directories. The other options do not exist.

C.  The /dev/zero special file is used as input to the dd command to write zeros or clear a block device. The other options either do not exist or are not used for this purpose.

B.  The -f option freshens the files within the archive. The -d option deletes from the archive. The other options do not exist.

B.  The format for cron is [minute hour day-of-month month-of-year day-of-week], thereby making option B the correct option for this question.

B.  The /etc/cron.allow file is a list of users who have permission to create and remove their own cron jobs. The /etc/crontab file is used to store cron jobs. The other files do not exist.

B.  The at command is used to run a series of commands that you enter. Unlike with cron, you can schedule commands from the command line to be executed in the same order entered rather than having to create a specific script for the commands. The syntax shown in option B sets the time to be one hour from now.

C.  The /proc filesystem contains information about currently running processes and additional information about the kernel and current boot of the system.

B.  The -l option lists partitions available on a given device. The -s option prints the size in 512-byte block sectors. The other options do not exist.

A.  The /var/spool/cron/crontabs directory contains a file for each user that currently has one or more cron jobs or entries. Note that the other files listed here are not valid for this purpose.

C.  The atrm command removes jobs given their ID. The ID can be obtained with the atq command. The atq and at -l commands shown will list jobs but not delete them. The rmat command is not valid.

C.  The /etc/crontab file is a plain-text file that is treated as a system-wide cron file. As such, the file is generally not associated with any single user, and it's not necessary to run a special command after editing this file.

A.  The /etc/cron.daily directory contains files such as scripts that are executed daily. There are corresponding cron.hourly, cron.weekly, and cron.monthly directories that run on their respective schedules as indicated by the name of each directory.

A.  The ls command from within the grub > prompt will show the available partitions in a format such as (hd0,1).

A.  With cable select, ATA drives will be detected in the order in which they are plugged in on the cable from the motherboard. It's likely that the drives need to be swapped physically on the cable.

A.  The format when adding a username places the username between the schedule and the command to run, thereby making option A correct. The other options shown for this question are invalid. In the case of option B, there is no schedule. In the case of options C and D, the schedule is incorrectly formatted.

B.  The upgrade option for apt-get will upgrade the system to the latest version of software for packages already installed. The apt-update command does not exist, nor does the -U option to dpkg. The apt-cache command is used to work with the package cache.

B.  While the ps auwx command combined with grep will provide information on the running Apache instances, it will provide much more information than is required or useful for this problem. The pgrep command provides only the process IDs and therefore meets the criteria presented in the question.

B.  The nice command, when run without arguments, will output the priority for the currently logged-in user, which is normally 0. The renice command can be used to change the priority of running processes. The other two commands shown as options for this question do not exist.

A.  The -i option to df produces information on inodes across all filesystems. The ls -i option will produce inode listings but only for the current directory. The -i option is invalid for du, and dm does not exist as a command.

A.  The crontab command can be used for this purpose, and the -l option is used to list the crontab entries. The -u option is needed to specify a user other than the current user.

A.  The ifconfig command will be used for this purpose and requires the addition of the -a option because the adapter is currently down. The ifup command can be used to bring up an interface but does not display information by default. The netstat command displays information about the network but not with the -n option.

A.  The -T option causes traceroute to use TCP packets. This option, which requires root privileges, can be helpful for situations where a firewall may be blocking traceroute traffic. The -i option chooses the interface, while -s chooses the source address. A lowercase -t option sets the Type of Service (ToS) flag.

C.  Secure Shell, or SSH, operates on TCP port 22 by default. TCP/23 is used for Telnet, TCP/25 is SMTP, and TCP/2200 is not associated with a well-known service.

B.  The nc command is used to start netcat, and the -l option causes it to listen. The -p option is used to specify the port on which netcat will listen. The -s option specifies the local source address and is not used for this scenario.

A.  The soa type is used to query for Start of Authority records for a domain. Note that in many cases, dig will attempt to look up the domain within a given command and may not appear to have had an error. For example, when running option D (dig -t auth example.com), you will receive information about example.com, and there will be a line in the output that dig has ignored the invalid type auth.

A.  Setting your address to 127.0.0.1 will use the localhost interface. Other local NTP clients would contact this server by its normal IP address.

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 the logs will have a different name and possibly a different location than the standard logs. Therefore, logging to any of the standard or system-level facilities is not appropriate for this scenario, so one of the local (local0 through local7) facilities is appropriate.

B.  NXDOMAIN is the status for a nonexistent domain or host: basically, the host for which the query was sent does not exist. A normal status when there has not been an error is “NOERROR.”

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.

A.  If /etc/nologin exists, users will be prevented from logging in to the system. The root user can still log in, assuming that root logins are enabled within the SSH configuration.

A.  The correct format is YYYY-MM-DD for the usermod command.

A.  The systemctl command will be used for this purpose, and the subcommand is disable. There is a stop subcommand, but it will only stop the given service rather than prevent it from starting on boot. The other options are invalid for various reasons, including that they use systemd as the command name rather than systemctl.

B.  The find command will be used for this purpose, and the permission can be described as 4000 to indicate the presence of the setuid bit. The -type option can be used for changing the type of object to be returned but is not relevant for the scenario described.

B.  The make oldconfig command will integrate the existing configuration file into the new configuration for the kernel. Care still needs to be taken for items that have moved or changed within the new kernel, to ensure that the configuration is correct.

C.  The systemctl command will be used for this purpose, with the daemon-reload subcommand. The reboot option would work to reload the systemd configuration but is not correct because it requires the entire server to reboot, which is not what was asked for in this question.

B.  The file /etc/auto.master contains the configuration for autofs. The other files listed as options are not valid for this scenario.

B.  The directory /sys/class/fc_host contains other directories based on the Fibre Channel connections available. Within those host directories will be found the WWN (World Wide Name) in a file called port_name. The fcstat command can be used to obtain statistics related to a given device. The other directory hierarchies are not valid.

C.  The -a option provides archive mode, which is a substitute for several other options. The -r option is recursive, the -o option indicates that ownership should be preserved, and the -f option enables a filter.

A.  According to the man(1) page for the make command, the name Makefile, with an uppercase M, is the recommended name for the file. The name makefile is valid as a default but is not the recommended option. The other options are not valid as default names.

B.  The gunzip command is used to uncompress files that have been compressed using gzip compression.

D.  The install target installs the final compiled files in their appropriate location and makes them executable, if applicable. Of the other options, distclean is sometimes included as a target to return source files to their pristine state. The other targets listed are not valid.

D.  The baseurl option is used to set the URL and must be fully qualified, meaning it must include the protocol, such as http:// or file://.

A.  The /boot partition almost certainly exists but has not been partitioned into its own space. The /boot partition would not be hidden from lsblk if it was indeed a separate partition.

The lsof command can be used for this purpose; with the -i option, it will display the network ports along with their process. The netstat command will display network ports but not the process with the -a option. The ps command is used for processes but not network ports. Finally, there is no netlist command.

B.  The -o option logs output to the file specified. The -k option converts links, and the -r option indicates recursive. There is no -b option.

D.  The service status command is equivalent to systemctl status on systemd-enabled computers. The other commands do not exist with the specified option.

B.  The -1, or -HUP, signal reloads the given process. The -15 signal, also known as SIGTERM, is the default terminate signal, while -2 is an interrupt signal. The -9 signal is kill and is considered bad practice except in emergencies when the process doesn't respond to normal signals.

C.  The Ctrl+C key combination terminates, or kills, a process in a scenario such as the one described here. The Ctrl+D option is a valid key combination but is used to delete the character underneath the cursor.

B.  The stop command, when used with the service command, causes a given service to shut down. The service can be started again with the service start command. The other options shown are not valid commands to use with the service command.

D.  The chassis subcommand configures the type of machine on which the hostnamectl command is running. This can be useful for certain types of applications. Of the other options, the hostname command can be used to set the hostname. The other commands shown are not valid.

B.  The -o option sets the local filename. The -O option preserves the remote filename. The -f option causes curl to fail silently, and the -l option is used with FTP to cause a name-only listing.

D.  The find command will be used for this purpose, and the -perm option is needed, specifically as the 2000 permission to indicate setgid. Note the use of / to indicate that the entire server will be searched. The grep command shown cannot be used for this purpose because it looks for the presence of the string setgid within files located in the current directory only.

B.  The /dev/null location will accept input and not consume additional disk space when output is redirected to it. The /dev/random device exists but is not valid for this scenario. Likewise, redirecting to a network interface or regular file does not meet the criteria for this scenario.

D.  The reload target or command, used as part of a service command, causes the daemon to reload or reread its configuration files.

C.  The Ctrl+Z key combination will suspend a process. The other options are not valid for this purpose. The Ctrl+C key combination kills the process.

B.  The Nano editor is appropriate for this scenario. While Vi is indeed a text editor, beginners typically struggle with it. The nc command is not used for text editing, and there is no ShellRedirect text editor.

C.  The mask command links the unit file to /dev/null, thereby ensuring that the service cannot run. The disable command deletes the symlink between /etc/systemd and /lib/systemd, but the service could still run. The other options shown are not valid.

A.  The printf command can be used to add special formatting to strings for printing. The echo command can be used somewhat for this purpose but is not as powerful at special-formatting capabilities as the printf command is. The other commands are not valid for this purpose.

A.  The scp command copies or transfers a file over SSH. The ncftp command cannot be used for this purpose. The other commands are not valid.

B.  Pressing Shift+F within top enables you to choose which columns display as well as the sort order for the columns. In the scenario described, you can view the processes using the highest amount of memory.

A.  The -f option forces fsck to run on an otherwise clean filesystem. This can be helpful for times when you suspect there is an error on the filesystem and need to verify as part of the troubleshooting process. This can also be helpful to prepare the filesystem for conversion, such as might be the case with a tool like btrfs-convert.

D.  SFTP would be the preferred option because it provides additional security over legacy FTP. In general terms, FTP usually should be disabled because credentials and other traffic are not encrypted. Among the other options, email (SMTP) offers no encryption, and SSL by itself does not transfer files. Because the scenario did not include details of whether the transfer was over a long distance, it is difficult to tell whether USB would be appropriate. However, the use of a USB device is frequently discouraged on servers because it can be another attack vector.

C.  The cpio utility can work with various archive formats, one of which is HPUX-created archives. The gzip or bzip2 command likely would not be able to open or extract from the file; those are typically used for compression and not archival purposes.

A.  Making a bit-level image of the partition with dd is a good idea in order to preserve any evidence of the break-in. Creating a backup using tar is a less preferred option. Examining the partition with fdisk would not reveal any relevant information, and reformatting the partition usually should not be done until the extent of the attack is understood.

C.  The -r option tells the zip command to traverse directories when creating the archive. The other options are not valid for this purpose.

A.  The ps command, when given with arguments such as auwx, will show all processes and the owner of those processes. Combining with the grep command reveals the processes with the word apache in them. On other systems, this might be called httpd instead of apache, but the question specified a Debian system.

B.  The ./configure pattern is typically used to invoke a configure script. Option A might work, but the build directory is typically not in the path.

B.  The lvresize command changes the size of a logical volume. The other commands shown are valid Logical Volume Manager commands but do not solve the problem presented.

A.  The file /proc/mdstat displays information regarding the RAID arrays found a system.

A.  Parity and striping are configured using --layout or -p. The -x option specifies spare devices while -R starts the array. The --level option can be used to set the type of RAID, such as mirroring (RAID1) or striping (RAID5).

D.  The dmidecode command displays information related to the DMI, or Desktop Management Interface.

D.  SSHFS, or Secure Shell Filesystem, is an implementation of FUSE (Filesystem in Userspace) because it allows non-privileged users to mount a remote filesystem without needing elevated privileges.

D.  The .rpmnew and .rpmsave files are used to store configurations for packages that are installed, whether a new configuration file or an existing configuration file.

A.  The renice command can be used to set the priority of a running process. The nice command can be used to set the priority, but because the nc command was already running, renice must be used. The nc command can be used to transfer files, so killing the process isn't a great option. The ps and top commands do not change priorities.

A.  The flatpak-builder command is used to create the application for Flatpak. The other commands do not exist.

D.  The snapd process runs in the background and maintains the list of snap packages available.

A.  The appimagetool command is used to create an AppImage package. The other commands are not valid.

C.  The mtr command combines elements of both ping and traceroute. Among the other commands, nmcli is the NetworkManagement manage tool for network. Both tcpdump and wireshark/tshark are used for monitoring the network.

C.  The -p option specifies the protocol with the resolvectl package. The other options are not valid.

A.  The jobs command shows background processes related to the current shell. The htop command shows running processes but beyond just the current shell. The pidof command displays the process id of a specific process. The other options are not valid.

A.  The arp command, part of the net-tools package, displays the known MAC addresses and IP addresses on a given machine.

B.  The cd ~ command changes the current directory to the home directory, which is /root when you are the root user. The /home directory is used to as the default home directory location for normal users. The /bin and /sbin directories are used for binary programs.

A.  The file command examines and reports the type of file based on its contents. The xz command is used for file compression. The lsof command lists open files but not types. The pgrep command is related to processes.

D.  A process in Zombie state will have a state of Z in the output for ps. The other states shown are valid process states but not with Z in the output for ps.

A.  The pkill command is used to terminate a process by name. The other commands shown are not valid.

D.  Using cd with .. changes up one level. Using cd with . does not change directory. Using cd with ~ changes to the home directory, and the mv ~ command is incomplete and does not work for the scenario provided.

Chapter 2: System Operations and Maintenance (Domain 2.0)

B.  The userdel command is used for this purpose, and the -r option (lowercase) deletes both the home directory and mail spool files. The -R (uppercase) option informs the userdel command to use a chroot directory.

A.  The best option among these choices is to change the group to www-data and change the permissions such that the group can write into the directory. Option B should never be used because it enables world-writing to the directory. The other options will not allow the web server group to write into the directory.

D.  The chage command is used for this purpose. The -d option sets the days since the last password change and is measured in days since January 1, 1970. The -W option is the days of warning for changing a password, and the -l option displays a list of the various settings related to the account. There is no -f option.

B.  User-based configuration files are located in the order .bash_profile, .bash_login, and .profile. Only the first file found is executed; the others are ignored. The file /etc/profile is a system-wide bash profile.

C.  The /etc/skel directory contains files to be copied to the user's home directory. The other directories listed for this question do not exist by default.

C.  The --norc option causes bash to execute without reading the /etc/bash.bashrc (Debian derivatives) or /etc/bashrc (Red Hat derivatives) file or the local ~/.bashrc file. The other options listed do not exist as options for bash, which is the default shell on most popular Linux distributions.

A.  The .bash_profile file, if it exists in your home directory, will be executed on login. Note that placing the function in /etc/profile would technically work, but then the function would be available to all users, which is not what the question asked for.

A.  The DISPLAY variable can be used to remotely send the windows of an X session to another computer when using protocols like SSH. There is no XTERMINAL or XDISP environment variable, and XTERM is typically a terminal window and not an environment variable.

B.  The X11Forwarding option must be enabled in order for X connections or windows generated from the X server to be sent over an SSH connection.

C.  The /etc/passwd file contains various information about users on a system such as username and real name, along with user ID (UID) and login shell. The file is world-readable. The /etc/shadow file contains encrypted passwords but is not readable by all users. The other two files shown as options do not exist by default.

A.  The groupmod command is used for this purpose, and the -n option is used to change the group name. The other commands listed do not exist.

B.  The -m option causes the user's home directory to be created. By default, if this option isn't specified and CREATE_HOME has not been set, the home directory won't be created. The -h option displays help text, and the other options shown are not valid.

A.  The usermod -L command locks an account by placing an ! in the encrypted password. If the user has another means to log in, such as with an SSH key, using usermod -L will not prevent their login. Among the other answers, userdel -r deletes a user and useradd -h displays help related to adding a user to the system. There is no userlock command.

C.  The passwd command will be used for this purpose. The -a option displays all users but requires the use of -S to indicate status. The -S option alone will not produce a report for all users, and the --all option is an alias for -a.

B.  The /etc/shadow file contains usernames, UIDs, and encrypted passwords and is not readable by any non-root user on the system due to the sensitive nature of the encrypted passwords. The /etc/passwd file contains usernames and UIDs but not encrypted passwords. The other two files listed for this question do not exist.

A.  The usermod command is used for this purpose. The -d option changes the home directory from its normal location at /home. The -m option moves the contents. The other commands shown for this question are not valid.

D.  The -G option is a list of supplemental groups to which the user will be added. A lowercase -g option provides the primary GID. The -l option causes the user to not be added to the lastlog and faillog databases. There is no -x option.

A.  The -r option creates a system user, which will typically entail no expiration, no home directory, and a UID below 1000. The -s option defines the shell and is not typically used for this purpose. The -a and -S options do not exist.

B.  The /etc/gshadow file contains secure information such as an encrypted password for groups, where applicable. The /etc/group file contains general information on groups. The other two files listed as options do not exist.

B.  The groupdel command cannot delete groups unless there are no users who have the given group as their primary GID. Therefore, option B best fits the scenario. There is no -f or -r option, making options A and D incorrect.

A.  The id command shows the username, UID, primary group, and GID along with supplemental groups. The passwd and chage commands are not used for this purpose. There is no getid command.

D.  The -c option changes the comment field in /etc/passwd. The comment field is typically associated with the real name of the account. The -R option indicates a chroot directory, while -d indicates a change of home directory. There is no -n option.

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.

D.  The w command shows currently logged-in users along with information such as uptime and load average and is similar to the who command. The fuser command is used to show open files, and the -u option to ls controls the display for file listings. There is no listuser command.

C.  The date of the last password change, as measured in days since January 1, 1970, is contained in the third field of a shadow entry. The expiration date would be the eighth field, as separated by colons.

B.  The who command displays who is currently logged in and the date and time they logged in. The whois command displays information about domains. The other commands are not valid.

A.  The groupadd command is used to add a group to the system. The other options shown are not valid.

C.  The sticky bit is set using +t. For this question, the user permission is being affected, thus the u as an argument to chmod. Among the other answers, the chown command is valid but changes ownership, not permissions, and thus isn't used for the purpose described in the question.

C.  The 022 umask will translate into 644 permissions on a new non-executable file.

D.  There is no direct relationship between the UIDs and GIDs on a system. UIDs represent users, while GIDs represent group IDs. On some systems, the UID and GID numbers will match for regular users, but this is not a requirement and is more of a coincidence.

D.  SNMP traffic takes place on ports 161 and 162. Although the traffic is usually on UDP, the TCP ports are also reserved for SNMP. Ports 110 and 143 are used for POP3 and IMAP, respectively, while 23 and 25 are Telnet and SMTP. Finally, ports 80 and 443 are HTTP and HTTPS.

D.  Loading of alternate files is accomplished using the -f option. Doing so facilitates exactly the scenario described: being able to examine logins from old log files. The -a option controls the location of the display for the host, while -t controls the display to show the logins as of the specified date and time. There is no -e option.

A.  The openssl command will be used for this purpose, with the genrsa option. An output file is specified with -out. The other commands containing openssl all contain an invalid option. The final command is openssh and is not used for this scenario.

A.  The PermitRootLogin directive, set to yes or no, determines whether the root user can log in directly. This option is set within the server configuration file at /etc/ssh/sshd_config. In general, server-wide configuration files for SSH are stored in /etc/ssh while user-specific configuration files are stored in each user's home directory. The other options shown are not valid.

B.  The -R option creates a port forward and enables remote clients to connect. The -L option also creates a port forward but does not allow remote clients to connect. The -P and -E options are not valid for this scenario.

A.  The req option begins the CSR generation process, typically also requiring -new as an additional option. The other subcommands are not valid.

D.  The /etc/profile.d directory can be used to store files and scripts that are then executed on login. Of the other answers, /etc/profile does exist, but it is a file and not a directory. The other answers are not valid directories.

B.  The NAME parameter sets the name for the device. The other options shown are not valid udev parameters.

D.  Port 3306 is the default port for MySQL. Of the other options, 25 is SMTP, and 389 is typically used with LDAP.

C.  The SSLCertificateKeyFile directive points to the location of the private key for an SSL configuration. The other options shown are not valid directives.

A.  The chgrp command can be used to change group ownership of a file. The order is chgrp <groupname> <target>.

C.  The -S option displays output in a format such as u=rwx,g=rx,o=rx. The other options listed do not exist.

B.  The -R option will perform the change ownership in a recursive manner.

C.  The -R option sets the recursive option, which means chgrp will traverse the given directory and perform the group ownership change operation throughout the specified hierarchy.

D.  You minimally need to be able to read the file being sourced; therefore, chmod 400 will correctly set the permissions. Any chmod that gives additional permissions is not necessary. When permissions are granted using octal notation, the number 4 is read, 2 is write, and 1 is execute. There are three permissions: user (owner), group, and other or world. Therefore, chmod 400 grants “read” privileges to the owner and no permissions to group and other/world.

B.  The chage command will be used for this purpose, specifically with the -E option. When provided with a date, chage will expire the account on that date. When provided with -1, the expiration will be removed, thus removing the user lockout. The use of sudo in the options for this question notes the need for elevated privileges in order to run the command successfully.

B.  The getent command is used to display entries based on the /etc/nsswitch.conf file. One use case for getent is when integrating with Microsoft Active Directory or another LDAP service, to check whether the connection can be made to the LDAP server. The usermod command is valid but is not used for this purpose, and the other commands shown for this question are not valid.

A.  The suid bit enables the program to run as the user who owns the file, regardless of who executes the program. Using SUID typically is not recommended for security reasons. The other permissions allow read (r) and write (w) for the owner of the file. The group and “other” permissions include read (r) and execute (x) but not write.

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. Kernel messages are sometimes placed in a separate log called /var/log/kern.log.

A.  The service used for logging on a computer managed by systemd is called systemd-journald. You use journalctl to view logged entries rather than the standard Linux toolset.

A.  The mail command will send the log to the specified email address on completion of the logrotate process. The other options shown do not exist as options in /etc/logrotate.conf.

B.  SMTP operates on TCP port 25, and if other servers are contacting your SMTP server, 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 IMAP, none of which are necessary for SMTP traffic.

B.  Traditionally, udp/53 is used for DNS queries, but with a primary and secondary server, it is assumed that zone transfers may occur. DNS zone transfers typically take place over tcp/53.

D.  The /etc/services file contains standard port-to-protocol information based on the well-known and assigned ports from IANA. If you'd like to provide a custom name for the service, you can do so by editing this file. There is no /etc/ports or /etc/p2p file by default, and /etc/ppp is usually a directory for the point-to-point protocol daemon and related services.

D.  ICMP is a layer 3 protocol, meaning it does not use ports for communication. TCP/43 is used for whois, while port 111 is used for sunrpc. UDP/69 is used for the TFTP protocol.

D.  The chage command is used for working with account aging information such as expiration date, password change, days between password changes, and so on. The -l command lists information for the given account. The usermod command is used to make changes to an account, and the other two commands are not valid.

B.  The ssh-keygen command is used to create a key pair for use with SSH instead of a password. Of the other options, the ssh command does exist, but the -k option is used to disable GSSAPI credential forwarding and not for the purpose described.

A.  The file authorized_keys, stored in the .ssh directory in your home directory, contains public keys that are authorized to log in to the server using their corresponding private key.

A.  The -u option is correct for this purpose. An uppercase -U option sets the user context for listing privileges. The -s option sets the shell, and the -H option sets the home directory.

B.  The NOPASSWD option causes sudo to not prompt for a password for a given sudo command. This is useful for scripted scenarios where a password prompt would cause problems.

C.  The ulimit command shows such limits, and the -a option shows all limits for the currently logged-in user. The other commands are not valid.

C.  The syntax to block access to every service uses the ALL keyword followed by the address or network to which the policy will apply. This is important because you may notice attacks coming from certain IP blocks, and blocking with TCP wrappers provides a fast method for effective blocking.

A.  The file is named id_rsa by default, and the public key is named id_rsa.pub. For DSA keys, the names are id_dsa and id_dsa.pub.

C.  The -c option executes a single command but does so without an interactive session. The -s option specifies the shell to be used. There is no -u or -e option for the su command.

C.  The send-key option followed by the name of the key sends the key to the key server specified by the keyserver option. This is a typical scenario for sending a locally generated public key to a public server for others to use. The other options shown as potential answers do not exist.

C.  While any text editor can be used, it is highly recommended to use the visudo command to edit /etc/sudoers. Using visudo enables syntax checking, which will help prevent issues with an invalid configuration causing problems for those who rely on sudo.

B.  The file ssh_known_hosts, usually kept in either /etc/ or /etc/ssh/, is used for the purpose described. Note that on some systems, this file and other SSH-related configurations may be found in /etc/sshd/. The answers that indicated ~ or within /root are incorrect because the question specified a server-wide list. A known_hosts file found within ~/.ssh would indicate the user's home directory.

A.  The option PasswordAuthentication configures whether users will be allowed to authenticate using a password rather than key-based or another form of authentication. The other options shown are not valid. Note that on some distributions, the configuration files are found in /etc/sshd/, while on other distributions, the configuration files are found in /etc/ssh/.

A.  The --gen-key subcommand is used for the purpose described and will generate a self-signed private and public key pair in a PKI scenario. The other options shown do not exist.

B.  The file pubring.gpg, found in ~/.gnupg, contains the public keyring.

C.  The - option is the typical option passed to su for login. There is no -u or -U option, and the -login option does not exist. There is a --login option with two dashes, but that is not what's shown.

C.  The SSLEngine option needs to be set to On for SSL to be enabled for a given site or server. The other options are not valid. Enabling SSL is important in order to provide a level of security such that the actual data within an HTTP transaction cannot be viewed.

B.  The -k option enables Kerberos authentication for the net command. The -a option indicates that non-interactive mode should be used, and -l sets the log directory. There is no -b option.

C.  The directory /etc/pam.d stores configuration files for individual PAM-aware services. Each service typically has its own file, which is managed for that service according to its usage of PAM. Of the other options, none of the directories are the default directories used for PAM.

A.  The standard port for LDAP is 389, and that is the port on which slapd listens for connections. Port 3389 is RDP, while 3306 is MySQL. Finally, 110 is POP3.

C.  The pam_nologin.so module facilitates a scenario whereby non-root logins are prevented when /etc/nologin exists. This module must be specified within a configuration file for a given service. For example, within the sshd PAM configuration file, the following line creates this configuration for SSH: account required pam_nologin.so.

C.  The pam_unix.so module is used for standard login. The manpage for pam_unix.so indicates that it is for “traditional password authentication.” The other modules listed are not standard PAM modules, although there is a similar pam_auth or squid_pam_auth module for Squid.

B.  The pam_cracklib.so module enforces password strength options. The other files listed are not valid PAM modules.

B.  PEM format is used for public and private keys with a Postfix TLS configuration. The other methods listed are valid cryptographic algorithms or systems but not for the scenario described. As with Sendmail, system administrators should take steps to secure mail servers so that the servers are not used for sending unsolicited email. For many scenarios, a full mail server like Postfix or Sendmail is not required in order to simply relay mail from a server.

B.  The PREROUTING chain, part of the nat table, contains rules that are applied as packets arrive. A common use for this chain is to apply redirect rules. Among the other answers, REDIRECT may appear valid but is in fact a target and not a chain. The other options shown are not valid.

C.  The iptables-save command sends the current iptables rules to STDOUT. The output can be saved to a file and then applied the next time the server is restarted. The other commands shown are not valid.

D.  The iptables -n option causes iptables to not resolve host names or port names. The -L option lists current rules. There is no -a option and the other options are not valid.

D.  The /etc/fail2ban directory contains configuration files related to fail2ban. The other directories shown are not valid. The use of fail2ban is helpful for SSH when compared with other methods like the recently deprecated pam_tally2 and faillock, both of which would not prevent key-based authentication for SSH.

B.  The PermitEmptyPasswords directive specifies whether empty passwords can be used for authentication. Enabling empty passwords would be a specialized use case and generally is not recommended. The other options shown are not valid.

C.  The -P option sets the policy for a given chain in iptables. In this case, the chain is INPUT and the policy necessary is DROP.

B.  OpenVPN listens on UDP port 1194 by default. The other combinations are not the valid OpenVPN configuration.

B.  The DROP target silently discards packets that match the rule. An ICMP unreachable message is sent back for REJECT. In general, DROP is preferred in order to reduce the chances of denial of service (DoS) or other information-gathering issues.

B.  The -m match limit, along with the configuration options shown including the LOG target, creates the scenario described. There will be three log entries per minute. This can be useful to prevent denial of service caused by filling up log files or overwhelming the server I/O while another attack is under way.

A.  The INPUT chain will be used. When used with the -A option, it will append a rule to the chain. The -p option specifies the protocol, ICMP in this case; the -j option specifies the target, ACCEPT in this case. The -P option specifies a policy and will not be used for this scenario.

B.  The INPUT chain will be used, and a rule needs to be appended with -A. The ALL option, when specifying a protocol, means all protocols will be included in the rule. The -s option specifies the source, which in this case is a single IP address. Finally, the DROP target silently discards packets. There is no BLOCK or DISCARD target, and the ACCEPT target will not block but will accept all traffic.

B.  A rule will be appended to the INPUT chain with -A. In this case, the protocol should be specified with -p TCP and a destination port of 2222. The source address indicated, 0/0, applies the rule to all hosts. The ACCEPT target will be used.

B.  Echoing a 1 to the /proc/sys/net/ipv4/ip_forward file enables forwarding of IP packets. This is necessary in order to utilize NAT and for other uses. There is a similar file for IPv6 at /proc/sys/net/ipv6/ip_forward. There is no /proc/sys/net/ipv4/nat file.

A.  The logpath directive determines the log file that will be monitored for failures by fail2ban. This file is used as part of a larger configuration for a given jail. The other directives are not valid for fail2ban.

D.  The ssh-copy-id command sends an identity to a remote server that can then be used for key-based authentication. The other commands shown are not valid.

B.  The mailto configuration option sets the destination for emails related to sudo. The other options listed are not valid for sudo.

C.  Port 123 is used for NTP communication by default. Port 161 is SNMP, while 139 is NetBIOS, and 194 is IRC.

C.  Files related to SSL are typically stored in either /etc/ssl (or a subdirectory therein) or in the /etc/pki hierarchy. There is no /etc/private or /usr/share/ssl directory. The other directories shown as options do not exist.

A.  The AllowUsers directive is used to specify users who will be allowed to log in to the server. The other options shown are not valid.

A.  The --log-prefix option specifies the string that will be prepended when a log entry is created by iptables. The other options shown are not valid for use with iptables.

B.  The SELINUXTYPE option can be set to targeted or strict. With targeted, only specific network daemons are protected.

A.  When Permissive is returned, SELinux is not enforcing rules but is using DAC rules. Other return outputs are Enforcing and Disabled.

B.  The sshd.conf file is used for server configuration. On some distributions, this file is called sshd_config. The ssh.conf file is used for client configuration at the system level.

D.  When a required module returns a failure, other modules continue to process, but the authentication ultimately fails. This is done so that logging will occur and other modules have had a chance to handle the authentication attempt. If a failure should be immediate without processing other modules, then the requisite option should be used instead of required.

B.  The root account has UID 0 on a Linux system. Typically, service accounts have UIDs below 1000, many times below 100. Normal user accounts usually begin at UID 1000.

B.  Although a hardware token may be available, the default option is software based. Note also that OTP solutions to generate a one-time passcode are similar in functionality to provide multifactor authentication.

B.  The directory /usr/lib/firewalld/zones/ contains predefined zones for use with firewalld. The files are copied to /etc/firewalld/zones/ when modified.

D.  The password configuration option is set in /boot/grub/grub.conf. The other options shown for this question are not valid for the scenario.

B.  The setenforce command is used for this purpose and can be given an argument of the number 1 or the word Enforcing to enable Enforcing mode. This can be verified with the sestatus command.

C.  The ssh-add command is used for this purpose. The other commands shown do not exist.

A.  The getfacl command is used to display access control list information for a file. The setfacl command is used to set this information. The other commands shown are not valid Linux commands.

C.  The file ~/.ssh/config is the appropriate location for this type of configuration information. Of the other answers, only ~/.ssh/known_hosts exists and contains public key information for hosts to which you have connected.

A.  The -R option is used to indicate recursive behavior. Of the other options, only -v is valid and provides verbose output.

B.  The -P option makes the values persistent across reboots for SELinux system booleans. The other options are not valid with setsebool.

B.  The directory /etc/apparmor.d/ is the location in which profiles and application permissions are located.

D.  The klist command shows the current tickets when using Kerberos authentication. Of the other answers, the kinit command is used to retrieve the initial ticket-granting ticket. The remaining answers are not valid commands.

B.  The -l option provides a long or detailed listing of files and directories, including ownership and permissions. The -m, -b, and -f options are not related to the scenario described.

A.  The -a option returns all booleans. The other options are not valid with getsebool.

C.  The aa-unconfined command displays processes that are offering network ports but do not have an AppArmor profile. The other commands are not valid.

C.  The wheel group can be used to restrict access to the su command to those accounts that are members of the group. The other groups do not exist by default.

C.  The chcon command is used to change the security context.

A.  An SSL VPN can sometimes work around firewalls that otherwise block VPN traffic. SSL-based VPNs are not typically the default in Linux.

A.  When RSA is chosen as the key type, SHA256withRSA is available along with SHA512withRSA. The other answers shown are not valid hashing algorithms with RSA.

B.  A password set in the BIOS can be used to prevent the system from booting or handing off the boot process to a bootloader. Neither GRUB nor a root password will help with this scenario because physical access is available.

A.  The -n option to restorecon shows current contexts without changing them. Of the other options that are valid, -r changes recursively, and -p shows progress.

D.  The ps command shows processes. When the command is given the -Z option, SELinux contexts are shown.

B.  The pam_tally2 module keeps track of failed logins and can be used to lock out an account after a certain number of failed attempts. Note that pam_faillock provides similar functionality now that pam_tally2 has been deprecated.

A.  The command aa-complain is used to place profiles into complain mode. Profiles are located in /etc/apparmor.d/, and thus the command shown places all profiles into complain mode.

B.  The Match User option is used to change the configuration for a specific user. The other options shown are not valid.

C.  The --runtime-to-permanent option sets the current runtime configuration to become permanent and available on next boot.

A.  The ufw allow command is used to add rules, and SSH operates on TCP port 22.

A.  The software used to create firewalls found on most systems is iptables. Notably, later versions are called nftables, but iptables is still found on many systems in use today.

B.  The scp utility uses SSH as transport and therefore requires TCP port 22. TCP ports 20 and 21 are used for legacy FTP, while UDP/53 is used for DNS queries.

A.  The -a option shows files and directories that begin with a dot. The other options shown are not related to this scenario.

B.  The -i option is used to specify a private key to use for authentication with SSH. Of the other options, -a is used to disable forwarding of the authentication agent, -k disables GSSAPI credentials, and -m specifies message authentication code (MAC) algorithms.

A.  The chown command changes ownership of a file or directory, and the www-data user was specified in the question, thus making option A the only correct option for this scenario.

C.  Noninteractive mode for sudo is triggered with the -n option. The other options are not valid for this scenario.

A.  The aa-disable command is used to turn off profiles used with AppArmor. The other commands shown are not valid.

C.  The -Z option to ls is used to view the SELinux security context. The file command is a valid command but does not have a -Z option.

B.  GnuPG can be used to provide digital signatures through its gpg command. The other answers shown are not valid.

D.  The directory /etc/apparmor.d/tunables contains parameters and configurations that are commonly changed.

C.  The directory /etc/ufw typically contains configuration information for UFW. On many systems, /etc/default/ufw will also contain commonly changed default configuration items.

B.  The ipset project and software facilitates more effective rule management by helping to create sets of IP addresses to which common rules can be applied.

A.  The public key should be copied to the remote host. When it is copied and the contents placed into ~/.ssh/authorized_keys, authentication will be allowed from anyone presenting the corresponding private key.

C.  When octal notation is used, the number 4 is read, 2 is write, and 1 is execute. User, group, and other permissions appear in that order with octal notation. Therefore, 7 grants the user read+write+execute, and 5 grants read+execute for group and other.

B.  The -v option shows contexts of files listed in /etc/sestatus.conf. The other options are not valid for use with sestatus.

C.  The -M option sets the maximum days for password validity, while -m sets the minimum days between password changes. The other options are not relevant to this scenario.

B.  KerberosAuthentication is the option within the SSH server configuration that controls whether users can authenticate using Kerberos.

A.  The -t option, along with the table name, limits output to just the specified table rather than all. The other options are not valid for use with iptables-save.

C.  Sometimes called privileged ports, well-known ports are considered to be those ports under 1024. These ports are usually made available by system daemons and system-level services and can be disabled if not in use.

D.  The pam_limits.so module is responsible for enforcement of limits such as those mentioned in the question as well as several others like the maximum size of files, memory usage, and so on. The other modules listed are not valid.

D.  There are multiple ways to specify log levels and debugging for slapd, including by keyword, by integer, or, as shown in the question, by hex. All the values shown are valid for loglevel. No debugging is 0, trace is 1, stats logging is 256 or 512 depending on type, and packets sent and received is integer 16 or hex 0x10.

C.  LDAP over SSL uses port 636 by default. Of the other options, port 389 is LDAP but without SSL, port 443 is used for HTTPS communication, and 3128 is used for Squid proxy.

B.  The pam_listfiles.so module is used to create scenarios whereby you can create files that control authentication and authorization through the PAM system. The other files are not valid for the scenario described.

B.  The -t option sets the key type for ssh-keygen. The other options do not set the key type but may be valid for other purposes.

C.  The apt-get remove command is used to remove packages from a Debian system. There is no remove-update option or remove option to apt-cache. Likewise, there is no delete option for apt-get.

B.  The format is username (or other specifier) followed by hard or soft, depending on the limit type, and then the keyword followed by the value for that given keyword.

D.  The sysctl command can be used for changing parameters within the running kernel. The changes are not saved between reboots, though, and need to be reapplied if the system is restarted. The other commands shown are not valid.

B.  The account module interface is where access verification occurs. Among the other options, the auth and password interfaces are used for different purposes, and there is no policy interface.

C.  The chattr command is used to change file attributes, including making them immutable. The other commands are not valid.

A.  UIDs less than 1,000, not including 0, are typically used by service accounts. This is not required but is done by convention.

A.  Looking for access vector cache (AVC) messages within the ausearch command can reveal information about policy violations. It's typical to also include USER_AVC within the query. The other options shown are not valid.

B.  The lsattr command can be used to show extended attribute information about a file, such as whether the file is immutable. The other options shown are not valid.

C.  Self-signed certificates are not automatically trusted by clients when connecting, whereas a list of trusted certificate authorities enables certificates issued by those authorities to be automatically trusted. Both self-signed certificates and those issued by third parties can be valid for any length of time, making option A incorrect.

D.  The Chkrootkit software package can be used for security scanning such as examining a host for signs of tampering often associated with a rootkit. The other commands shown as options do not exist.

A.  The file /etc/profile is where the umask is typically set for most Linux distributions. The other files shown do not exist.

C.  The file /var/log/kern.log contains kernel messages and can be used to troubleshoot a kernel panic.

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.

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.

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.

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.

C.  The /etc/issue file is used to provide a message to users, such as a login banner, prior to local login. The other files shown are not valid for the purpose described.

C.  The contents of the file motd, an abbreviation for Message of the Day, are displayed when a user logs in successfully. Among the other options, the contents of /etc/issue are displayed prior to local login. The other filenames are not valid for this purpose.

C.  The realm command is used to join a computer to an Active Directory domain. The other commands shown do not exist.

A.  A wildcard certificate is appropriate for this use case. The wildcard certificate is then valid for all hosts in the same domain. While a self-signed certificate could be used, the scenario specified public-facing hosts, which means that a trusted certificate authority will need to be used in order for public end users to automatically trust the certificate. The other two options are not valid.

C.  The file /etc/login.defs is where options related to shadow-based authentication are set. The other options shown are not valid.

A.  The new connection state indicates a communication path or session that has not yet been established between source and destination. The new connection state was also available in iptables. None of the other options shown are valid connection states in nftables.

C.  The file /etc/ssh/ssh_config contains default values for client behavior that can be overridden by ~/.ssh/config values on a per-user basis. Of the other files, /etc/ssh/sshd_config is valid but defines server-related configuration.

D.  A Socks proxy is used when dynamic port forwarding is configured with SSH. Of the other answers, Squid can be used as a proxy server but is not associated with dynamic port forwarding for SSH. The other options shown are not valid.

A.  Rules are added with a call to the addRule() function in polkit, which is the executable associated with PolicyKit and is used to create rules. The other options shown for this question are not valid functions.

B.  Using the touch command to touch the file /.autorelabel will trigger a relabel for SELinux. The other commands shown are not valid.

C.  The audit2allow command is used to create a new set of rules based on a logfile that contains actions that have been denied. Care should be taken when doing so in order to prevent allowing processes and permissions that should not be allowed. The other commands shown in this scenario are not valid.

C.  The semanage command can be used to make changes such as ports, booleans, and contexts in order to keep a policy in Enforcing mode but still make changes. The other commands shown are not valid for this purpose.

D.  The system-config-selinux command is used to change policies on a Fedora system. The other commands shown are not valid.

B.  The g-s syntax removes the SGID bit from a directory. The other syntax is incorrect and invalid for chmod.

C.  The --user option specifies the user under which the program will be executed. The other options are not valid for this purpose.

B.  Local forwarding is accomplished with -L. The first port is the local port, which is then followed by the destination hostname and port. The other answers do not use the correct syntax for this scenario.

D.  A stateless firewall examines only the source and destination and does not inspect elements inside packets. Stateless firewalls are not typically associated with particular zones such as internal, external, or DMZ, thus making option A incorrect. Linux has firewalls that can be configured as stateful, thus making option B incorrect.

A.  The UID_MIN configuration option defines the lowest value that will be used when creating users. The other configuration options shown are not valid.

A.  The presence of an asterisk within the name *.example.com indicates that this is a wildcard certificate. While the certificate may be self-signed, there is not enough detail within the given information to determine the chain of trust. An asterisk is not a valid hostname for DNS but is valid to indicate a wildcard certificate.

Chapter 3: Scripting, Containers, and Automation (Domain 3.0)

A.  The echo command is used to send output from a Bash script. The other options are not valid commands.

A.  Ansible is agentless, using SSH and Python for orchestration. Puppet does have an agentless mode but typically uses agents for orchestration. The others are not valid orchestration packages.

B.  The env command executes a command and enables a custom environment for that command execution. The set command changes environment variables but does not change variables for the single command execution, as specified in the scenario. The other options are not valid commands.

B.  The pull command in git fetches the changes and incorporates them into the current working copy. The fetch command retrieves but does not incorporate the changes. The other options are not valid git subcommands.

B.  Infrastructure as code typically means managing infrastructure components using some of the same tools that developers would use, such as source code management along with programs or scripts and automation for deployments and configuration changes. These practices help to facilitate continuous integration/continuous deployment (CI/CD) scenarios by automating many processes.

A.  The chmod command will be used for this solution. The option granting 700 enables execute privileges for the owner. The other options have incorrect syntax, an incorrect path, or inappropriate permissions for the scenario described. It is important to differentiate between relative and absolute paths, noting that ~/ is an alias for your home directory.

A.  The source command adds functions found in the file argument to the current shell. The source command is frequently used for software installs to ensure that the environment is set up properly prior to execution of the install scripts.

D.  The character sequence #!/bin/bash invokes the commands that follow as a Bash script.

C.  The greater-than sign is used to redirect output to a file and will overwrite the file if it already exists. The pipe character can be used to chain output but is not considered redirection of output. The less-than sign will redirect input and the ampersand will send a process into the background.

A.  Creating a git repository requires creating the directory, changing the current working directory to the new directory, and then running git init --bare. The other commands will not create an empty git repository.

B.  The term inventory is most often used in orchestration to refer to the collection of devices under management.

D.  A backslash is used to escape characters such as a single quote in a Bash script. The other characters will not achieve the desired result.

A.  An exit code of 0 indicates that the script did not encounter an error. This exit code is generally associated with a successful execution of a program in Linux.

A.  Shell expansion, or more accurately, brace expansion, can be used to create the output shown. The other options will not produce output as shown.

C.  The pound sign (#) is used to indicate that what follows is a comment and will not be executed for the remainder of the line. The other options are valid comment styles in other languages but not for a Bash script.

D.  No special extension is necessary for a Bash script to be executed. The extension .sh shown as an option is a common extension that you will see for shell scripts of any variety, but the extension isn't required.

C.  The merge command incorporates changes to a previously cloned git repository. The push command is valid but is used to send code to a remote repository or origin. The other commands are not valid.

A.  An agent is software that runs on clients and listens for commands from the server in an orchestration architecture.

C.  Infrastructure automation is the term most closely associated with adding (and removing) servers in response to load and demand and is frequently associated with continuous integration/continuous deployment (CI/CD) concepts.

C.  When executed as part of a function, the local command can be used to create a local variable in a Bash script.

A.  The clone command retrieves a copy of the repository for local use. The checkout and co commands are used with Subversion and not with git.

D.  The $0 parameter contains the name of the script being called. The other answers do not fulfill the requirements of this scenario.

B.  The printenv command can be used to print the contents of the current shell environment such as environment variables. Within the output you'll find things like the $SHELL variable, which specifies the current shell. The other options shown are not valid commands.

B.  A single equal sign is used for string comparison in a Bash script. Of the other answers, -ne is valid but is used when comparing integers. The string eq would be an operator if preceded by a single dash, as in -eq. In that case, -eq is used for integer comparison.

B.  A while loop that evaluates boolean true will accomplish the task described. The other options given are syntactically incorrect in various ways.

B.  The git checkout command switches the working copy to the specified branch and points the HEAD toward that branch. The other commands shown as options are not valid with git.

C.  The export command adds a variable to the current environment and is frequently used for the scenario described. The other options are not valid commands.

B.  The current contents of the PATH variable, or any other shell environment variable, can be displayed using the echo command. Variables in Bash use a $ as part of the identifier. Therefore, any option without the $ would not work.

A.  The $() sequence executes a command within a subshell, which is helpful for ensuring that global variables in a Bash script cannot be modified. The other sequences shown are not valid for the scenario described.

B.  Managing configuration with orchestration is described in this scenario, so option B is the closest response.

B.  The -u option or --unset will remove a variable from the environment. The other options are not valid with the env command.

C.  The double-ampersand metacharacter executes the right-hand command only if the first command exits with a successful exit code. A single ampersand sends the command into the background, thus making option B incorrect. A pipe character executes the second command but does so regardless of the success or failure of the first command, thus making option D incorrect.

B.  Two greater-than signs append output to the specified destination. Option A includes only one greater-than sign, which overwrites rather than appends output. The pipe character in option C does not send output to a file, and option D does not work for the purpose described.

D.  File globbing is the process of expansion of special characters, which is required for this scenario. In this case, the negation character is the caret, thus making option D correct. Option C is missing the crucial globbing pattern needed for this scenario.

B.  The .gitignore file is used to store files that will not be versioned.

C.  The for loop should be used for this purpose because it iterates through a list. An until loop would require additional code, thus making it a less-preferable construct for the purpose described. There is no do loop or foreach loop in Bash, thus making those options incorrect.

C.  Command substitution can be accomplished using backquotes or $(). These two methods are substantially but not completely equivalent.

C.  The git log command is used to show a commit history. The other commands shown are not valid with git.

A.  The -m option enables a message to be included in the commit, thereby alleviating the need to go into an editor to create the commit message. The other options shown do not accomplish the required task.

B.  Build automation is the most appropriate name for kicking off the compilation of software on commit and is frequently found in organizations that use continuous integration/continuous deployment (CI/CD).

A.  In this scenario, STDIN redirection is accomplished with a less-than sign to take the contents of customers.sql and send those contents into the mysql command. It's also likely that the mysql command would have things like -u for the username and -p to prompt for the password, but those were not relevant to the scenario and are not required in all circumstances. The other options shown are not valid for the purpose described. Options B and C take output from the mysql command, while option D is an invalid character sequence.

C.  More than likely you have not executed git push to send the code to the server. Of the other options, you do not need to send commit IDs to teammates and there is nothing to indicate that you have been having problems committing the code itself.

B.  The -R option performs a recursive change to the targets identified by the chmod command. The other options do not perform recursive changes for chmod.

D.  The closing parenthesis is used to denote a case; when preceded by an asterisk, the default case is indicated.

B.  The character sequence fi, which is the if statement backward, indicates the end of an if conditional within a Bash script. The other sequences shown as options may be used in other languages.

B.  The main branch is the branch created by default within a git repository. The other names shown can be used but are not the default.

B.  The pipe character sends, or pipes, the output from one command into another and is commonly used in a Linux environment for creating complex command sequences, whether through scripting or directly on the command line. The other options shown are not used for the purpose described in the scenario.

B.  The git status command is used to show the current state of the working copy, displaying things like untracked files, files staged for commit, and so on. The other options shown are not valid for the scenario.

B.  The -n option suppresses the trailing newline character from the echo command and is quite useful in scripting scenarios. The other options are not valid for the command.

A.  The inventory of an infrastructure contains things like the version of software installed on clients.

C.  Redirecting STDERR is accomplished with the character sequence 2>. The plain greater-than sign redirects STDOUT. The other character sequences shown as options are not valid for the purpose described.

A.  The git config command will be used for this purpose, and the parameter is user.email.

B.  The readonly command displays the list of read-only variables that have been declared in the current session. The other commands listed for this question do not exist.

D.  The set command can be used for a variety of purposes to change how the shell environment works. One such option is –C, which prevents output redirection such as that done with > from overwriting a file if the file already exists.

C.  The file command can be used to determine which type of file is being used. This can be particularly helpful for files without extensions, where you are unsure if you should view the contents of the file. Option A, grep, is used to look within files but would not be helpful in this case. The telnet and export commands are not used for this purpose.

B.  The history command will display your command history, including commands from the current session. You can specify how many lines of history to display, as shown in the answer for this question. Note that .bash_history will not show the current session's history.

A.  Preceding the command with a ! will search history and execute the specified command. For example, !vi will start your last Vi session.

A.  The type built-in command returns the location that the shell will use in order to run the given command. The find command cannot be used for this purpose, and the other commands do not exist.

C.  The source command is used to execute commands from a file. A typical use case is to create functions or variables that are then available for use within the current session. The other commands listed do not exist.

B.  While it's true that every user has a .bash_logout, the file exists in their home directory and therefore can be edited by the user. Therefore, to ensure that the required command is executed at logout, the file /etc/bash.bash_logout must be used.

B.  The env -u command will unset an environment variable for the current session. The unset command can also be used for this purpose.

A.  The env command, when used as #!/usr/bin/env bash, will determine the location of the Bash interpreter automatically. This makes the resulting script more portable for systems where Bash may not be located in /bin/.

B.  The PS1 variable usually has its default set in /etc/profile and is used as the shell prompt. Users can customize the prompt to include hostname, working directory, and other elements.

C.  The $1 variable is automatically available within Bash scripts and represents the first command-line argument. The $0 variable is the script itself. The other variables listed in this question do not exist by default.

B.  The seq command is used to print a sequence of numbers in a variety of formats. The answer for this question provides a starting point (0), an increment (1), and the final number (5), thus resulting in six numbers being displayed as output.

D.  The exec command executes the command given as its argument and will then exit the shell. The source command does not exit the shell.

C.  The read command awaits user input and places that input into the specified variable. The exec command is used to execute commands, and the other options are not valid for the purpose described.

A.  Parentheses are used to denote a function, such as myFunction(). The parentheses are optional but are then followed by curly braces containing the commands to be executed when the function is called.

C.  The sequence esac, which is case spelled backward, is used to indicate that a case statement has ended. Of the other options, the done statement is used for termination of certain loops in Bash.

C.  The -p option displays declare statements in a way that the commands are fully qualified and could then be used as input for another command, through either piping or redirection to a script.

C.  Square brackets are used to denote the beginning and end of the test portion of a while loop in a shell script. Other languages generally use parentheses for this purpose.

B.  The test built-in will return true and can be used to test for the value existence of a variable not being null. Note that the behavior of the test built-in differs depending on the number of arguments.

C.  The HOME environment variable, set automatically to the user's home directory, is consulted when the command cd ~ is entered. The other paths beginning with HOME do not exist by default, and the MAILPATH environment variable shown contains a list of locations where mail is checked when the shell is used interactively.

B.  The git log command will be used for this purpose, with an option of --follow and the filename/path to follow through history.

A.  Parameters and other facts about the clients are also called attributes in an orchestration.

C.  The integer comparison -eq is used for comparing integers within Bash scripts. The other answers are not valid for Bash script comparison.

C.  The semicolon metacharacter chains multiple commands together but does not use the output from one command as input to the next. If the output needs to be sent into the next command, the pipe character (option D) is used. A single ampersand places a task in the background, thus making option A incorrect; a greater-than sign redirects standard output, making option B incorrect as well.

A.  The \a escape sequence, when used with the echo command, sounds an alert or bell. The \b option is a backspace. The \c option indicates that echo should not produce any additional output. There is no \d option for echo.

D.  It is important to note that there cannot be any spaces between the variable name and the equal sign. Likewise, there cannot be any spaces between the equal sign and the contents of the variable. This makes option D the only correct answer.

A.  The provided answer performs command substitution and places the value from the resulting command into a variable. Note the use of +%s formatting on the date, which then formats the output as seconds since the epoch, as specified in the question. Option C will provide the date within the DATE variable but will not format it as specified.

B.  In shell scripts, the commands to execute begin at the do keyword and end at the done keyword. Other languages generally use either curly braces or tabs.

A.  The -r option to declare will create or mark the variable as read-only. The -p option prints output in a format that can be reused. The -x option declares the variable for export.

C.  The LC_TIME environment variable is used to control the display and behavior of the date and time and can be changed to a different locale in order to achieve the desired display and behavior of date and time formatting. The other options shown for this question do not exist.

A.  The -i option shows interface information in a table-like format. This option is used to see information such as transmit and receive bytes as well as the MTU for the interface and other information. The -r option shows routes, while -l shows listening sockets. There is no -t option.

C.  The Ctr\l+C key combination kills a shell script that you are running interactively. The other key combinations may have an effect but not within this context or for the desired behavior.

C.  Shell scripting syntax uses the format shown, with square brackets around the condition to be tested and double equal signs for a string test. Variables are preceded by a dollar sign as shown.

A.  The syntax for setting the PATH separates the new path with a colon, as shown in the correct option. A primary difference between the correct and incorrect options for this question is in how the actual specified path is shown.

B.  The --abort option attempts to roll back a problematic merge. The other options shown do not exist as options to the git merge command.

A.  The GIT_DIR environment variable can be used to change the default location away from the ./.git directory in which a new repository would normally be created. The other options are not used by git as environment variables.

B.  The \t escape sequence adds a horizontal tab. The other characters may have different meaning and so are not valid for this question. For example, \a is alert or bell.

C.  The double-asterisk sequence has special meaning and indicates that the file will be ignored in all directories.

A.  The scenario requires alternation. Therefore, square brackets will be used to indicate the beginning of the sequence. After the brackets, a single asterisk indicates a wildcard. The other options will not work for the scenario described.

B.  The git remote command will be used for this purpose, and when the command is given the show option and the remote name (origin, in this case), additional information about that remote will be displayed. The command is useful for displaying information about the destination for pushed code.

D.  The $# character sequence contains the number of command-line arguments that were passed to a shell script. The other options shown are not predefined by Bash.

B.  The TMOUT variable can be set in a given user's shell, and they will be logged out after the value given (in seconds) of inactivity. The other environment variables listed here do not exist.

C.  The line will output the contents of the NUM variable. The comment occurs after the command on the line, and only code after the # appears is ignored.

A.  Using the --origin or -o option enables the name to be changed from the default of origin. The other choices are not options with git clone.

D.  The steal column shows the percentage of time that was spent waiting due to the hypervisor stealing cycles for another virtual processor and can be used with infrastructure automation to indicate that additional CPU resources need to be deployed.

C.  The LC_ALL variable can be used to set environment variables for the locale and will override others. This can be used when there is a need for a temporary change. The other variables listed here are not used for this purpose and are not created by default.

A.  A procedure is one or more commands that are executed on a client node as part of infrastructure automation.

C.  Double semicolons are used to indicate the end of an individual clause within a Bash script. The other sequences shown do not accomplish the task described.

C.  The unalias command is used to remove a previously defined alias. The rm command will remove regular files but not aliases. The other commands do not exist.

B.  The -e option checks to ensure that a file exists and is typically used in the context of a conditional within a shell script. The other options may work within shell scripts but are not tests for file existence.

C.  Setting LANG=C as an alias for POSIX compatibility will cause programs to bypass locale translations. The other options shown for LANG are not valid.

A.  The --list option shows the current configuration parameters for git. The other options do not exist as options for the git config command.

B.  The number 2 indicates STDERR redirection, and double greater-than signs indicate that the output will be appended rather than overwriting.

A.  A file with a .yml extension usually contains YAML. The question also gave a hint of infrastructure as code, where many tools use YAML for configuration and procedures.

A.  The passwd file will be sent to STDOUT, where it will be captured and sent into the cut command. The cut command will separate the contents of the file line-by-line using a colon as a delimiter. The first field will be sent to STDOUT and placed into a file called users.txt.

C.  The shift command moves positional parameters down by one. This can be helpful for complex scenarios with several command-line arguments, each containing an option.

D.  The --no-commit option should be added to git pull to prevent the merge from being automatically committed.

A.  As with the for loop, the commands within an until loop are delineated with do and done.

B.  An exit code of 1 indicates a general error. The exit code of 0 indicates success, and 256 is out of range. There is no -1 exit code for Bash.

B.  The << operator is used for this purpose and will read from STDIN until the specified character or characters are encountered. This is sometimes called a Here Document or HEREDOC. Among the other options for this, only > is valid and causes STDOUT to be redirected.

A.  The -a option, when added to git commit, automatically commits previously known files. The -c option invokes the editor for the commit, and the other options do not exist.

C.  The LC_MONETARY variable is used by certain programs to determine the localization for currency.

D.  The TZ environment variable is used for this purpose, and the general format is as shown, thus making option D the correct answer.

A.  Array creation in a shell script involves parentheses when used in this manner. You can also use square brackets to define individual elements, as in ARRAY[0] = "val1".

C.  The -lt operator is used to test for "less than" conditions within a script. The other operators are not valid for use in a shell script.

C.  The for loop construct in this case will require the variable name LIST to be preceded with a dollar sign ($), thus making option C correct. The other options will not work for the purpose described.

C.  The elif keyword is used to create an alternative execution path within a shell script. The other constructs, such as else if and elsif, are used in other languages.

C.  The .git directory is used for storage of metadata for the repository.

B.  The character sequence shown in option B is the correct sequence to redirect both STDERR and STDOUT. Of the other options shown, option A will redirect only STDERR. The other options shown are not valid.

D.  The double-pipe metacharacter executes the right-hand command only if the first command fails. A single ampersand sends the command into the background, thus making option B incorrect. The double-ampersand metacharacter executes the second command, but only if the first command succeeds, thus making option C incorrect.

C.  The git checkout command switches the location to which HEAD is pointing. By adding the -b option, the branch is also created.

D.  Both while and until loops execute until a condition changes. The while loop stops when the condition is no longer true, and an until loop executes until the condition is true.

A.  Comparing integers is typically accomplished using the binary comparison operators like -gt, -eq, and so on. Option B is incorrect because the > operator is used in square brackets. There is no -gta operator or gt operator, making both option C and option D incorrect.

C.  SSH is typically used for communication between nodes in an agentless orchestration. Less common would be a protocol such as HTTPS. The other protocols shown as options would not be used for agentless orchestration.

C.  Variable or parameter expansion is accomplished using ${ } wrapped around the parameter name.

C.  Normal Terraform syntax files use a .tf extension, while those that use JSON should have a .tf.json extension.

D.  The kubectl get pod command displays status of a given pod within a cluster. The other answers shown are not valid.

B.  Pods can contain multiple containers in Kubernetes and this facilitates a shared resource use case, where containers can share resources within a pod. When two containers work together within a pod, it is sometimes referred to as a sidecar configuration or a sidecar container.

B.  A dual-homed networking configuration is one that has two network interfaces. Bridged networking refers to using the host adapter in a virtualization scenario. An overlay network is one that is built on top of another network. Forwarding is not related to this solution.

D.  A persistent volume, sometimes called persistent storage, keeps data between deployments of the virtualized environment. A container image is used for the original boot.

A.  Network Address Translation (NAT) effectively hides the virtual machine behind the host IP address. Bridging enables the virtual machine to get its own IP and thus have external clients access it as well.

B.  The YAML format is used for configuration files that will be used with cloud-init. XML and the other formats listed are not used for cloud-init.

C.  A relative path begins with something other than a / whereas an absolute path always begins with a /, indicating the root of the filesystem. The other options, virtual and symbolic, are not valid names used to describe paths.

A.  The first number, 14, is the line count. The second number is word count and the third number is byte count.

A.  The json-file logging driver is the default logging mechanism for Docker. The other options shown are not valid for Docker logging.

D.  The rmi command removes an image from a host but notably does not remove the image from the registry. The other commands shown are not valid for use with docker.

B.  An overlay network describes virtual networking typically created for and used within the context of virtualization or containerized applications. With Kubernetes, an overlay network facilitates communication within a pod.

A.  Linkerd, Consul Connect, and Istio are examples of service mesh frameworks or management systems for Kubernetes. A service mesh is used to provide abstraction and management of microservices and networking.

C.  The tee command will send output to both STDOUT and the specified file, thus making option C correct. Option A will redirect output to the correct file but not to STDOUT simultaneously. The other answers will not work for this question.

B.  The cut command uses Tab as its default delimiter. This can be changed with the -d option.

D.  The -n option changes the number of lines of output for both head and tail to the number specified. The other options listed in this question are not valid for head, and the -f option follows a file with tail as the file grows.

D.  Within a regular expression, * represents 0 or more characters, and in this case the problem doesn't care whether a person is using /bin/bash or /usr/bin/zsh. Likewise, . matches a single character. But in the case of Bash and zsh, you need to look at the first and optionally a second character: thus the ?, which makes the second . optional. Finally, $ anchors the pattern at the end of the string and is key for this regular expression.

B.  The find command beginning with the path and then the -name argument will locate all files called .bash_history. The output from the find command should be piped to xargs, which can then build further commands from standard input. Note that this question and solution assume that all users use the Bash shell and are keeping history.

D.  The tr command can be used for the purpose described. The tr command is quite powerful for text conversion and search and replace scenarios. The other commands shown do not exist.

A.  The g option, also known as global or greedy, will apply the matched operation to the entire line rather than just the first instance of the match. The other options apply as they would for a Perl-Compatible Regular Expression.

D.  The exit status of the most recently executed pipeline is found with the $? environment variable. The other environment variables shown do not exist by default.

D.  A git pull request is created with the request-pull subcommand. Of the other options shown, there is a pull subcommand but that is used to fetch and merge code. The other options shown do not exist.

C.  The <<< character combination reads input from STDIN, or Standard Input, and uses it as the body of the message for the mail command.

D.  The -type option causes find to limit its search to directories only, while the -name option limits the names of returned elements. Note the use of the wildcard due to the phrasing of the question. Also note the use of ./ to denote beginning the search in the current directory.

B.  When performing a rebase with Git, the latest common point between the two branches is used and then changes from one branch are reapplied, thus making option B the most accurate. Rebasing does not use soft links, making option D incorrect. Option A is incorrect because the application of changes may or may not come from the origin master branch and may not come from the first commit.

A.  YAML is used for SaltStack configuration files. Other configuration management software also uses YAML, while others, like Chef, use JSON. None of the configuration management tools use DOC as a type of file for configuration.

D.  The -l option to git tag searches the repository for the specified tag. The other options shown as potential answers are not valid for this purpose.

C.  Host networking typically means that communication will flow through the host network stack in virtualization or containerized applications. You may sometimes see host networking mean that containers can only communicate with the host itself. While option B was similar to that, the option referred to communication exclusively through inter-process communication, thus making it incorrect.

D.  Performing a docker pull will download and prepare an image for use. From the other options, build is a valid docker command but is used to create an image from a Dockerfile and other related context files. The other options shown are not valid with Docker.

A.  The more command provides simple paging capabilities. Unlike the less command, which needs to be installed on many systems, more is usually available even on base installs. The grep command is not a pager, and the other commands are not valid.

B.  The container ls command to docker displays the current list of containers. None of the other commands are valid.

B.  OVF files, which are used for certain virtualization scenarios, are formatted in XML. There is a file extension frequently seen as YML that typically contains YAML-formatted data, but that is not related to this question. HTML is a valid document standard but not for OVF files. There is no OVFMeta document standard.

A.  The grep command will be used for this purpose. Note the difference between grep -r and grep -ri. The question did not ask for case insensitivity, and therefore the use of -i in option B makes it incorrect.

A.  The run command creates a container and starts a Docker image. When you're working with containers, the start command is used to start a container and the stop command subsequently stops the container from running.

C.  The push command sends an image to be shared at the configured location. None of the other commands shown are valid for use with Docker.

B.  The EXPOSE configuration option indicates ports and protocols to be opened. These options can also be given on the command line at runtime by using the -p option. The ports to be exposed can also be found when running the inspect command and are listed as ExposedPorts within the output.

D.  The docker attach command can be used to connect to a running container. None of the other commands shown are valid for this purpose.

A.  The cat command will display the contents of the file /etc/passwd and then pipe that output to the awk command. The awk command then parses its input, splitting along the specified separator for /etc/passwd, which is a colon (:). The output is then printed and piped to the sort command. The sort command in option B will not work because the cut command requires an argument. Likewise, the echo command in option C will only echo /etc/passwd to STDOUT.

C.  The -l option provides the number of lines given as input. For example, wc -l /etc/passwd would print the number of lines in the /etc/passwd file. The other options given in this question are not valid for the wc command.

C.  Both head and tail print 10 lines of output by default.

B.  YAML is the format used for creating an application with compose. The other formats are valid but not for the purpose described.

B.  JSON-formatted files are JavaScript Object Notation. These files, along with YAML files, are frequently used to provide templates and configuration information because both formats are lightweight and descriptive. When working with a VM template or automation, you may encounter these formats.

B.  An Ambassador container is a container that acts as a proxy to connect to and provide a single point of connection through which other containers in the pod communicate. Among the other answers, sideload refers to a means to install an application onto a device outside of the normal app store process.

Chapter 4:  Troubleshooting (Domain 4.0)

A.  The -l option displays listening ports and the -t option limits the ports to TCP only, thus making -lt correct. The -m option shows socket memory usage and -f is used to define the family to return. There is no -c option, thus making option B incorrect.

B.  The lsusb command is used to obtain a basic list of USB devices on a system. The other commands are not valid. In the case of option D, the ls command is valid, but there is no --usb option.

C.  The keyword single given on the Linux kernel command line will boot the system into single user mode. The other options are not valid.

B.  Checking to ensure that the disk is detected in the BIOS is a good first step in troubleshooting. Option A, unplugging the disk, won't help it to be detected. Restarting the web server won't help detect the disk, and the disk-detect command does not exist.

A.  The tune2fs command is used for this purpose, and the -c option sets the mount count for the specified partition. The dumpe2fs command is used to print the superblock and block group information.

C.  The -R option skips the root filesystem when the -A option is used. The -M option does not check mounted filesystems. There is no -S option.

D.  Of the options presented, running dmesg is a common way to find out the location to which the kernel has assigned the drive. Rebooting the system is not a good option, although it would work. There is no such thing as /var/log/usb.log, and the location of the drive may change regardless of port, depending on how the drive may be detected in the system.

A.  SCSI supports 7 to 15 devices per bus, depending on the type of SCSI.

C.  Unit configuration files are stored in /lib/systemd/system. The other directory options for this question are not relevant or do not exist by default.

B.  The network-online.target is used to signify that the network is online and operational for services that depend on the network. Of the other options, network.target is a legitimate target but is typically used to help with an orderly shutdown to ensure that services are stopped prior to the network. The other options shown are not valid.

D.  Creating a symbolic link to /dev/null effectively disables the unit file so that the service cannot be started. The other options shown are not valid files.

B.  The ExecStop configuration option specifies the command that should be executed to stop the service. The other options shown are not valid for this purpose.

D.  Using Wants= creates a weak dependency between two services, while using Requires= creates a stronger dependency. The other options shown are not valid unit dependency directives.

A.  Using the -s option displays statistics including a count of collisions that have occurred for the interface. Of the other options, -c changes output colors, -o prints all information on one line, and -f changes the family.

B.  Swap space is used when there is insufficient RAM memory on a system.

C.  Steal is the metric used to measure the number of cycles being used by other virtual instances in either a cloud or virtualization scenario. The steal metric is abbreviated as st in the output of top. The other options are not valid for this scenario.

C.  The lscpu command shows statistics about the CPU that include architecture, cache, speed, and other information. Among the other options, cpuinfo is not a command but rather the file /proc/cpuinfo contains the same information as lscpu. The other options are not valid commands.

D.  The ls -Z command shows information regarding the SELinux security context applied to a file and can help determine if the issue is policy/non-policy related. There is no -P option and the other commands shown are not valid.

A.  The strace command is vital to debugging system-call-related application crashes, especially when the daemon or service does not log any error but silently crashes. The other commands are not valid.

C.  The Storage= option controls whether journal logs are written to disk, kept in memory, or not kept at all. The other options shown are not valid for journald.conf.

D.  A space is used to separate services within a systemd unit file on the Before= and After= configuration lines. The other delimiters shown as options are not valid for this purpose.

D.  The -s option summarizes the output by directory, while the -h option presents the output in a more human-friendly manner.

A.  The -f option forces the specified operation to complete and can sometimes be necessary if there is no other option to fix the issue. However, data loss can occur with this option so care must be taken when using it. The other options shown are not valid.

B.  NVMe-capable drives are named as /dev/nvme*. No special drivers are needed other than those found in the native kernel on a modern system. The other answers do not exist as paths by default.

C.  The format for the mount command is [partition] [target], thereby making option C correct. The other options are not valid because the arguments are in the wrong order.

A.  Each processor core can run a job, meaning that there are four available run queues on the system described in this scenario. Four of the six processes are therefore running while two are waiting in the run queue. Presence of high run queues can mean that additional processors are needed or that applications should be changed to utilize existing resources more efficiently.

C.  The lvmdiskscan command looks for physical volumes that have been initialized for use with LVM.

A.  The OnBootSec option defines the time to wait, in seconds, until launching the command specified within the unit file. It is notable that OnBootSec is an alias for OnStartupSec. The other options shown are not valid.

B.  The env command will print the current environment variables from Bash. The printenv command will also perform the same operation. The other commands listed in this question do not exist.

A.  The nice command displays the scheduling priority and can also be used to set the scheduling priority for a command to be executed. The other options shown are not valid.

D.  The free command displays overall memory usage for both RAM and swap and can be used to determine when additional memory might be needed.

A.  The uptime command shows basic information such as that described along with the number of users logged into the system and the current time. The bash command is a shell environment, and the ls command will not display the required information.

D.  The screen command starts a new terminal that can be disconnected and reconnected as needed. Processes running from within the screen session do not know that they are running in a screen session and therefore meet the criteria needed to satisfy this question. The fg and bg commands will not meet the criteria, and the kill command will stop a process.

D.  The ForceUnmount= option is equivalent to passing the -f option to umount and forces the filesystem to be unmounted. The Options= directive is valid but not for this purpose. The other options shown are not valid.

C.  The jobs built-in command shows the list of jobs running in the background. Its output includes both a job number and the status of the job.

C.  The killall command is used to terminate processes using their name.

D.  The id output represents CPU idle time and therefore is telling for this scenario insofar as further investigation will be needed to determine the cause of reported slowdowns on the system. The id output is not associated with a process or user ID, and user processes are represented by us in the output of top.

C.  The -y option will attempt to repair automatically, essentially answering y or yes instead of prompting. Of the other options, only -V is valid and will produce verbose output.

B.  The tune2fs command can be used for this purpose but should be used with care because it can result in data corruption.

B.  The mkswap command formats a swap partition. The fdisk command is used to create the partition but not format it. The other two options do not exist.

A.  The du command will report on disk usage in a recursive manner, unlike the other commands shown here.

C.  The usrquota option will enable user-level quotas on the given mount point. This is typically set within /etc/fstab.

D.  The -c option creates the files for the first time. The -f option is used for force checking, -u is used for user quotas, and -m is used to not attempt remounting read-only.

D.  The -r test determines whether a given file exists and can be read by the current user. The -e test only checks to see if the file exists, while -s determines if the file exists and has a size greater than zero. There is no -a file test.

C.  The default type is simple if no other Type= or BusName= specification is found within the unit file. Of the other options, both exec and oneshot are valid but not for the scenario described.

C.  The sudo command can be used to execute a process as root. The other commands shown are not valid.

D.  Setting a user's shell to /bin/false will prevent them from logging in interactively to the system, such as with SSH. The other options shown for this question are all valid shells and would allow an interactive login.

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.

A.  The command timedatectl status shows the current time zone along with other information about time and date on the device. The other commands shown are not valid for this purpose.

D.  Private IP addresses are found within the 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 ranges, thus making an address in the 143 range a public IP.

C.  The route command is used for this purpose, and adding a route is done with the add option. The default gateway is added using the default gw keywords followed by the IP of the gateway and the adapter.

A.  The host command enables changing of the query type with the -t option. Using ns as the type will query for the nameservers for a given domain. There is no all type, and the other options are also invalid.

B.  The -I option enables the choice of interface. A lowercase -i option sets the interval, while -a indicates an audible ping. Finally, -t enables a TTL-based ping only.

A.  The host or dig command can be used for this purpose by setting the type to mx. The mx type will query for the mail exchanger for the given domain. There is no smtp type.

D.  The openssl s_client -connect www.example.com:443 command accomplishes the task described. The other commands shown are not valid.

A.  The ip command with the monitor option/subcommand will display netlink messages as they arrive. There is no netlink subcommand for ip, and the route command will not work for this purpose.

A.  The @ symbol is used to indicate a server to which the query will be sent directly. This can be quite useful for troubleshooting resolution problems by sending the query directly to an authoritative name server for the domain. Of the other options, -t sets the type, and the remaining options are not valid.

A.  The getent command is used for working with NSS databases, and getent hosts will display the available hosts using the databases configured in /etc/nsswitch.conf.

C.  The configuration option is called nameserver, and the value for the option is the IP address of the desired nameserver. There are several options that affect how name resolution is performed, such as the number of attempts and timeout. See resolv.conf(5) for more information.

A.  The route command can be used for this purpose; the syntax includes the network range, denoted with the -net option, followed by the word netmask and the masked bits, followed by the word gw and the IP of the gateway. The other options shown are invalid for a variety of reasons, including missing keywords and options and order.

A.  The netstat command is used for this purpose, and the -a option displays all sockets, listening and non-listening. Note that it's frequently helpful to add the -n option, or combine them as in netstat –an, in order to prevent name lookup. Doing so can significantly improve performance of the command.

A.  The correct format is IP address followed by canonical hostname and any aliases for the host. You can use entries in /etc/hosts to override DNS lookups, which can be useful to prevent those names from resolving or to provide a different resolution.

A.  The time command includes timing information such as sys time, user time, and real time. The other commands are not valid.

B.  The ip route command can be used for this purpose, and its syntax uses a change command and the via keyword. The same operation could be completed with the route command but would require deleting the existing gateway first and then re-adding a new default gateway.

C.  Bad blocks are shown with the -b option. The -f option forces dumpe2fs to perform the requested operation, and the other command options do not exist.

C.  The -f option specifies that xfs_check should check the contents of the named file for consistency. The -v option sets verbosity, and there are no -d and -a options.

D.  The What= option specifies the filesystem to be mounted. The Where= option defines the destination to which the filesystem will be mounted. The other options shown are not valid.

A.  The search option is used for this purpose and can be provided with multiple domain names, each separated by a space or tab. The domain option is valid within /etc/resolv.conf but does not allow for multiple domain names.

A.  The route command can be used for this purpose, and in the scenario described, a reject destination is used for the route. The other options shown are invalid because they use invalid options to the route command.

B.  The tracepath command provides the Maximum Transmission Unit (MTU) of the hops, where possible. Both traceroute and tracepath can be used internally or externally, and both provide IPv6 capabilities. Certain options with the traceroute command can require root privileges, but not enough information was given in the question for that to have been the correct answer.

D.  The -c option provides the count of the number of pings to send. The -n option specifies numeric output only, while -p specifies the pattern to use for the packet content. Finally, the -t option sets the TTL.

C.  The -f follows the log much like tail -f. There is no --tail option for journalctl. Of the other options, --du dumps the catalog, and -m merges all available journals.

A.  The ip route flush cache command should be executed after changing the routes. The other commands shown for this question are not valid.

A.  SPF records are stored in the txt record type in DNS, thereby making -t txt the correct option for this. Of the other answers, only -t mx is valid and returns the mail exchangers for the given domain.

C.  The only viable possibility of those listed is that ICMP traffic is blocked. TCP traffic is obviously passing because of the ability to get there using HTTP, and DNS must also be working.

C.  The G signifies a gateway within the route table.

A.  The axfr type is a zone transfer, and the @ symbol signifies the server to which the query will be sent. There is no xfer type. Option B is just a normal query for the domain sent to the specified server.

B.  The SystemMaxUse= option controls the amount of space that the journal can use. The other options shown are not valid.

A.  A Type=dbus for a service file has implicit dependencies of Requires= and After= on dbus.socket. The other options are not valid.

A.  The nmap command is used to scan for open ports. It will scan for open TCP ports to the address or addresses specified. The other commands shown do not scan for open ports to external (off-host) IP addresses.

B.  The Type= option is used to specify the type of filesystem that will be mounted. It is similar to the types used with the mount command itself. The other options shown are not valid.

D.  The .timer file extension is used with systemd timer files that provide an alternative to cron. The other options are not valid.

A.  Setting -P0 will cause no ping requests to precede the scan and is useful for the scenario described. There is a -s option, but it is not used for this purpose. The other options are not valid.

C.  The maxlogins parameter is used to control the number of simultaneous logins for a given account.

A.  The -s option sets the type of scan and, when followed by an uppercase S, sets the option to SYN. The T option is a Connect() scan. There is no Y option or -type option for nmap.

B.  The -J option enables specification of various settings for the journal such as its location. The other options shown are not valid.

D.  The -p option to iostat displays information on devices and partitions. The -c option shows CPU utilization, and -d shows device utilization and can be used to display Input/Output Per Second (IOPS) information. There is no -a option.

D.  The vmstat command is used to display extended information about performance, including blocks in and out. The iptraf command is used to provide network-level monitoring, and the other two commands listed are not valid.

B.  The w command shows various useful information that includes load average, logged-in users, and other uptime information. The uptime command does not show who is currently logged in. There is no swap or sysinfo command.

C.  The lsmem command shows statistics about the memory in the system, including block size. Among the other options, free shows in-use memory information but not block size. The other options are not valid commands.

C.  Cacti is a graphing tool that uses scripts for gathering performance data as well as SNMP. The graphs can help to visualize performance of networks and systems alike. The pstree command is used to show a tree-like structure of processes.

B.  The -e option causes swapon to skip those partitions that do not exist. The other options are not valid for this scenario.

C.  The sy abbreviation in the output of top represents the percentage of CPU time used by the system. Of the other options, us represents user CPU time. Options A and D are not valid for this scenario.

A.  The swapoff command deactivates swap space, thereby making it unavailable as virtual memory on the system. The other commands shown as options are not valid.

C.  The --show option displays information about the swap spaces on the computer, including how much swap is currently being used. The -a option activates all swap spaces. There is no --list option, and -h displays help.

C.  The pvdisplay command shows information about a given physical volume. You can use pvdisplay to view the device on which the PV is built along with the extent size of the PV. The other commands shown are not valid.

A.  The vgscan command looks for both physical volumes and volume groups related to an LVM configuration. The vgscan command is run at system startup but can also be run manually. The other commands are not valid.

C.  The pvscan command displays a list of physical volumes on a given server. The PVs displayed are those that have been initialized with pvcreate for use with LVM.

C.  The ip command defaults to the inet family if not otherwise specified with the -f option. The command will attempt to guess the correct family and fall back to inet. The other families listed as options for this command are not valid for use with the ip command.

D.  The -n option causes route to use numeric values only, performing no name resolution. This option is useful for the scenario described. The -e option causes the output to be in netstat format. There is no -d or -f option for the route command.

A.  Because you're working with MAC addresses, the arp command will be used. The -d option removes or deletes an ARP entry, which would be appropriate here so that the MAC address resolution occurs again. The netstat command will not be used for this purpose. The hostname and dig commands work with name resolution but not for MAC addresses or the ARP table.

B.  The -o option removes newlines from the output, thereby making the output more suitable for the grep command. The -l option specifies the number of loops for the ip addr flush command. The -f option specifies the protocol family. There is no -n option.

A.  The -s option creates an ARP table entry. The -d option removes an entry. The -c and --add options do not exist.

C.  The -D option lists the interfaces on a given computer. The -d option dumps compiled matching code, and -i selects an interface. There is no -a option.

B.  The -R option requires that an attempt at name resolution be performed. The -n option does the opposite: it disables name resolution. There is no -b or -a option.

B.  The mtr command provides a unique way to view real-time information about each hop in a route between hosts. Both the traceroute and route commands are valid, but the options shown for each are not. There is no liveroute command.

A.  The --delay option sets the interval between checks of array health. The argument value is in seconds. The other options shown are not valid.

C.  The !H sequence indicates host unreachable. Network unreachable is !N.

A.  The -m option specifies how the packet should be marked or tagged. The -a option is an audible ping, and -p enables specification of custom padding. There is no -k option.

B.  The -r option displays a report that includes CPU time and exit status about the just-completed fsck operation. The -f option forces whatever operation is being requested, -s serializes fsck operations, and -l creates an exclusive flock.

D.  The file /proc/meminfo provides a wealth of information about memory usage and utilization. Much of this information is displayed by various commands, but the canonical source for those commands is usually found in this file. Of the other options, only /proc/cpuinfo is valid, and that file provides information on the CPU(s) for the computer.

D.  An Xmas scan is available using the -sX mode of nmap. The -sT mode is a TCP connect, and -sS is TCP SYN. There is no -sP option.

A.  The -s option sets the snapshot length, or snaplen, of the capture instead of its default of 65,535 bytes. The -l option provides line buffering, -c stops after the indicated count of packets are received, and -d dumps compiled packet-matching code into a format that is readable.

D.  There is no port for ICMP. The protocol does not use ports.

B.  The -B option changes the format, and T sets the scale to terabytes. The other options do not exist.

C.  The -c option checks for bad blocks. The -b option sets the block size. There is no -a or -d option.

C.  The -U option shows latency. Of the other options, -d is used for debugging, -L suppresses multicast loopback packets, and -i sets the interval between packets.

B.  The iperf command can be used to measure throughput and can be used for troubleshooting latency issues. The other options are not valid commands.

C.  The itop command displays information about interrupt usage in real time, with a display that is somewhat like the top command. The other options shown for this question are not valid commands.

B.  The ibstat command shows information about InfiniBand devices. The other commands are not valid.

A.  The renice command is used to change priorities. The lower the number, the higher the priority. The correct syntax is shown in option A. Option B will set the priority lower. Options C and D are invalid syntax.

D.  The -n option is used with netstat to prevent hostname lookups, which can slow the output. The other options do not perform the required task.

B.  The pidof command shows all of the processes associated with the given argument. In this case, option B shows the correct syntax. The ps command shown in other options is a valid command but not with the syntax shown.

A.  The number 1, or SIGHUP, is the signal that sends a hangup to the process. The other options shown are valid signals but not for the purpose described.

A.  The command ls -l /etc/systemd/system/default.target shows the current target to which the system will boot. The other commands are not valid.

C.  The -i option sets the byte-to-inode ratio. The -b option sets the block size, -r sets the filesystem revision, and there is no -u option for mke2fs.

C.  The /sys/class/fc_host directory contains information on HBA adapter ports on the system. The other options are not valid directories.

B.  The account module interface is where access verification occurs. Among the other options, the auth and password interfaces are used for different purposes, and there is no policy interface.

A.  The default policy should be deny. A deny-by-default policy discards packets. It's notable that a reject policy might also be used, which would send a reject back to the sender. The other options are not appropriate for the task described.

C.  The -l option displays ownership information, including user and group owners of a file or directory. The -o option only shows the user but does not display the group. The other options shown are not valid for this purpose.

B.  The program should be created to use local sockets for communication. Socket-based programs do not need to incorporate network or protocol information, thus making them preferred over a network-based program for the purpose described. If the program needed network connectivity, then option A would be appropriate. The other options are not appropriate for this scenario.

C.  The buffers column shows the amount of RAM allocated to kernel buffers. Cache indicates page cache usage, and shared usually indicates tmpfs usage.

C.  The nmcli command provides a command-line interface into Network Manager. The other options shown are not valid commands.

A.  The iftop command is used to display real-time network usage through an interface that is reminiscent of the top command. The other options given are not valid commands.

C.  The iptraf command shows cumulative network usage in real time for a given interface. The other options shown are not valid.

C.  The cfq scheduler is the default for Linux systems. Of the other options shown, deadline and noop are valid but are not the default. There is no iqueue IO scheduler.

D.  The ipset command can be used for the purpose described. It's worth noting that you could create a separate iptables rule for each IP address and rule, but doing so would be less efficient than using an ipset group and having a single rule applied to that group.

A.  The tcptraceroute command should be used for this purpose. This command attempts to connect to the destination on the TCP port specified. This method is preferred over a simple ping because ICMP may be filtered, thus giving an inaccurate diagnosis. The other commands would not be used for this purpose.

C.  The tshark command enables capture of network traffic into a file. The other commands shown are not valid.

C.  The whois command is used for lookups of domains and IP addresses, among other things, and would be used for this purpose. The other commands are not valid for this purpose.

D.  The ioping command sends requests to a given disk and records the time taken for the request. Of the other commands, fdisk is valid but would not be used to determine performance-related issues. The other commands are not valid.

C.  The partprobe command causes a partition update for the kernel. The other options are not valid commands.

A.  The sar command can be used to display a wide variety of performance-related information, including that captured over time. The other commands are not valid.

A.  The -a option shows all available parameters. The other options shown are not valid with sysctl.

C.  A state of D means uninterruptible sleep. There is no state for debug or dead processes, and interruptible sleep has a state of S.

B.  The multiuser target is below (before) the graphical target and therefore could be used for further troubleshooting. The rescue target, not listed as an option, could also be used. The poweroff and reboot targets are valid systemd targets but will not help with troubleshooting. There is no SafeMode target.

C.  The default port is 631. The other ports listed for options are not used for CUPS.

A.  The .mount extension is required for systemd mount files. Systemd frequently requires specific filenaming conventions in order to work correctly, and knowing the filenames, extensions, and special locations will be helpful for the exam.

D.  The ausearch command can be used to find recent violations of an SELinux policy. The other commands are not valid.

C.  The dmesg command shows the kernel ring buffer and is a primary tool to determine whether the system has detected a new piece of hardware. The other options are not valid.

A.  The signal number or symbolic name can be used and is prefaced with a single dash (-) as shown in option A. The other options are not valid for the purpose required in the question.

A.  Execute permissions for directories must be present, so the top-level directory must not allow the “other” permission to execute, which is needed for a directory listing within a subdirectory.

B.  The default size for ioping is 4 KB.

A.  The IO scheduler in use is found in /sys/block/<device>/queue/scheduler. The other options are not valid locations for this scenario.

D.  The -n option prevents hostname lookups from occurring with iftop. This is helpful for reducing the amount of noise or unnecessary information displayed within the iftop output. The other options do not accomplish the task required.

B.  The server command, when run within the nslookup interface, will set the server to which the query will be sent. The other options shown are not valid for this purpose.

D.  A user would need write and execute permissions in order to write into a directory for which they are not the owner and do not have group ownership.

C.  LDAP can be used for external authentication scenarios with Linux and is frequently used to provide authentication in an integrated environment with Microsoft Windows and Active Directory. Of the other options, neither SSL nor SSH provides the external authentication, although SSH may be able to integrate with other authentication means. AD is frequently used as an abbreviation for Active Directory. While Active Directory has LDAP capabilities, it is different and separate from LDAP.

B.  The ulimit command shows the various limits that apply to a given user, including file size limitations. The other options are not valid.

A.  The permissions should be 755 in order for a user to execute the script. The other options won't work for the purpose described or are too permissive.

A.  The OnCalendar= configuration option is used to set the time when an event will run when using systemd timer unit files. The other options shown are not valid for use with systemd timer files.

C.  The wa abbreviation in the output of top represents the percentage of time spent waiting for I/O operations such as disk or network. The other options are not valid for this scenario.

B.  The groups command is used to retrieve a list of groups. The other commands are not valid.

A.  The swapon command activates the swap space for use. The other commands are not valid.

D.  The size of the request can be set using the -s option for ioping. The other options shown are not valid with ioping.

C.  The -b option prints known bad blocks. The -f option is used to force the display of information, and the other options don't exist.

C.  The dmidecode command shows extended information about hardware and devices within a Linux system. The other options shown are not valid commands.

B.  The fail option to mdadm indicates that the disk has failed. The other options shown are not valid.

C.  The -H option suppresses the legal disclaimer when possible. The other options do not complete the task described in this scenario.

B.  The -i option sets the interface for iftop. The other options shown are not valid for the required task.

B.  The file /sys/class/scsi_host/hostN/scan is used for this purpose, where N is the adapter number. The other paths are not valid for the purpose described in this scenario.

B.  The /etc/shadow file stores encrypted passwords. The /etc/passwd file does not store encrypted passwords, and the other options are not valid.

B.  The User= option sets the process to run as the given user. The other options are not valid.

A.  The size and rss columns within ps output are helpful for determining memory usage for a given process. The other options are not valid for process-level troubleshooting.

C.  SIGKILL corresponds with signal number 9. The other numbers shown are valid signal numbers but are not SIGKILL.

D.  The IN class, or Internet class, is the default type of class queried with the host command. This can be changed by using the -c option for the host command.

A.  The routing table is displayed with the -r option. The other options do not display the routing table.

C.  The -s option displays summary output for the arguments given. The other options shown do not accomplish the required task.

B.  The ps command lists processes, and using grep for the state of Z will show zombie processes. Of the other options, there is a -Z option for ps but it is not used for the purpose described.

A.  The lshw command shows all hardware within a system, giving detailed information about many aspects of that hardware. The other commands shown are not valid.

B.  The -c option sets the number of requests to send with ioping. The other options given are not valid for use with ioping.

B.  The R state indicates a process is running. The other options do not indicate a running state.

B.  The vgscan command can be used to resolve mismatch issues between volume groups with LVM. The other commands shown are not valid.

A.  The ps_max_latency_us setting, typically set as part of the GRUB configuration within nvme_core, can be used to disable power save functions on an NVMe drive. The other options shown are not valid configuration options.

C.  The OnCalendar=weekly expression will cause the event to run weekly. The other options shown are not valid for this scenario. It is notable that Option A contains OnCalendar, and asterisks or wildcards are valid when configuring event timing with systemd timers. However, that option is not correct because the syntax of the wildcard is wrong.

C.  The persistent option is the default when auto is configured and /var/log/journal exists. Of the other options, none is valid and will not log but will forward to other targets and volatile will use memory. There is no journal setting for the Storage= option in journald.conf.

A.  The oom_score file, found in /proc/<pid>/, contains the number at which the process will be considered within the out-of-memory killer process. A higher number means that there is an increased chance of the process being killed.

C.  The nofail option is used to indicate that the boot process should continue even if the mount point is not available. The other options are not valid.

A.  The @ character prefixed to the command indicates that the first argument after the command will be sent as argv[0]. The other options are not valid.

C.  The -l option enables login as a different user. The other options are not valid.

A.  The -J option produces output in JSON format. Of the other options, -s is used to change the sysroot directory. The other options are not valid.

D.  The -showcerts option displays the certificate chain for the connection. The other options are not valid.

A.  The /etc/passwd file contains user information, including their home directory. The other options are not valid.

A.  The ExecReload= option is used to configure the command that will be executed when the service is reloaded. The other options are not valid.

D.  The minutely expression is used to signify a job that should run once per minute. The other options are not valid.

A.  The -I option sets the number of days after password expiration until the account is locked. The other options are not valid.

C.  The PASS_MAX_DAYS option sets the number of days that a password is valid until it needs to be changed. The other options are not valid.

C.  The -x option shows additional statistics. The other options are not valid.

B.  The -l option shows several properties of the filesystem, including the inode size. The -f option causes tune2fs to force completion of the specified operation. The other options are not valid.

A.  The systemctl daemon-reload command executes the generators that re-create links and other systemd-related items. Even after running daemon-reload, you still typically need to restart the service too. The other options are not valid.

B.  The Unit= directive specifies the command that will be run when the timer is used. The other options are not valid.

A.  The process needs to return from execve(), meaning that the actual daemon has started successfully. This is a primary difference from the Type=simple configuration where only the fork() needs to happen (option B). The other options are not valid.

C.  Out-of-memory configuration is controlled by OOMPolicy within a service file or can be set to a default value in a systemd configuration file. The other options are not valid.

B.  The -u option to renice completes the task successfully. The other options are not valid.

A.  The -n option will not resolve UIDs and GIDs to their names and can be used to speed up the report. The other options are not valid.

A.  The chcon command is used to change the SELinux type of a file and can be helpful when troubleshooting file access issues. The other options are not valid.

C.  Using -a -G appends the group onto the user's list of groups. The other options are not valid to accomplish the necessary task.

B.  The noop scheduling algorithm is recommended for virtual machines on a hypervisor host that performs the I/O scheduling. Of the other options shown, cfq is the default scheduling algorithm. The other two options are not valid.

B.  The oldest entries are shown first when running journalctl, thus making the other options incorrect.

C.  Using the NOPASSWD option causes sudo to not prompt for the password. The other options shown are not valid with sudo.

A.  Using Before= and After= ensures ordering of services, thus making option A correct. The other options are not valid for ordering of systemd unit files.

D.  Using ConditionMemory= defines the amount of memory that needs to be available. Mathematical operators such as greater-than, equal, less-than, and others are available. The other options are not valid for specifying the amount of memory within a systemd unit file.

A.  Administrator-created unit files are stored in /etc/systemd/system. The other locations specified are not valid.

D.  Using halt.target stops the system but does not power it down. Of the other options, poweroff.target exists and stops the system and also powers it down. The other options are not valid targets.

C.  Using man 8 mount ensures that the 8th level man page is viewed. The other options are not valid for this purpose.

A.  Looking for the state field within the output of the ip link command shows whether an interface is considered up or down. The other commands shown are not valid.

C.  The LOG target is used to log packets within iptables. The other targets presented as options are not valid in iptables.

B.  Using systemd.debug-shell=1 on the kernel command line results in a debug shell being made available early in the boot process. The other options are not valid for this purpose.

C.  Using -f forces the reboot, although the shutdown process is still noted as clean. The other options shown are not valid for this purpose.

B.  Using list-jobs shows the state of jobs in progress. The other options shown are not valid for this purpose.

A.  The systemctl show command is used for this purpose. The output can be further refined through the use of the -p option. The other options shown are not valid for this purpose.

D.  The systemd-resolved service is responsible for name resolution on systemd-enabled systems. Troubleshooting for systemd-resolved name resolution follows the same pattern as that of troubleshooting other systemd services. The other options shown are not valid.

A.  Using +trace causes dig to follow recursively through the lookup process. The other options shown are not valid for this purpose.

B.  Using the -u option shows entries related to the unit file specified. The -k option displays kernel messages. The -p option is used to specify priority and the -S option displays messages since the specified time.

C.  The systemctl list-timers command shows the timers that are active on the system. The other options are not valid.

C.  A return code of 64 indicates that trim succeeded on some filesystems and failed on some filesystems, so further investigation will be required. Trim succeeded is return code 0 and all failed is return code 32. The fstrim command won't run on an unsupported filesystem, making option A incorrect.

B.  The emergency.target provides minimal boot with the service manager and facilitates starting individual unit files for further troubleshooting. The other targets shown are not valid.

B.  Removing the combination of quiet splash results in additional verbosity being displayed on the console, which is needed for many troubleshooting scenarios. The other targets shown are not valid.

D.  The address 192.168.1.200 falls outside the 192.168.1.0/25 address range, which ends at 192.168.1.127. The other options shown fall within the range.

B.  The timeout setting is used to configure the length of the pause before grub boots into the default operating system. The other answers are not valid for this purpose.

A.  The -s option displays summary numbers of connections. The -h option displays help and -w displays raw sockets. There is no -c option.

C.  SATA disks are addressed as /dev/sdX, just like a SCSI disk. /dev/hdX is a traditional ATA disk. The other options do not exist.

A.  The dns_servers.conf file configures the DNS servers that will be used. The other options shown are not valid files.

C.  Setting LogLevel=Debug configures the maximum logging level for daemon processes started by systemd. The other options shown are not valid for this purpose.

A.  The cancel option stops jobs in progress using their job ID as an argument. If no argument is given, then all jobs will be canceled. The other options shown are not valid for this purpose.

A.  The ip link set <device> up command attempts to bring an interface online. The other commands shown are not valid.

D.  A - prefixed to a filename causes failure status codes to be effectively ignored and instead just recorded or logged. The other characters have no effect and would likely cause errors themselves.

A.  The [Service] section is required within a systemd service unit file. The other options shown are not valid for use in a systemd service unit file.

B.  The insults option, disabled by default, has been enabled in sudoers, thus causing the message when a user types their password in wrong. The other options shown are not valid within sudoers.

B.  Using the -r option causes entries to be displayed in reverse order. The -a option displays all entries and the -t option is used to specify the syslog identifier to display. The -g option searches (greps) for the specified message.

A.  The -I option changes the inode size. The -i option changes the interval between checks. The -s and -v options are not used.

D.  The file /aquota.user indicates that quotas have been enabled on this filesystem. The other options are not valid to indicate that quotas have been enabled.

A.  The ExecStopPost= configuration option is recommended for these situations. The other options are not valid.

A.  Systemd requires special naming for filesystems managed through the systemd process. In addition to needing .mount file extensions, the name of the file itself needs to reflect the mount point but have dashes. Though there could be other reasons for the filesystem not mounting, making systemd happy is the first issue to address.

C.  The two behaviors aside from panic are continue and remount-ro. The other options shown are not valid error behaviors.

D.  A setting of 1us for the AccuracySec= option is the best accuracy setting with a systemd timer. The other options are less accurate than 1us.

B.  The $MAINPID variable contains the process ID of the primary process associated with the service. The other options are not valid.

A.  The x-systemd.requires option is used within /etc/fstab and parsed into systemd as Requires=. The other options are not valid.

B.  The ExecStart configuration option is used to provide the command line of the service that should be started. The other options shown are not valid.

A.  The /etc/mtab file contains currently mounted filesystems. Note that /etc/fstab contains filesystem information but not about which filesystems are currently mounted.

A.  The tune2fs command displays a lot of information about filesystems, including the number of times the filesystem has been mounted. The number of mounts is not shown in /etc/fstab and mount -a simply mounts all filesystems shown in /etc/fstab. There is no /etc/fsmnt file.

A.  Nonzero values for the DISC-GRAN and DISC-MAX columns indicate that trim support is enabled. The remaining options do not contain valid column names for lsblk output.

Chapter 5: Practice Exam

B.  Current interrupt (IRQ) assignments are contained in the file /proc/interrupts. Therefore, viewing the contents of the file with a command such as cat will work. There is no view command, thus making option A incorrect. Likewise, there is no /dev/irq file, making options C and D incorrect.

D.  Configuration files for udev are found in /etc/udev, which makes option D correct. The other options do not exist.

A.  The modprobe command loads the module and its dependencies, if applicable. The lsmod command is used to list currently loaded modules, making option B incorrect. The insmod command will load a given module but not its dependencies. Option D, rmmod, is used to remove a module from memory.

A.  The Shift key, if pressed when control has first been handed to GRUB, will cause the GRUB menu to be displayed.

D.  The dmesg command displays the contents of the kernel ring buffer. On many Linux distributions, this log is also saved to /var/log/dmesg. The other options shown for this question are not valid commands.

A.  The listing shows a symbolic linked file located in the current directory, linked to .configs/fetchmail/.fetchmailrc. The file is owned by the root user and root group and was created on July 8, 2014.

B.  The systemctl command is used to work with services and targets. The list-units command is used to list targets. The other commands are not used for this purpose or do not exist with the required option.

C.  The -nn option displays both numbers and device names, thus making option C correct. The -n option (option B) displays only numbers. The other two options do not exist.

C.  Out of the options given, the systemctl status command and option are the most appropriate. The telinit and sysctl commands are not used for this purpose. Likewise, the --ls option is not valid for systemctl.

D.  The partition containing /var should be the largest for a mail server because mail spools are stored within this hierarchy. The /etc/ hierarchy is usually small, as is /usr/bin. The /mail directory does not exist by default.

B.  The deplist option displays the dependencies for the given package. The list option displays information about a specific package, while the other two options are not valid.

A.  The -ivh options will install a file using rpm, displaying both verbose output and hash marks for progress. The other options presented do not exist or do not accomplish the specified task.

A.  The apt-cache command is used to work with the package cache, and the search option is used to search the cache for the supplied argument, in this case zsh. The apt-get command is used to work with packages themselves, while the apt-search command does not exist.

A.  The -V or --verify option will check the files in a given package against versions (or checksums) in the package database. If no files have been altered, then no output is produced. Note that output may be produced for files that are changed during installation or for other reasons. Note also the use of an uppercase V for this option as opposed to the lowercase v for verbose.

D.  The top command is used to continuously monitor things like CPU and memory usage, and the -p option monitors a single process. By using the runquotes with the pidof command, the process ID is provided as input to the -p option. It's worth noting that this only works if there's a single instance of the process.

A.  The -g option displays the progress of the dump. The other options listed do not exist.

C.  The debugfs command can be used for this purpose. When the filesystem is opened with –c, it opens in catastrophic mode, meaning that it will be read-only and will not read inodes when opening.

C.  The xwininfo command displays information about a given window within an X session. The other commands listed are not valid.

C.  The file /etc/localtime, which can be an actual file or a symbolic link, is used to indicate the local time zone. The other files listed as options do not exist.

D.  Within the /usr/share/zoneinfo hierarchy, you will find information on the various regions and time zones available. The files within this hierarchy can be symlinked to /etc/localtime.

A.  The /etc/skel directory contains files that are automatically copied to a user's home directory when that user is created. The other directories listed for this question do not exist by default.

B.  The atq command shows a list of jobs that have been scheduled with the at command. The other commands don't exist, with the exception of option D, which shows the at command but with an invalid option (--jobs).

B.  UTF-8 provides multibyte character encoding and is generally accepted as the standard for encoding moving forward. ISO-8859 is single-byte encoded. The other options are not valid.

C.  LDAP over SSL (LDAPS) operates on port 636. Port 53 is used for DNS; port 389 is used for normal, non-SSL LDAP; and port 443 is used for HTTP over SSL.

B.  The chage command can be used for this purpose, and the -E option accepts days since 1/1/1970. There is no -e option to passwd, and -l for usermod will not perform the action described. There is no chguser command.

A.  The -i option for SSH is followed by the private key to use for authentication. Doing so implies that the public key is in the authorized_keys file on the remote host. The -k option disables the sending of GSSAPI credentials, while -f is used to request backgrounding of SSH. There is no --key option.

A.  The -n option facilitates the scenario described and will exit nonzero rather than prompting. The -i option sets the login name and is not valid for this scenario. The -q and --noprompt options do not exist.

A.  Single-user mode is typically runlevel 1. In runlevel 1, no network services are started, and it is known as rescue.target in systemd. Runlevel 2 has networking but typically not services. Runlevel 5 is full multiuser with networking, and runlevel 6 is reboot.

B.  The free command shows current memory usage for both RAM and swap space, including total available, current amount used, and current amount free. The other commands shown as options do not exist.

A.  The df command displays information on disk usage and can help with planning disk utilization over time. For example, if you note that the disk utilization is increasing significantly, preparations can be made to bring more disks online or even to change the log-rotation schedule such that logs are rotated faster, thereby freeing up space.

A.  The sar command can be used for this purpose and, when provided with numbers in the format displayed, will update every X seconds for Y executions.

C.  The -m option causes the disk-related statistics to use megabytes as the scale rather than the default kilobytes.

A.  The mkinitrd command is used on older systems to create the initial RAM disk. The initial RAM disk is used to load, some might say preload, essential modules for things like disks and other vital components needed for booting.

D.  A bzImage can mean that bzip was used to compress the image but can also mean simply “Big zImage” and compressed with gzip. bzImage is typically used for kernel images that can go above the 512 K limit that normally applies to a zImage.

A.  The -r option repairs the filesystem, while the -y option causes fsck to assume Yes instead of prompting. The -v option is verbosity. There is no -m or -x option for fsck.

A.  The default.target is the default target unit that is activated by systemd on boot. The default target then starts other services based on the dependencies.

B.  The mkswap command is used to format a swap partition. The other commands are not valid.

B.  A filesystem with the word defaults for its mount options will be mounted read-write (rw), suid, with the ability to have executables (exec). The filesystem will be auto-mounted (auto), but users will not be able to mount it (nouser). Character and block special devices will be interpreted (dev), and operations on the disk will be performed in an asynchronous manner (async).

C.  The fstrim command is used to remove blocks that are not in use. The fstrim command is frequently used in a SAN configuration to give back unused storage to the SAN. The fstrim command can also be used with solid-state drives for the same purpose. The other commands shown are not valid.

A.  The --create option enables creation of a RAID array that will use md. The typical argument is the /dev/mdN device. The other options listed are not valid for mdadm.

B.  The lvcreate command is used to create a logical volume from previously created physical devices and volume groups. Using lvcreate is the final of three steps in the process for using LVM prior to actually using the logical volume.

A.  The ss command provides many of the same functions as netstat but can show some extended information, such as memory allocation for a given socket. The free command shows memory usage but not by socket, and the other two commands do not exist.

D.  The -f option is a flood ping. This will effectively cause the interface to send and receive large amounts of traffic, usually making it easier to find on a switch. The -a option is an audible ping, emitting a sound on ping. The -c option sends a certain count of pings, and there is no -e option.

C.  The bs option is used to specify block size. Various suffixes are possible, such as M, which is equivalent to megabytes, and K, which is equivalent to kilobytes.

B.  The --size-only option examines whether the files being synchronized are the same size. This can be helpful for situations where there may be significant time skew or other issues preventing the normal differencing mechanisms from working properly. The other options shown are not valid for rsync.

A.  The lowest-priority number wins for MX records, thereby making 0 the highest-priority MX record for the domain.

D.  DNS typically uses UDP port 53 except for zone transfers, in which case TCP port 53 is used due to the size of the request for most zones.

D.  The axfr type can be used with dig to request a zone transfer. The client from which you request the zone transfer will need to be authorized to initiate a transfer.

D.  The file /etc/exports contains definitions of filesystems to be shared using NFS. The other files are not valid for use with NFS.

B.  The max-lease-time directive, followed by the number of seconds, specifies the amount of time that a given host can have a lease before it is purged. The other options shown are not valid in a dhcpd.conf configuration file.

A.  Within nsswitch.conf, the passwd line contains information about authentication. The format is as shown in the correct answer. Local authentication is accomplished using the files keyword for the normal passwd file. There is typically a similar line called shadow, assuming that the server is using shadow passwords. The shadow line follows a similar format.

D.  The ssh-keygen command generates a public and private key pair that can be used for user authentication between a client and server. The other commands shown are not valid.

D.  The file authorized_keys contains keys that can be used for authentication when the corresponding private key is sent by the client. The other files are not valid.

D.  A logical location to begin troubleshooting is within the system BIOS or firmware to ensure that the drive is being detected by the computer.

B.  The export command is used for this purpose and accepts a name=value pair, as shown in the answer. The other commands are not valid, with the exception of the echo command, which will simply echo the argument to the console.

C.  The HISTFILESIZE option configures the number of commands to keep in the history file. The other variables are not valid within Bash.

C.  The awk command shown can be used for this purpose. The -F option sets the field separator, and the OFS option sets the output field separator.

B.  The git clone command will clone into a different directory if that directory is passed on the command line, as shown in option B. The other options shown are not valid git clone syntax.

A.  The export command is necessary so that any variables that are manually defined in your current session become available to child processes. The source command executes the file and can be used for the purpose described but requires an additional argument. The let and def commands are not valid.

C.  The source command is the functional equivalent of a single dot (.). The set command exists but is not used for this purpose. The other commands are not valid.

A.  The correct syntax is as shown. Note that a semicolon is required when the commands are included on one line, as shown in the correct answer.

B.  The -f option sets the days between expiration and disabled for an account. The -g option is used to set the group ID, while -e is used to set the overall expiration date.

C.  The -r option to the crontab command removes all cron entries for a given user. The -l option lists cron jobs, while the -e option edits the crontab. There is no -d option.

D.  The journalctl command is used to view and parse log file entries on systemd-based systems that maintain logs in a special format. The logger command can be used to create log entries, and the other commands shown do not exist.

C.  The lpr syslog facility sends messages from the lp subsystem to syslog. The auth facility is used for security-related messages. The other listed options are not syslog facilities.

D.  Standard LDAP traffic is TCP port 389 on the server. TCP port 25 is SMTP, 443 is HTTPS, and 143 is IMAP.

C.  When connecting to an alternate port, you can use the -p option to set the port or use a colon to separate the host from the port.

D.  The -p option preserves permissions. The -x option extracts while -z unzips with gzip. The -v option is verbose.

B.  The -i option tells patch to ignore white space. This might be necessary when the patch file doesn't match exactly what's needed. The -p option sets the level of directory for the patch, while -e informs patch to interpret as an ed script. There is no -w option for patch.

C.  LUKS encryption is the default mode for the dm-crypt command. Other modes include plain, loopaes, and tcrypt.

B.  The -r option reverses the journal, displaying the newest entries first. The -n option shows the most recent N events, -f is follow, and -b tells journalctl to show a message from a specific boot ID.

D.  The emergency target can be used in situations where rescue mode cannot recover the system. The other targets are not valid.

A.  As specified in the question, you need to remove both group and user ownership, therefore both -g and -o are needed. The other options are not valid, although you can remove individual options from an archive process with --no-g and --no-o, which would be equivalent to removing the -g and -o options from the command.

B.  The -r option bypasses the routing tables and enables sending packets directly using an interface. The -A option is adaptive ping, while -b enables sending pings to a broadcast address. The -q option is quiet output.

B.  The -b option makes a copy of the original file before patching. This can be particularly useful in a scripted scenario where several files are patched in succession. The -d option causes a change directory prior to patching, while -c tells patch to interpret the patch file as a normal diff file. The -s option causes patch to work in silent mode.

C.  Orchestration software can use an agent, which is described as part of the question, or the orchestration software could also be agentless, not requiring special software to be installed on each client machine.

B.  The \r escape sequence is a carriage return, and \n is newline. The \c sequence invokes a control character and is not related to this question.

A.  The -f file test checks to see if the file exists and is useful in a scripting scenario as described.

C.  By invoking a shell specifically for the commands in the script, you can execute the contents of the script. Option A requires the execute bit to be set. The other options won't work.

A.  The ls-files command will be used for this purpose, and -i or --ignored will be used, along with a required exclusion pattern, thus making option A correct. Option B is missing the required exclusion pattern.

A.  Redirecting input from a file uses the less-than sign. Option B takes the output from script.sh and sends it to file.txt. Option C tries to use file.txt as input but without any way to send the contents to STDOUT. Option D executes script.sh and sends the contents to file.txt, which is opposite of the scenario.

B.  The -c option sets the maximum mount count. The -C option sets the current number of mounts. The -b and -a options do not exist.

D.  The -f option, also known as fake, is helpful for situations where you need to debug the mount process or when you need to add an entry to /etc/mtab for a previously mounted filesystem. The -l option shows labels, and -v is verbose. There is no -q option.

A.  The netstat command can be used for this purpose, and the -r option displays the current routes. The addition of -n prevents DNS lookups, which can help with performance.

A.  The ps command provides information on processor and memory usage for individual processes. You can use this information to predict capacity.

C.  The wa statistic shows time spent waiting for I/O and can be used to measure or find a bottleneck related to disk. The us statistic is time spent on userspace processes, while sy is time spent on kernel processes. There is no statistic called io within vmstat.

A.  Load average with the uptime command is displayed in 1-, 5-, and 15-minute increments.

A.  The -a option displays all values and their current settings for sysctl. The -b option is binary and displays values without any newlines. The -d option is an alias for –h, which displays help. There is no -c option.

B.  The SIGTERM signal is the default signal sent with the systemctl kill command.

C.  The ldconfig command is used to work with the library cache, and the -p option prints the directories and libraries in the cache. The -C option informs ldconfig to use a different cache. The ldd command prints the library dependencies for a given command, but the options given don't exist for ldd.

B.  The vmx flag is an indication that hypervisors will be supported on the host. The other options shown are not relevant flags for this purpose.

A.  The -n option disables name resolution, including hostnames and service names. The other options shown are not relevant flags for this purpose.

B.  The get-default option shows the current target runlevel to which the system will boot. Of the other options, show displays information about configuration but not the target runlevel.

D.  The -s option displays the output of free every N seconds in order to track memory usage over time while troubleshooting. The other options are not relevant for this scenario.

B.  The inspect command shows detailed information about a Docker container. The other options are not relevant for this scenario.

C.  The lsinitrd command shows information about an image created with dracut. The other options are not real commands.

B.  The chronyc tracking command shows information about the current status of time synchronization. The other options are not real commands.

D.  The whois command shows information about domains and IP block ownership and would be appropriate in this scenario. Of the other options, there is an ip command but no info subcommand. The other options are not real commands.

A.  The -j option returns output in JSON format. Of the other options, -i is used for interactive command-line interface, -s shows statistics, and there is no -m option.

D.  The -6 option to the ss command displays IPv6 connections. The other options shown are not valid.

C.  The configuration files for Postfix are stored in /etc/postfix on a Debian server. Of the other answers, none of the directories exist by default.

B.  Given the Forbidden error and the permissions shown, chmod 644 will change the permissions to allow the file to be world-readable. Of the other options, the scenario did not describe the directories; thus there isn’t enough information and also the mv command shown is incomplete. Option C cannot be true based on the scenario showing the permissions for the file. Option D might be correct but renaming a file in Linux requires the use of the mv command.

Index

A

-a/-A option, 6, 14, 17, 32, 40, 69, 72, 102, 138, 148, 178, 180, 181, 182, 185, 189, 193, 198, 199, 202, 206, 207, 219, 247

aa-complain command, 207

aa-disable command, 72, 207

aa-unconfined command, 69, 206

--abort option, 98, 218

access control lists (ACLs), 68, 135

access vector cache (AVC), 209

Active Directory (AD), 78, 201

addRule() function, 79, 210

agentless infrastructure orchestration, 104

Ambassador container, 112, 224

Ansible, 84, 211

Apache, 45, 56

AppArmor, 68, 69, 71, 72, 73

appimagetool tool, 47, 196

apt-cache command, 20, 184, 187, 191, 242

apt-get remove command, 75, 208

apt-get update command, 25, 186, 191

apt-get upgrade command, 36

arp command, 47, 131, 196

ASCII, 28, 188

at command, 191

@ symbol, 13, 181

ATA drives, 191

atq command, 243

atrm command, 35, 191

audit2allow command, 80, 210

ausearch utility, 139

autofs automounter, 40

automated configuration management, 88

awk command, 245

axfr type, 16, 182, 244

B

-b option, 20, 34, 125, 141, 179, 182, 183, 184, 190, 246, 247

baseurl option, 41, 193

Bash shell, 50, 51, 84, 85, 86, 87, 88, 89, 90, 92, 93, 94, 96, 98, 101, 102, 103, 104, 105, 140, 212, 213, 217, 218, 219

bcfg command, 19, 183

binary files, 34

Binary Large Object (Blob), 27, 187

BIOS, 11, 12, 70, 114, 179, 180, 206

blacklist information, 18, 183

blkid command, 8, 29, 178

block devices, 34

boot configuration, 19, 183

boot order, 18, 183

/boot partition, 4, 26, 177, 193

--boot-directory option, 19, 184

bootloader, 19, 67, 183

brctl command, 32, 189

bridging, 106

bs option, 244

-BT option, 133

btrfs filesystem, 8, 178

build automation, 90, 214

C

-c option, 9, 15, 53, 60, 121, 133, 144, 179, 181, 183, 190, 199, 202, 247

Cacti tool, 129

cancel option, 153

case statement, 95

cat command, 107, 111, 188, 223

cd command, 47, 48, 196, 197

CentOS 5/6 system, 16, 18, 182, 183

Certificate Signing Request (CSR), 55

cfq command, 136

chage command, 50, 59, 197, 200, 201, 243

chassis command, 42, 194

chattr command, 76, 209

chcon command, 69, 148, 206

chgrp command, 50, 56, 57, 200

child directories, 34

Chkrootkit, 77, 209

chmod command, 54, 57, 68, 80, 84, 91, 200, 212

chown command, 57, 72, 199, 207

chronyc tracking command, 248

clone command, 87, 213

cloud environments, 27

Common Internet File System (CIFS) mount, 28, 188

connect command, 28, 188

Consul Connect, 221

container command, 110, 223

container images, 105

continuous integration/continuous deployment (CI/CD) infrastructure, 96, 212, 213, 214

cp command, 30, 33, 188

cpio utility, 44, 195

--create option, 22, 185, 244

cron, 35, 36, 37, 149, 190

crontab command, 192

CUPS service, 39

curl command, 42

currency-related localization, 11, 179

cut command, 107, 221

D

daemon processes, 42

date command, 11, 179

dates and times, 10, 11, 179

dd, 44, 195

-d/-D option, 31, 131, 182, 183, 189, 190, 197, 198, 199, 247

Debian systems

Apache and, 45

directory hierarchy on, 23

installing packages on, 27

packages in, 26

removing packages in, 75

searching for packages on, 20, 184

searching packages on, 27

updating, 36

updating package cache in, 25

debugfs command, 242

debugging, 24

declare command, 97

default gateways, 12, 14, 122, 180, 181

--delay option, 132

deplist option, 16, 182, 242

depmod command, 17, 182

Desktop Management Interface, 46

/dev/disk/by-id directory, 21, 184

/dev/disk/by-path directory, 21, 185

/dev/disk/by-uuid file, 29, 188

/dev/filesystem, 28, 188

/dev/hdX, 180

device drivers, 3, 176

/dev/mapper directory, 22, 185

/dev/null, 43, 194

/dev/sdX, 12, 152, 180

/dev/zero file, 34, 190

df command, 16, 34, 37, 182, 192, 243

dig command, 13, 14, 15, 38, 123, 127, 180, 181, 182

directory permissions, 139

disk partitions, 3, 4, 7, 8, 14, 19, 21, 27, 30, 176, 177, 178, 181, 183, 184

disk utilization, displaying current, 16, 182

DISPLAY variable, 51, 198

distclean command, 193

dmesg command, 31, 139, 241

dmidecode command, 46, 142, 196

dnf package, 27, 187

DNS, 38, 244

DNS lookups, 12, 15, 180, 182

DNS queries, 15, 182, 201

DNS servers, 14, 153, 181

docker attach command, 223

Docker containers, 106

Docker Hub, 110, 111

docker pull, 222

domain option, 181

dpkg -s option, 27, 187

dpkg-reconfigure command, 26, 187

dracut command, 18, 183

drive partitions, 3, 176

du command, 7, 117, 121, 178

dual-homed network, 105, 221

dynamic port forwarding, 79

E

e2label command, 25, 187

echo command, 65, 84, 86, 88, 92, 211

-e/-E option, 22, 100, 129, 185, 200, 219

egrep command, 107

elif keyword, 103, 220

enable option, 6, 178

encrypted devices, 20, 184

env command, 84, 94, 118, 211, 216

environment variables, 11, 179

escape sequences, 96, 212, 213, 217, 218, 246

/etc hierarchy, 178, 181

/etc/apt/sources.list.d/ directory, 186

/etc/auto.master file, 193

/etc/cron.allow file, 35

/etc/cron.daily file, 36, 191

/etc/crontab file, 36, 191

/etc/crypttab file, 20, 184

/etc/default/grub file, 4, 5, 177

/etc/exports file, 244

/etc/fail2ban directory, 204

/etc/fstab file, 7, 9, 21, 178, 179, 184

/etc/grub2.cfg file, 24, 186

/etc/gshadow file, 53, 198

/etc/hosts file, 13, 180, 186

/etc/init.d directory, 33

/etc/issue file, 78, 210

/etc/lib directory, 25, 186

/etc/login/defs file, 210

/etc/modprobe.conf file, 187

/etc/modprobe.d directory, 18, 183

/etc/motd file, 78

/etc/mtab file, 156

/etc/network hierarchy, 23, 186

/etc/nologin, 192

/etc/nsswitch.conf, 13, 180

/etc/pam.d directory, 62

/etc/passwd file, 51, 146, 198

/etc/pki directory, 65

/etc/profile file, 77, 200

/etc/profile.d directory, 56

/etc/resolv.conf file, 14, 24, 181, 186

/etc/services file, 58, 201

/etc/shadow file, 52, 79, 142, 198

/etc/skel directory, 50, 197, 242

/etc/sysconfig/network file, 29, 188

/etc/sysctl.conf, 18, 183

/etc/timezone file, 9, 179

/etc/ufw directory, 73

/etc/yum.conf, 26

/etc/yum.repos.d, 20, 184

eth0 interface, 12, 14, 180, 181

Ethernet bridges, 32

exclude option, 187

exec command, 94, 216

ExecStart, 156

ExecStop, 115

executable files, 34

ExeReload= option, 146

export command, 88, 213, 245

EXT tools, 20, 184

ext2/ext3 filesystems, 6, 28, 177, 187

F

fail2ban system, 63, 65

--fake option, 186

fcstat command, 193

fdisk tool, 3, 5, 21, 27, 35, 176, 177, 184

Fedora systems, 27, 80

fetch command, 211

-f/-F option, 11, 24, 31, 34, 44, 55, 117, 125, 126, 150, 178, 179, 183, 184, 185, 186, 188, 189, 190, 193, 194, 195, 199, 244, 245, 247

fg command, 30, 189

Fibre Channel, 21, 135, 185

file command, 34, 47, 93, 197, 215

file globbing, 99, 214

Filesystem Hierarchy Standard (FHS), 6, 7, 178

Filesystem in Userspace (FUSE), 46, 196

filesystems, 22, 25, 39

find command, 39, 42, 108, 109, 193, 194, 222

firewall-cmd command, 71

firewalls, 58, 65, 67, 70, 81, 207, 211

Flatpak, 46, 196

for loop, 89, 97, 214, 219, 220

free command, 119, 136, 243

fsck command, 9, 44, 114, 120, 179, 189, 195

fstrim command, 22, 151, 185, 244

fully qualified domain names, 15, 181

fuser command, 199

G

gcc compiler, 40

gdisk, 9, 179

--gen-key command, 202

get-default option, 248

getenforce command, 80

getent command, 13, 57, 123, 181, 201

getfacl command, 68, 206

getsebool, 69

-g/-G option, 6, 29, 52, 178, 188, 198, 222, 242, 248

GIDs, 54, 199

Git, 91, 222

git command, 88, 90, 91, 92, 96, 98, 99, 101, 102, 104, 108, 213, 214, 215, 217, 218, 220, 222, 245

GIT_DIR environment variable, 98, 218

GnuPG, 61, 207

Google Authenticator, 67

gpg, 61, 73

graphical user interface (GUI), 138

grep command, 110, 191, 194, 195, 223

groupadd command, 54, 199

groupdel command, 53, 199

groupmod command, 51, 198

groups command, 141

GRUB configuration, 3, 4, 5, 67, 176, 177

grub2-install command, 4, 177

grub2-mkconfig command, 4, 24, 177

grub-install command, 5, 19, 177, 184

grub-mkconfig command, 5, 177

GUID, 189

gunzip command, 40, 193

.gz extension, 40

H

hard drives, 5, 36, 177

hardware clock, 11, 12, 179, 180

hardware tokens, 205

-h/-H option, 34, 142, 190

history command, 215

HOME environment variable, 95, 216–217

host command, 12, 13, 122, 143, 180

host networking, 222

hostnamectl command, 42

hostnames, 23

hosts database, 13, 181

-HUP, 32, 190, 194

hwclock command, 11, 179, 180

I

ibstat command, 134

ICMP, 59, 201, 204

iconv command, 28

id command, 53, 199

if statement, 104

ifconfig command, 37, 185, 192

iftop command, 136

-i/-I option, 12, 30, 72, 97, 123, 135, 142, 146, 154, 180, 187, 188, 190, 192, 207, 217, 243, 246

inet protocol family, 23, 130

info option, 27, 187

infrastructure as code, 84, 87, 212, 213

INPUT, 204

insmod command, 17, 176, 183

inspect command, 248

install command, 5, 41, 177, 193

interfaces, troubleshooting, 37

I/O scheduling algorithm, 136, 139

ioping command, 137

ip command, 13, 23, 123, 150, 153, 180, 185

ip route command, 15, 182

ip route command, 14, 15, 124, 126, 181, 182

iperf command, 133

ipset command, 73, 137, 208

iptables, 63, 64, 66, 71, 73, 74, 203

iptables command, 63, 203

iptraf command, 136

IPv6, 13, 180

ISO, booting from, 19, 183

ISO-8859, 179

isolate option, 9, 179

Istio, 221

itop command, 134

-ivh option, 18, 183, 242

iwconfig command, 23, 185

IXOLINUX, 19, 183

J

JavaScript Object Notation (JSON), 105, 112, 223

-j/-J option, 128, 145, 248

jobs command, 47, 119, 196

journal logs, 77, 78

journalctl command, 77, 122, 148, 209, 246

K

-k option, 62, 194, 203

Kerberos, 69

KerberosAuthentication, 74, 208

kern, 58, 201

kernel modules, 2, 17, 24, 26, 176, 182

kernel panic, 31, 77

kernel-install command, 26, 187

kernels, 39, 60

keyboard layouts, changing settings on, 25

kill command, 31, 42, 190

kill signals, 32, 134

killall command, 120

klist command, 69, 206

kubectl get pod command, 220

Kubernetes, 105, 107, 220

L

la command, 10, 33, 179

LANG variable, 10, 101, 179, 219

lapd, 62

--layout, 45, 196

LC_ALL variable, 11, 100, 179, 218

LC_MONETARY variable, 11, 102, 180, 219

LC_TIME environment variable, 10, 97, 179, 217

LDAP, 13, 75, 140, 180, 203, 208, 243, 246

ldd command, 247

legacy locations, enabling, 29

legacy PATA disk, 36

Linkerd, 221

Linux swap, 3, 176

Linux Unified Key Setup (LUKS), 20, 184, 246

--list option, 28, 101, 182, 188, 219

list-jobs option, 150

listuser command, 53

-l/-L option, 35, 69, 109, 111, 135, 145, 147, 185, 191, 194, 197, 198, 200, 206, 222, 223

ln command, 10, 11, 33, 179, 190

local#, 38

local command, 87, 213

local forwarding, 211

locale translations, bypassing, 10, 179

localectl command, 25, 186

localhost, 13, 15, 180, 182

log command, 90

log files, 78

logging driver, 106

logical unit numbers (LUNs), 21, 22, 185

logical volumes, 4, 5, 22, 45, 177

logpath option, 65, 204

--log-prefix option, 66, 205

lpxelinux.0 file, 24, 186

ls command, 10, 33, 36, 69, 72, 89, 116, 135, 179, 190, 191

lsattr command, 76, 209

lsblk command, 32, 41, 189, 193

lscpu command, 116

ls-files command, 247

lshw command, 144

lsinitrd command, 248

lsmen command, 129

lsmod command, 2, 3, 16, 176, 182

lsof -i command, 41, 194

lspci, 10, 179

lsub command, 2, 114, 176

-lt option, 103, 114

lus option, 155

lvchange command, 5, 177

lvcreate command, 4, 177, 244

LVM, 4, 21, 177, 184

lvmdiskscan command, 118

lvresize command, 45, 196

M

mail command, 201

mail servers, 13, 180

MAILADOR option, 22, 185

mailto option, 65, 205

make command, 193

Makefile command, 40, 41, 193

mask command, 43, 195

master boot record (MBR), 4, 5, 19, 176, 177, 183

Match User option, 71, 207

maxlogins option, 128

mdadm command, 22, 45

Media Access Control (MAC), 47

/media mount point, 7, 178

merge command, 86, 212

Microsoft Windows, 15, 28, 181

mkdir command, 30, 189

mke2fs command, 20, 184

mkfs command, 8, 178

mkinitrd command, 16, 182, 243

mkswap command, 120, 244

-m/-M option, 32, 51, 74, 90, 132, 189, 198, 204, 208, 214, 243

modinfo command, 17, 182

modprobe command, 2, 17, 18, 176, 182, 183, 241

modules, 17, 182, 183

--monitor option, 22, 185

more command, 110, 223

motd file, 210

mount command, 3, 6, 8, 118, 176, 178

mtr tool, 47, 132, 196

multibyte representations, of characters, 10, 179

multifactor authentication, 67

multipath command, 22, 185

multipath devices, 31, 185

mv command, 30, 188, 190

myFunction() function, 216

MySQL, 56, 90, 200, 214

N

-n option, 12, 14, 15, 18, 70, 72, 92, 107, 131, 134, 140, 148, 179, 180, 181, 183, 198, 206, 215, 221, 243, 247

NAME parameter, 200

nameserver, 14, 181

Nano editor, 43, 194

nc command, 190, 192, 194, 196

net command, 14, 62, 181

netcat tool, 38, 190

netlink messages, 13, 180

netstat command, 12, 14, 69, 97, 124, 180, 181, 194, 247

network adapters, configuring, 56

Network Address Translation (NAT), 65, 106, 221

network services, 14, 181

network sockets, 14, 23, 181

NFS mounted filesystem, 24, 119, 127

nftables, 79

nice command, 37, 118, 191

nmap, 127

nmcli command, 136

-nn option, 10, 179, 242

--no-commit option, 102, 219

nocompress option, 78, 210

nofail option, 145

NOPASSWD option, 59, 149, 202

--norc option, 50, 197

nslookup command, 33

NTP servers, 38, 192, 205

ntpdate command, 180

NVMe protocol, 117

NXDOMAIN, 38, 192

O

o command, 31, 189

octal notation, 73, 208

OnBootSec option, 118

-o/-O option, 4, 41, 42, 131, 177, 183, 194

OpenSSH, 55, 63, 66

openssl command, 55, 200

OpenSUSE system, 27

OpenVPN, 64, 204

/opt hierarchy, 6, 178

options debug, 24

orchestration software, 246

--origin option, 99

--output option, 186

overlay network, 221

OVF files, 223

P

package cache, searching, 26

packaged applications, creating, 46

packages, searching for on Debian systems, 20, 184

parted command, 8, 32, 178

partitions, 3, 176

partprobe command, 137, 178

PASS_MAX_DAYS option, 146

passwd command, 52, 67, 198

PasswordAuthentication, 202

password-based authentication, 61

passwords, 50, 52, 54, 67, 199

PEM, 63, 203

PermitEmptyPasswords option, 63

PermitRootLogin option, 55

persistent volume, 105, 221

pgrep apache command, 37

pgrep command, 191

physical volumes, 4, 21, 177, 184

ping command, 12, 15, 126, 180, 181

pipe character, 213, 214, 215

pkexec command, 80

pkill command, 48, 139, 197

Pluggable Authentication Mobile (PAM) mechanism, 62, 67, 70, 74, 75, 76, 135, 203, 208

pods, 220

PolicyKit, 80

polkit functions, 79

port redirects, 63

ports, 74, 75, 128, 133, 199, 203, 205, 208

POSIX compatibility, 56, 179

Postfix, 14, 63, 181, 203, 248

pound sign (#), 212

-p/-P option, 15, 23, 34, 47, 68, 95, 128, 181, 185, 188, 189, 190, 196, 204, 206, 216, 246

practice exam, 158–174

PREROUTING, 63, 203

primary partitions, 3, 176

printenv command, 87, 213

printf command, 43, 195

privileged ports, 208

/proc filesystem, 35, 191

process IDs, 23, 37, 48, 134

/proc/mdstat file, 45, 196

/proc/mounts file, 28, 188

/proc/partitions file, 30, 189

ps command, 48, 70, 144, 191, 195, 206, 247

PS1 environment variable, 94, 216

public key, 73, 208

public keyrings, 61

pull command, 84, 109, 211

push command, 110, 223

pvcreate command, 4, 177

pvdisplay command, 21, 130, 184

pvs command, 177

pvscan, 130

PXE Linux, 19, 24, 183

pxelinux.0 file, 19, 183

Python, 211

Q

-q command, 187

R

RAID arrays, 21, 22, 45, 132, 184, 185

RAM disks, 16, 18, 182, 183

raw devices, 27, 187

read command, 94, 216

read I/O requests, displaying, 30

readonly command, 215

realm command, 78, 210

reboot option, 193

Red Hat system, 70, 197

relative path, 221

reload command, 43, 194

renice command, 46, 134, 148, 191, 196

repo repository, 85

req command, 55, 200

resize2fs, 28

resolvectl command, 47

restorecon utility, 70

-rf option, 188

rmdir command, 29, 34

rmi command, 106, 221

rmod command, 3, 31, 176

root account, 205

rootkits, 77

route command, 12, 14, 15, 16, 125, 126, 180, 181, 182

rpm command, 6, 18, 25, 26, 177, 183, 187

rpm2cpio, 6, 177

.rpmnew file, 46, 196

.rpmsave file, 46, 196

-r/-R option, 7, 12, 17, 33, 45, 52, 55, 57, 68, 91, 97, 114, 121, 131, 132, 143, 154, 178, 180, 183, 188, 190, 193, 194, 195, 197, 198, 199, 200, 206, 214, 217, 243, 245, 246

RSA, 60, 70, 206

rsync command, 40

run command, 110, 223

--runtime-to-permanent option, 207

S

sandboxed AppImage packages, 47

sar command, 138, 243

scp command, 44, 195, 207

screen command, 119

scripts, 45, 190

SCSI devices, 7, 115, 178

sda, 30

search command, 15, 26, 27, 125, 181, 187

sectors, on disks, 19, 183

Secure File Transfer Protocol (SFTP), 44, 195

Secure Shell (SSH), 38, 39, 44, 59, 60, 61, 65, 68, 71, 73, 74, 88, 97, 104, 192, 198, 207, 211, 220

Secure Shell Filesystem (SSHFS), 46, 196

Secure Shell (SSH) server, 51

Secure Sockets Layer (SSL), 55, 61, 123, 208

Secure Sockets Layer (SSL) certificates, 78, 81, 203, 205, 206

sed command, 29, 108

self-signed certificates, 77, 209, 210

SELinux, 66, 67, 69, 70, 72, 76, 79, 80, 205

SELINUXTYPE option, 66, 205

semanage command, 80, 210

send-key option, 60, 202

seq command, 216

Serial ATA (SATA), 12, 142, 152, 180

server command, 33, 140, 190

service command, 31, 43

service mesh, 107

service status command, 41, 194

sestatus command, 67, 74, 205

set command, 215

setenforce command, 205

setfacl command, 206

setsebool command, 68

-sh option, 117

shared libraries, 25

shift command, 219

shim, 20, 184

shim.efi, 19, 183

--show option, 130

-showcerts option, 146

--show--depends option, 18, 183

simple type, 121

single option, 2, 114, 176

single sign-on (SSO), 78

single-user mode, 2, 9, 176, 179, 243

--size-only option, 244

SMTP traffic, 58, 201

snap, 196

snap packages, 46

snapd command, 46

SNMP servers/traffic, 55, 199

soa type, 14, 181, 192

Socket, 136

Socks proxy, 79, 210

software orchestration, 86

sort command, 188

sort order, changing, 44

source command, 85, 93, 212, 215, 245

SPF records, 15, 182

square brackets, 95, 216

ss command, 23, 114, 185, 244

-s/-S option, 11, 33, 56, 116, 128, 131, 133, 141, 143, 152, 179, 180, 187, 190, 191, 198, 200, 248

SSD, 151

ssh command, 65, 68, 79, 204, 205

sshd_config file, 71

ssh-keygen command, 59, 75, 201, 245

SSLEnable option, 61

SSLEngine option, 203

Start of Authority information, 14, 38, 181

start option, 178

stateless firewalls, 81, 211

STDERR, 104, 215, 219

STDIN, 102, 214

STDOUT, 4, 6, 104, 177, 219

steal, 100

Steal metric, 116

stop command, 42, 179, 193, 194

strace command, 117

su command, 60, 61, 69

sudo command, 57, 59, 72, 121, 154, 207

suid command, 57, 201

swap partitions, 120

swap space, 116

swapoff command, 129

swapon command, 141

-sX option, 133

symlink, 33, 190

/sys/block/sda/stat file, 30, 189

/sys/class/fc_host directory, 193

sysctl command, 17, 18, 76, 178, 182, 183, 209

syslog, 38

system logging facility, 58

System Security Services Daemon (sssd), 78

system-config-selinux command, 211

systemd-controlled system, 9, 40, 58, 150, 151, 179, 201

systemectl command, 2, 6, 8, 39, 40, 41, 43, 147, 150, 151, 153, 176, 178, 192, 193, 241, 242

system-journald, 58

SystemMaxFileSize option, 209

--systohc, 12, 180

SysVinit, 33, 190

T

tcptraceroute command, 137

telinit command, 178

text record type, 15, 182

TFTP servers, 19, 183

/tftpboot, 19, 183

time command, 124

time zones, 9, 10, 11, 122, 179

timedatectl command, 10, 122, 179

timeout option, 152

timestamp, 188

TMOUT environment variable, 99

/tmp hierarchy, 178

top command, 46, 129, 242

touch command, 30, 188, 210

tr command, 108, 222

tracepath command, 125

traceroute command, 37, 125, 192

traffic, preventing from reaching hosts, 15, 181

Transmission Control Protocol (TCP), 34, 64, 71, 201

Transmission Control Protocol (TCP) ports, 58

Transmission Control Protocol (TCP) wrappers, 60

Transport Layer Security (TLS), 55

tree command, 182

tshark command, 137

-t/-T option, 12, 15, 20, 37, 74, 75, 122, 126, 180, 181, 184, 192, 199, 208

tune2 command, 156

tune2fs, 22, 128

.txt extension, 32

type command, 93, 215, 222

tzselect command, 179

U

udev, 56

UFW, 73

ufw allow command, 207

ulimit command, 140, 202

unalias command, 100, 219

Unicode, 28, 188

Unified Extensible Firmware Interface (UEFI) system, 2, 18, 19, 20, 70, 176, 183, 184

unmount command, 7, 178, 186

--unset option, 213

until loop, 102, 220

update command, 177

update-grub command, 3, 176

upgrade option, 191

upgrading kernels, 39

uptime command, 119, 247

USB devices, 2, 8, 115, 176, 178

user IDs (UIDs), 54, 67, 76, 81, 198, 199, 205, 209

--user option, 80, 211

useradd command, 51, 52

userdel command, 50, 197

usermod command, 39, 52, 53, 193, 198, 199, 201

usernames, 29, 191

usrquota option, 121

/usr/share/zoneinfo, 9, 179

UTC, 12, 180

UTF-8, 10, 179, 188, 243

-u/-U option, 89, 133, 151, 202, 213

UUIDs, 8, 29, 178, 188, 189

V

/var hierarchy, 14, 178, 181

/var/spool/cron/crontabs directory, 191

--verify option, 186, 242

VFAT filesystem, 8, 178

vgextend command, 177

vgscan command, 130, 144

Vi editor, 31, 194

Vim, 34

virsh command, 28

visudo command, 60

vmlinux, 24, 186

vmlinuz, 24, 186

vmstat command, 118, 128

volume group creation, 4, 177

VPN service, 64, 70, 206

-v/-V option, 25, 74, 178, 179, 183, 186, 189, 190, 208, 242

W

:w, 189

w command, 199

web servers, enabling, 50

wget command, 41

while loop, 87, 104, 213, 220

who command, 54, 199

whois command, 137, 248

wildcard certificates, 78, 81, 210

wireless devices, 23

Wireshark, 137

World Wide Identifiers (WWIDs), 21, 31, 184, 189

:wq command, 31

-w/-W option, 3, 11, 129, 176, 180, 197

WWN, 40

X

-x option, 147

X11Forwarding yes option, 51, 198

xfsdump, 20, 21, 184

xfs_info command, 8, 178

xfs_metadump, 6, 178

xfsrestore, 20, 184

XML, 110

xwinfo command, 242

Y

-y option, 120

YAML, 101, 106, 109, 111, 219, 221, 222, 223

yum command, 5, 16, 20, 177, 182, 184

Z

zip command, 34, 45, 195

Zombie, 48, 197

zone transfers, 16, 182

zypper command, 27, 187

-z/-Z option, 21, 34, 184, 190, 206, 207

Online Test Bank

Register to gain one year of FREE access after activation to the online interactive test bank to help you study for your CompTIA Linux+ certification exam—included with your purchase of this book! All of the chapter review questions and the practice tests in this book are included in the online test bank so you can practice in a timed and graded setting.

Register and Access the Online Test Bank

To register your book and get access to the online test bank, follow these steps:

Go to www.wiley.com/go/sybextestprep.

Select your book from the list.

Complete the required registration information, including answering the security verification to prove book ownership. You will be emailed a pin code.

Follow the directions in the email or go to www.wiley.com/go/sybextestprep.

Find your book on that page and click the “Register or Login” link with it. Then enter the pin code you received and click the “Activate PIN” button.

On the Create an Account or Login page, enter your username and password, and click Login or, if you don't have an account already, create a new account.

At this point, you should be in the test bank site with your new test bank listed at the top of the page. If you do not see it there, please refresh the page or log out and log back in.

WILEY END USER LICENSE AGREEMENT

Go to www.wiley.com/go/eula to access Wiley’s ebook EULA.