25,99 €
The best practice test preparation for the foundational CompTIA Linux+ certification exam If you're preparing for this all-important exam, turn to CompTIA Linux+ Practice Tests. The book covers the 5 objective domains, PLUS one additional 90-question practice exam, for a total of 1,000 practice test questions. Readers will also get one year of FREE access to the online test bank where they can study and work through the questions, reinforcing their skills and knowledge. Study for the CompTIA Linux+ certification with Sybex and get the advantage of exam day confidence. This book covers: * Hardware and System Configuration * Systems Operation and Maintenance * Security * Linux Troubleshooting and Diagnostics * Automation and Scripting Linux is a UNIX-based operating system originally created by Linus Torvalds with the help of developers around the world. Developed under the GNU General Public License, the source code is free. Because of this, Linux is viewed by many organizations and companies as an excellent, low-cost, secure alternative to expensive OSs, such as Microsoft Windows. The CompTIA Linux+ exam tests a candidate's understanding and familiarity with the Linux Kernel. As the Linux server market share continues to grow, so too does demand for qualified and certified Linux administrators.
Sie lesen das E-Book in den Legimi-Apps auf:
Seitenzahl: 415
Veröffentlichungsjahr: 2019
Steven Suehring
Senior Acquisitions Editor: Kenyon Brown
Development Editor: Tom Cirtin
Technical Editor: Kevin Ryan
Production Editor: Amy Odum
Copy Editor: Tiffany Taylor
Editorial Manager: Pete Gaughan
Production Manager: Kathleen Wisor
Executive Editor: Jim Minatel
Proofreader: Kathryn Duggan
Indexer: Ted Laux
Project Coordinator, Cover: Brent Savage
Cover Designer: Wiley
Cover Image: © Jeremy Woodhouse/Getty Images, Inc.
Copyright © 2019 by John Wiley & Sons, Inc., Indianapolis, Indiana
Published simultaneously in Canada
ISBN: 978-1-119-55596-4ISBN: 978-1-119-55602-2 (ebk.)ISBN: 978-1-119-55610-7 (ebk.)
Manufactured in the United States of America
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 Sections 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, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. 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 http://www.wiley.com/go/permissions.
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 Web site 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 Web site may provide or recommendations it may make. Further, readers should be aware that Internet Web sites 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 to obtain technical support, please contact our Customer Care Department within the U.S. at (877) 762-2974, outside the U.S. at (317) 572-3993 or fax (317) 572-4002.
Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with standard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at http://booksupport.wiley.com. For more information about Wiley products, visit www.wiley.com.
Library of Congress Control Number: 2019938095
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 is a registered trademark of Computing Technology Industry Association, 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.
10 9 8 7 6 5 4 3 2 1
To Tim Krause
Thank you to the team that helped put this title together: Pete Gaughan, editorial manager; Kenyon Brown, the acquisitions editor; Kevin Ryan, technical editor; Tom Cirtin, the project editor; Amy Odum, production editor; copyeditor Tiffany Taylor; and the compositors at Aptara.
Thank you also to all of those individuals who support me throughout book-writing and project endeavors, including my family, Patti, Rob, and Jim at Partners, Kent and everyone at Soundworks, and my colleagues at UWSP.
Steve Suehring is an assistant professor of computing and new media technologies at University of Wisconsin—Stevens Point. Prior to joining the faculty in 2015, Steve gained 20 years of field experience in a variety of technical engineering, system and network administration, and system architectural roles. Steve has written several books and has served as an editor for LinuxWorld magazine.
This book is a companion volume to CompTIA Linux+ Study Guide: Exam XK0-004 (4th ed.). The book will help you prepare for the certification exams by testing your knowledge using questions derived directly from the exam objectives. There are 1,000 questions within this book, divided into chapters based on the objectives.
Each of the chapters will test your knowledge on a given exam objective along with its subobjectives. There is also a practice exam at the end covering all exam objectives. The questions are a mix of easy to difficult and will help you prepare for the types of knowledge needed to demonstrate that you can work with Linux systems.
To achieve maximum benefit, the book should be used with the corresponding certification study guide. You can also use the book to identify areas where additional study is needed.
The following table lists each of the five objective domains in the CompTIA Linux+ exam and the percentage of the exam of each domain. The subobjectives are also listed for each domain. Because each chapter in this book focuses on a specific domain, the mapping is easy: for Domain 1.0, refer to Chapter 1; for Domain 2.0, refer to Chapter 2, and so on.
Objective Domain
Percentage of Exam
Chapter
Domain 1.0 Hardware and System Configuration
21%
1
1.1 Explain Linux boot process concepts
1.2 Given a scenario, install, configure, and monitor kernel modules
1.3 Given a scenario, configure and verify network connection parameters
1.4 Given a scenario, manage storage in a Linux environment
1.5 Compare and contrast cloud and virtualization
concepts and technologies
1.6 Given a scenario, configure localization options
Domain 2.0 Systems Operation and Maintenance
26%
2
2.1 Given a scenario, conduct software installations,
configurations, updates, and removals
2.2 Given a scenario, manage users and groups
2.3 Given a scenario, create, modify, and redirect files
2.4 Given a scenario, manage services
2.5 Summarize and explain server roles
2.6 Given a scenario, automate and schedule jobs
2.7 Explain the use and operation of Linux devices
2.8 Compare and contrast Linux graphical user interfaces
Domain 3.0 Security
19%
3
3.1 Given a scenario, apply or acquire the appropriate
user and/or group permissions and ownership
3.2 Given a scenario, configure and implement appropriate
access and authentication methods
3.3 Summarize security best practices in a Linux environment
3.4 Given a scenario, implement logging services
3.5 Given a scenario, implement and configure Linux firewalls
3.6 Given a scenario, backup, restore, and compress files
Domain 4.0 Linux Troubleshooting and Diagnostics
20%
4
4.1 Given a scenario, analyze system properties and remediate accordingly
4.2 Given a scenario, analyze system processes
in order to optimize performance
4.3 Given a scenario, analyze and troubleshoot user issues
4.4 Given a scenario, analyze and troubleshoot
application and hardware issues
Domain 5.0 Automation and Scripting
14%
5
5.1 Given a scenario, deploy and execute basic Bash scripts
5.2 Given a scenario, carry out version control using Git
5.3 Summarize orchestration processes and concepts
Cover
Acknowledgments
About the Author
Introduction
Objective Map
Chapter 1 Hardware and System Configuration
Chapter 2 System Operations and Maintenance
Chapter 3 Security
Chapter 4 Linux Troubleshooting and Diagnostics
Chapter 5 Automation and Scripting
Chapter 6 Practice Exam
Answers and Explanations
Chapter 1: Hardware and System Configuration
Chapter 2: System Operations and Maintenance
Chapter 3: Security
Chapter 4: Linux Troubleshooting and Diagnostics
Chapter 5: Automation and Scripting
Chapter 6: Practice Exam
Index
Comprehensive Online Learning Environment
WILEY END USER LICENSE AGREEMENT
Cover
Table of Contents
Chapter 1
i
iii
iv
v
vii
ix
xv
xvi
xvii
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
THE FOLLOWING COMPTIA LINUX+ EXAM OBJECTIVES ARE COVERED IN THIS CHAPTER:
1.1 Explain Linux boot process concepts.
The following is a partial list of the used files, terms, and utilities:
Boot loaders such as GRUB and GRUB2
Boot options such as UEFI/EFI, PXE, NFS, and booting from ISO and HTTP/FTP
/etc/default/grub
/etc/grub2.cfg
/boot
mkinitrd
dracut
grub2-install
grub2-mkconfig
initramfs
linux.efi
vmlinuz
vmlinux
1.2 Given a scenario, install, configure, and monitor kernel modules
The following is a partial list of the used files, terms, and utilities:
lsmod
insmod
modprobe
dmesg
rmmod
depmod
/usr/lib/[kernelversion]
/usr/lib/modules
/etc/modprobe.conf
/etc/modprobe.d/
1.3 Given a scenario, configure and verify network connection parameters
The following is a partial list of the used files, terms, and utilities:
ping
netstat
nslookup
dig
host
route
ip
ethtool
ss
iwconfig
nmcli
brctl
nmtui
/etc/sysconfig/network
/etc/sysconfig/network-scripts/
/etc/hosts
/etc/network
/etc/resolv.conf
/etc/netplan
/etc/sysctl.conf
/etc/dhcpd.conf
Bonding aggregation, active/passive, load balancing
1.4 Given a scenario, manage storage in a Linux environment
The following is a partial list of the used files, terms, and utilities:
Basic partitions including raw devices, GPT, and MBR
File system hierarchy including real file systems, virtual filesystems, relative paths, and absolute paths
Device mappers including lvm, mdadm, and Multipath
XFS tools
LVM tools
EXT tools
fdisk
parted
mkfs
iostat
df
du
mount
umount
tune2fs
fsck
/etc/fstab
/etc/cryptab
/dev/
/dev/mapper
/dev/disk/by-id
/etc/mtab
/sys/block
Filesystem types including ext3, ext4, xfs, nfs, smb, cifs, and ntfs
1.5 Compare and contrast cloud and virtualization concepts and technologies
The following is a partial list of the used files, terms, and utilities:
Templates including VM, OVA, OVF, JSON, YAML, and container images
Bootstrapping, including Cloud-init, Anaconda, and Kickstart
Storage such as thin vs. thick provisioning, persistent volumes, blob, and block
Network considerations including bridging, overlay networks, NAT, local, and dual-homed
Types of hypervisors
Tools such as libvirt, virsh, and vmm
1.6 Given a scenario, configure localization options
The following is a partial list of the used files, terms, and utilities:
/etc/timezone
/usr/share/zoneinfo
localectl
timedatectl
date
hwclock
time
Environment variables such as
LC_*, LC_ALL, LANG
, and
TZ
Character sets such as UTF-8, ASCII, and Unicode
Which command is used to load a module and its dependencies automatically?
modprobelsmodinsmodrmmodWhich option given at boot time within the GRUB configuration will boot the system into single-user mode?
single-usersusinglerootDuring boot of a system with GRUB2, which key can be pressed to display the GRUB menu?
ShiftEVHWhich command can be used to view the kernel ring buffer in order to troubleshoot the boot process?
lsbootboot-logkrblogdmesgWhich command can be used to obtain a list of currently loaded kernel modules?
insmodmodlistls ––moduleslsmodWithin which partition will the EFI system partition typically be mounted?
/etc/efi/efi/sys/efi/boot/efiAssuming 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/usbusbconnect /dev/sdb0 /media/usbmount /dev/sdb0 /media/usbusbmount /dev/sdb1 /media/usbWhat 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 initramfs 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-unloadWhich command will output a new GRUB2 configuration file and send the output to the correct location for booting?
update-grub > /boot/grub/grub.cfgupdate-grub boot > /boot/grub.cfggrub-rc.dgrub-bootWhat is the maximum number of primary partitions available on an MBR partitioning system?
2415When working with disk partitions through a tool like fdisk, you see the type 0x82. Which type of partition is this?
LinuxLinux swapNTFSFATWhich file should you edit when using GRUB2 in order to set things like the timeout?
/etc/default/grub/etc/grub/boot/etc/boot/grub.d/grub.d/bootWhich option for the grub2-mkconfig command sends output to a file instead of STDOUT?
-stdout--fileout-o-fOf the following choices, which size would be most appropriate for the /boot partition of a Linux system?
Between 100 MB and 500 MBBetween 1 GB and 10 GB/boot should not be partitioned separately.Less than 5 MBWhich of the following commands initializes a physical disk partition for use with LVM?
lvmcreatepvcreatefvcreatelvinitWhich of the following commands installs GRUB into the MBR of the second SATA disk?
grub2-install /dev/hdb2grub2-install /dev/sda2grub2-config /dev/sdagrub2-install /dev/sdbWhich command is used to create a logical volume with LVM?
pvcreatelvmcreatelvcreatevolcreateWhat is the logical order for creation of an LVM logical volume?
Physical volume creation, volume group creation, logical volume creationPhysical volume creation, logical volume creation, volume group creationLogical volume creation, physical volume creation, volume group creationLVM creation, format, partitionWhich command should be run after making a change to the /etc/default/grub file?
grubgrub-mkconfiggrub-instrebootWhich command is used to search for physical volumes for use with LVM?
lvmcreatepvcreatelvmdiskscanlvmscanA 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/sda1Which of the following commands installs GRUB into the master boot record (MBR) of the first SATA drive?
grub-install /dev/hdagrub-install /dev/sdagrub-install /dev/hd0,0grub -i /dev/hdaWhen running fsck 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-fAfter inserting a new hard drive 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.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 --continuetune2fs -e continuemkfs --no-remountmount -o remountWhich 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 site-specific data for a server?
/etc/var/tmp/srvWhich option to the mount command will mount all filesystems that are currently available in /etc/fstab?
-f-d-a-mWhich command and option are used to display the number of times a filesystem has been mounted?
tune2fs -hcat /etc/fstabmount -aless /etc/fsmntWhich option to xfs_metadump displays a progress indicator?
-g-p-f-vThe 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?
dudflslocateWhich 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/srv/mountsAccording to the FHS, what is the proper mount point for removable media?
/etc/srv/tmp/mediaWhich file contains information on currently mounted filesystems, including their mount options?
/etc/mtab/etc/fstab/tmp/files/etc/filesystemsWhich 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-vWhich 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?
blkidlsfindcatThe xfs_info command is functionally equivalent to which command and option?
xfs_test -nxfs_listtunexfs -ixfs_growfs -nWhich of the following commands will create a btrfs filesystem on the first SATA drive?
mkfs /dev/sda1mkfs.btrfs /dev/sdamkfs.btr2fs /dev/sda1mkfs –b /dev/sdaWhich command and option are used to set the maximum number of times a filesystem can be mounted between running fsck?
tune2fs -cdumpe2fstune2fs -msetmountWhich command can be used to change the partitioning scheme for a disk, such as to change the size of existing partitions without deleting them?
resize2fspartedmkfsrfdiskWhich of the following commands will mount a USB device at /dev/sdb1 into the /media/usb directory, assuming a VFAT filesystem for the USB drive?
mount -t vfat /dev/sdb1 /mntusbmount /dev/sdb1 /mnt/usbmount -t vfat /dev/sdb1 /mnt/usbmount -t usb /dev/sdb1 /mnt/usbWhich option within gdisk will change the partition name?
nbvcWhich option to the dumpe2fs command can be used to display blocks that are reserved because of being marked as bad?
-v-f-b-mWhich options to fsck can be used to check all filesystems listed in /etc/fstab while excluding the root partition?
-NR-AM-X-CWhich option in /etc/fstab sets the order in which the device is checked at boot time?
optionsdumpfsckcheckorderWhich file is used to indicate the local time zone on a Linux server?
/etc/timez/etc/timezoneconfig/etc/timezone/etc/localtzWithin which directory will you find files related to the time zone for various regions?
/etc/timezoneinfo/etc/zoneinfo/var/zoneinfo/usr/share/zoneinfoWhich command within virsh obtains information about a domain?
infodominfodomainlistinfodomWhich environment variable controls the format of dates and times, such as a 12-hour or 24-hour formatted clock?
LOCALE_DATEDATE_FORMATLC_TIMELC_DATEWhich of the following encodings provides a multibyte representation of characters?
ISO-8859UTF-8ISO-LUFTMultiWhich command can be used to view the available time zones on a system?
tzd/etc/localetimedatectltzselWhich of the following lines added to .profile in a user’s home directory will set their time zone to Central time?
TZ=/Central ; export TZTIMEZONE=’America/Chicago’ ; export TIMEZONEset TZ=/CentralTZ=’America/Chicago’; export TZWhich of the following values for the LANG variable will configure the system to bypass locale translations where possible?
LANG=COMPATLANG=NONELANG=CLANG=ENDIf you need to temporarily reconfigure all locale variables and settings for a given session, which environment variable can be used?
LC_LISTLC_GLOBALLC_ALLALL_LOCALEWhich of the following commands will set the systemwide time zone to ’America/Los_Angeles’?
ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtimeln -sf America/Los_Angeles ; /etc/localtimeln -sd /etc/localtime /usr/share/timezone/America/Los_Angelesln -sf /etc/localtime /usr/share/zoneinfo/America/Los_AngelesWhich locale-related variable is used for currency-related localization?
LC_MONELC_CURRENCYLC_MONETARYLC_CURRWhich command is used to query and work with the hardware clock on the system?
hwcntpdatesystimehwclockWhich option to the date command can be used to set the date and time?
date -fdate -tdate --changedate -sWhich function of the hwclock command will set the hardware clock to the current system time?
-w-s-a-mWhich of the following commands sets the hardware clock to UTC based on the current system time?
hwclock --systohc --utchwclock --systohc --localtimehwclock --systohchwclock --systoutcWhich of the following commands shows the current default route without performing DNS lookups on the IP address(es) involved?
netstat -rnnetstat -nnetstat -rnetstat -fWhich of the following is not used as a private address for local, non-Internet, use?
172.16.4.2192.168.40.310.74.5.244143.236.32.231Which of the following commands adds a default gateway of 192.168.1.1 for interface eth0?
route add default gateway 192.168.1.1 eth0eth0 --dg 192.168.1.1route add default gw 192.168.1.1 eth0route define eth0 192.168.1.1Which option for the host command will query for the authoritative name servers for a given domain?
-t ns-t all-ns-namedWhich option for the ping command enables you to choose the interface from which the ICMP packets will be generated?
-i-I-t-aWhich of the following commands queries for the mail servers for the domain example.com?
dig example.com mxdig example.comhost -t smtp example.comdig example.com smtpWhich of the following addresses represents the localhost in IPv6, such as you might find in /etc/hosts?
0:1::1127:0:1:127:0:0:1Which command can be used to listen for netlink messages on a network?
ip monitornetlink -aip netlinkrouteWhich 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 ldaplookup: group [local ldap]group: [local ldap]group: localfiles ldapWhich 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.5dig -t 192.168.2.5 example.comdig -s 192.168.2.5 example.comdig server=192.168.2.5 example.comWhich of the following commands will enumerate the hosts database?
getent hostsgethostsnslookuphostWhich of the following configuration lines will set the DNS server to 192.168.1.4 using /etc/resolv.conf?
dns 192.168.1.4dns-server 192.168.1.4nameserver 192.168.1.4name-server 192.168.1.4Which of the following commands adds a route to the server for the network 192.168.51.0/24 through its gateway 192.168.51.1?
route add -net 192.168.51.0 netmask 255.255.255.0 gw 192.168.51.1route add -net 192.168.51/24 gw 192.168.1.51route -net 192.168.51.0/24 192.168.51.1route add 192.168.51.1 -n 192.168.51.0//255.255.255.0Which of the following commands shows network services or sockets that are currently listening along with sockets that are not listening?
netstat -anetlink -asockets -fopensock -lWhich of the following represents a correct configuration line for /etc/hosts?
192.168.1.4 cwa.braingia.org cwacwa.braingia.org cwa 192.168.1.4cwa.braingia.org 192.168.1.8 alias cwaalias cwa.braingia.org cwa 192.168.1.4Which of the following commands will change the default gateway to 192.168.1.1 using eth0?
ip route default gw 192.168.1.1ip route change default via 192.168.1.1 dev eth0ip route default gw update 192.168.1.1ip route update default 192.168.1.1 eth0Which of the following commands displays the Start of Authority information for the domain example.com?
dig example.com soadig example.com authoritydig example.com -authdig -t auth example.comAssume 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?
searchdomainlocal-domainlocal-orderWhich of the following commands prevents traffic from reaching the host 192.168.1.3?
route add -host 192.168.1.3 rejectroute -nullroute 192.168.1.3route add -null 192.168.1.3route add -block 192.168.1.3Which 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 4ping -t 4ping -p 4ping -c 4You 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 cacheip route reloadip route cache reloadip route restartWhich option should be used to send a DNS query for an SPF record with dig?
-t txt-t spf-t mx-t mailspfWhen 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 axfrdig example.org @192.168.1.4dig example.org @192.168.1.4 xferdig example.org #192.168.1.4 xferWhen using iostat to assess performance, which option displays information on a per-partition basis for block devices?
-a-c-d-pWhich of the following commands can be used to display the current disk utilization?
dfdudiskutildiskuseYou 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?
mkinitrdmkramdiskmkdisk --initmkfs.initWhich of the following commands is used to display the currently loaded modules on a running system?
ls -modlsmodlistmodmod --listWhich of the following commands creates a list of modules and their dependencies?
lsmoddepmodmodlistlistmodWhich option to sysctl displays all values and their current settings?
-a-b-d-cWhich of the following commands installs a kernel module, including dependencies?
lsmodmodprobemodinstinstmodWhich command is used to determine the modules on which another module depends?
modinfomodlistmodprobetracemodWhich of the following commands inserts a module into the running kernel but does not resolve dependencies?
lsmodmodinstallinsmodmoduleinstWhich option to modprobe will remove a module and attempt to remove any unused modules on which it depends?
-v-r-d-fWithin which of the following directories will you find blacklist information for modules loaded with modprobe?
/etc/blacklist/etc/modprobe.d/etc/blacklist.mod/etc/modprobeWhen working with a CentOS 6 system, which command is used to create the initial RAM disk?
mkinitdracutmkraminitmkinitfsIf 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.confWhich of the following options to modprobe will show the dependencies for a module?
--show-deps--show-depends--deps--list-dependsWhich of the following commands mounts /dev/sda1 in the /boot partition?
mount /dev/sda /bootmount /boot /dev/sda1mount /dev/sda1 /bootmount -dev sda1 /bootWhich of the following commands changes the boot order for the next boot?
efibootmgr -cefibootmgr -b -Befibootmgr -oefibootmgr -nWhich bootloader can be used to boot from ISO with ISO9660 CD-ROMs?
ISOLINUXEFIBOOTISOFSBOOTISOWhen using UEFI, which of the following files can be used as a bootloader?
shim.uefishim.efishim.fxefi.shimWhich of the following commands, executed from within the UEFI shell, controls the boot configuration?
bootcfgbcfggrub-installgrcfgWhich 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 SectorMaster 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.tftppxelinux.bootpxelinux.confpxelinux.0Which option to grub-install will place the GRUB images into an alternate directory?
--boot-dir-b-boot--boot-directoryWhen using a shim for booting a UEFI-based system, which of the following files is loaded after shim.efi?
grubx64.cfggrub.confgrubx64.efiefi.bootPart of the EXT tools, which option to the mke2fs command sets the type of filesystem to be created?
-f-a-t-eWhich file is used to store a list of encrypted devices that are to be mounted at boot?
/etc/cryptdev/etc/crypttab/etc/encrtab/etc/fsencryptWhich option to dumpe2fs displays the bad blocks for a given partition?
-bb-C-b-fWhich option to xfs_check is used to verify a filesystem that is stored in a file?
-v-a-f-dYou 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 1028KYou see the word defaults within /etc/fstab. Which options are encompassed within the defaults?
ro, exec, autorw, suid, dev, exec, auto, nouser, asyncrw, exec, auto, nouser, asyncrw, exec, nouser, async, noauto, suidWhich of the following options to xfsdump sets the maximum size for files to be included in the dump?
-p-s-z-bWhich partition type is used to indicate a software RAID array, such as an array built with mdadm?
0xmd-x-0xRD0xFDWhen 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.wwidWhich of the following commands displays information about a given physical volume in an LVM setup?
pvdisppvlistpvdisplaypvlWhen viewing information in /dev/disk/by-path using the command ls -l, which of the following filenames represents a LUN from Fibre Channel?
/dev/fc0pci-0000:1a:00.0-fc-0x500601653ee0025f:0x0000000000000000pci-0000:1a:00.0-scsi-0x500601653ee0025f:0x0000000000000000/dev/fibre0Which of the following commands displays path information for LUNs?
luninfo -als -lunmultipath -ldm-multiWhich command is used to remove unused filesystem blocks from thinly provisioned storage?
thintrimthtrimfstrimfscleanWhen 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-fWhich option to mdadm is used to create a new array?
--create--start--begin--constructInformation about logical volumes can be found in which of the following directories?
/dev/lvinfo/dev/map/dev/mapper/dev/lvmapWhich option to mdadm watches a RAID array for anomalies?
--mon--watch--monitor--examineWhen running mdadm in monitor mode, which option within /etc/mdadm.conf sets the destination for email if an issue is discovered?
MAILTOMAILADDRMAILFROMMAILDESTWhen using the ip command, which protocol family is used as the default if not otherwise specified?
tcpipipinetarpWhich command is used for setting parameters such as the essid, channel, and other related options for a wireless device?
ifconfigiwconfigwlancfgiconfWhich of the following commands shows network sockets and their allocated memory?
ss -mmpasmemfreeWhich option to the ss command shows the process IDs associated with the socket?
-l-a-p-fOn 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/networkWhich of the following characters are valid for hostnames in /etc/hosts?
Alphanumerics, minus, underscore, and dotAlphanumerics, minus, and dotAlphanumerics and dotAlphanumericsWhich of the following configuration lines in /etc/resolv.conf enables debugging?
debugoptions debugoption debugenable-debugThe 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-nWhich 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.cfggrub2-mkconfig --file=/boot/grub2.menugrub2-mkconfig --file=/boot/grub.lstgrub2-mkconfig --output=/boot/menu.lstWhich PXE Linux binary file is required for booting from HTTP or FTP?
lpxelinux.0pxelinux.httpnetpxlinux.0netpxe.0The 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.cfgWhich 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}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/dmesg.log/var/log/kern.log/var/log/bootlog.txtYou 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 NodesJavaScript Object NotationJava Standard Object NotationJavaScript Standard Object NotationYou 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 volumeBridged volumeContainer imagePersistent volumeWhen working with a network configuration, which of the following terms refers to a computer with two network interfaces?
BridgingDual-homedOverlayForwardingWhich of the following commands is used to change the keyboard layout settings?
keybrdctlkeyctllocalectllocalemapWhich 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?
e2labele4labelfslabel.ext4fslabelThe default format for an OVF template uses which document standard?
YMLXMLOVFMetaHTMLWhich 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.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.cfgWhich mode of network bonding is used for an active/passive configuration?
active-passiveactive-balanceactive-backupactive-backWhich command is used to install a kernel into the /boot directory, using the files from /usr/lib/kernel?
kernel-insins-kernelinstall-kernelkernel-installWhen 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?
VirtualSymbolicRelativeAbsoluteWhen 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 availableRedundantRaw devicePartition forwardWhich of the following values to LIBVIRT_DEBUG is used to enable debug logging for libvirt?
1234Which of the following describes the relationship between anaconda and kickstart?
Anaconda is used to script an installation, while kickstart is used to boot the system.Kickstart is used to script an installation, while anaconda is used to install the system.Anaconda is used to install the system, while kickstart is used to boot the system.Kickstart is used to install the system, while anaconda is used to boot the system.Which command can be used to determine how much time a Linux command takes?
timecmdtimetimeprocproctimeWhich type of storage would be the most appropriate format to store a large object as a single file in a cloud environment?
Blockext2cifsBlobWhich layer is used to enable client applications to work with disk devices in a standard way, regardless of disk architecture?
Virtual filesystemRedundant filesystemPhysical filesystemICEWhich of the following real filesystems can be resized using resize2fs?
nfsext2ext3cifsWhich subcommand to the virsh command is used to connect to the hypervisor?
plughypervisorconnectconhyperconnectYou 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--allWhich 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/mountsWhen 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 SharingCommon Internet File SystemCloned Internet File SharingCreated In Five SecondsWhen using cloud-init for deployment of an EC2 instance, which format should be used for the configuration files?
XMLYAMLHTMLJSWhich option to the blkid command purges the cache to remove devices that do not exist?
-p-a-g-mWhile you can use blkid to obtain the UUIDs for filesystems, which location on the filesystem also shows this information?
/dev/diskbyuuid/dev/uuid/dev/fs/uuid/dev/disk/by-uuidIn 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/netdevYou are building a configuration that requires bonded-link aggregation on the Linux server. Which protocol should the switch support in order to take advantage of aggregation?
802.11LACPLinkAG802.3agWhich of the vmm (virt-manager) tools is used to install a virtual machine?
virt-installvm-installinstall-virtvirt-launchWhen checking filesystems with the fsck command, which option skips checking of the root filesystem?
-A-M-R-SWhich type of virtualization hypervisor is considered a Type 1 hypervisor?
Bare-metalHostedHypervisor on LinuxVirtualized cloudWhich file contains the current list of partitions along with their major and minor numbers and number of blocks?
/dev/disk/dev/partitions/proc/disk/proc/partitionsAssuming 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/statWhich of the following best describes an OVA file?
It is a virtualization appliance file.It is an open virtualization configuration file in YAML format.It is an open virtualized application file.It is an open virtual asset.Files found within the /etc/netplan directory should be formatted using which syntax?
JSONYAMLXMLKey=ValueWhen 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-shWhen using a multipath device, found in /dev/disk/by-multipath, what is the name given to the identifier for that device that is globally unique?
UUIDWWIDGUIDDISKIDWhich of the following is not a valid option for booting when using kickstart?
CD-ROMNFSHTTPSFTPWhich of the following modes are used for load balancing in a bonding scenario on Linux?
balancelbbalance-rrbalance-loadWhile troubleshooting a kernel issue 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-FWhich option to rmmod forces the module to be unloaded?
-f-a-w-hWhich command-line option modifies the behavior of depmod such that only newer modules are added when comparing modules.dep?
-A-B-C-DWhich command prints device and partition information in a tree-like structure, including partition size and current mount status?
fscklsblkblkshowshblkYou 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-vWhich command is used to create an ethernet bridge?
bridgeconbrctlbridgemanBridgeManagerWhich file is used to maintain the configuration for DHCP?
/etc/dhcpd.conf/etc/DHCP.cfg/etc/DHCPconf.txt/sys/dhcp.confYou are working with a network interface called ens3 and would like to determine which driver is being used for this device. Which command is valid for this purpose?
ip list ens3netstat ens3ethtool -i ens3ethlist ens3When using nslookup interactively, which of the following commands changes the destination to which queries will be sent?
destserverqueryhostdestination