CompTIA Linux+ Practice Tests: Exam XK0-005 (2022)
Ace your certification with CompTIA Linux+ Practice Tests: Exam XK0-005 (2022), packed with essential study resources.
David Rodriguez
Contributor
4.4
85
about 2 months ago
Preview (31 of 275)
Sign in to access the full document!
Loading page 4...
Loading page 5...
CompTIA®
Linux+™
Practice Tests
Exam XK0-005
Third Edition
Steve Suehring
Linux+™
Practice Tests
Exam XK0-005
Third Edition
Steve Suehring
Loading page 6...
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
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
Loading page 7...
Acknowledgments
Thank you to Kenyon Brown, Kim Wimpsett, and the team responsible for bringing this title
to and through the publication process.
Thank you to Kenyon Brown, Kim Wimpsett, and the team responsible for bringing this title
to and through the publication process.
Loading page 8...
Loading page 9...
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.
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.
Loading page 10...
Loading page 11...
Contents
Introduction xi
Chapter 1 System Management (Domain 1.0) 1
Chapter 2 System Operations and Maintenance
(Domain 2.0) 49
Chapter 3 Scripting, Containers, and Automation
(Domain 3.0) 83
Chapter 4 Troubleshooting (Domain 4.0) 113
Chapter 5 Practice Exam 157
Appendix Answers to the Review Questions175
Chapter 1: System Management (Domain 1.0) 176
Chapter 2: System Operations and Maintenance (Domain 2.0) 197
Chapter 3: Scripting, Containers, and Automation (Domain 3.0) 211
Chapter 4: Troubleshooting (Domain 4.0) 224
Chapter 5: Practice Exam 241
Index 249
Introduction xi
Chapter 1 System Management (Domain 1.0) 1
Chapter 2 System Operations and Maintenance
(Domain 2.0) 49
Chapter 3 Scripting, Containers, and Automation
(Domain 3.0) 83
Chapter 4 Troubleshooting (Domain 4.0) 113
Chapter 5 Practice Exam 157
Appendix Answers to the Review Questions175
Chapter 1: System Management (Domain 1.0) 176
Chapter 2: System Operations and Maintenance (Domain 2.0) 197
Chapter 3: Scripting, Containers, and Automation (Domain 3.0) 211
Chapter 4: Troubleshooting (Domain 4.0) 224
Chapter 5: Practice Exam 241
Index 249
Loading page 12...
Loading page 13...
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 ques-
tions 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 req-
uisite 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 ques-
tions 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.
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 ques-
tions 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 req-
uisite 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 ques-
tions 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.
Loading page 14...
xii Introduction
Like all exams, the Linux+ certification from CompTIA is updated peri-
odically 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.”
Like all exams, the Linux+ certification from CompTIA is updated peri-
odically 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.”
Loading page 15...
System Management
(Domain 1.0)
Chapter
1
(Domain 1.0)
Chapter
1
Loading page 16...
2 Chapter 1 ■ System Management (Domain 1.0)
1. Which command is used to load a module and its dependencies automatically?
A. modprobe
B. lsmod
C. insmod
D. rmmod
2. Which option given at boot time within the GRUB2 boot entry configuration will boot the
system into single-user mode?
A. single-user
B. su
C. single
D. root
3. What is the command to display the default target on a computer running systemd?
A. systemctl defaults
B. update-rc.d defaults
C. systemctl runlevel
D. systemctl get-default
4. Which command is used to obtain a list of USB devices?
A. usb-list
B. lsusb
C. ls-usb
D. ls --usb
5. Which command can be used to obtain a list of currently loaded kernel modules?
A. insmod
B. modlist
C. ls ––modules
D. lsmod
6. When running with a Unified Extensible Firmware Interface (UEFI) system, to which parti-
tion will the EFI system partition typically be mounted?
A. /etc/efi
B. /efi
C. /sys/efi
D. /boot/efi
1. Which command is used to load a module and its dependencies automatically?
A. modprobe
B. lsmod
C. insmod
D. rmmod
2. Which option given at boot time within the GRUB2 boot entry configuration will boot the
system into single-user mode?
A. single-user
B. su
C. single
D. root
3. What is the command to display the default target on a computer running systemd?
A. systemctl defaults
B. update-rc.d defaults
C. systemctl runlevel
D. systemctl get-default
4. Which command is used to obtain a list of USB devices?
A. usb-list
B. lsusb
C. ls-usb
D. ls --usb
5. Which command can be used to obtain a list of currently loaded kernel modules?
A. insmod
B. modlist
C. ls ––modules
D. lsmod
6. When running with a Unified Extensible Firmware Interface (UEFI) system, to which parti-
tion will the EFI system partition typically be mounted?
A. /etc/efi
B. /efi
C. /sys/efi
D. /boot/efi
Loading page 17...
Chapter 1 ■ System Management (Domain 1.0) 3
7. Assuming that a USB disk contains a single partition and is made available on /dev/sdb,
which command mounts the disk in /media/usb?
A. mount /dev/sdb1 /media/usb
B. usbconnect /dev/sdb0 /media/usb
C. mount /dev/sdb0 /media/usb
D. usbmount /dev/sdb1 /media/usb
8. What is one reason a device driver does not appear in the output of lsmod, even though the
device is loaded and working properly?
A. The use of systemd means drivers are not required for most devices.
B. The use of an initrd.img means support is enabled by default.
C. The system does not need a driver for the device.
D. Support for the device has been compiled directly into the kernel.
9. Which option to rmmod will cause the module to wait until it’s no longer in use to unload
the module?
A. -test
B. -b
C. -w
D. -unload
10. Which command will output a new GRUB configuration file and send the output to the
correct location for booting?
A. update-grub
B. update-grub boot > /boot/grub.cfg
C. grub-rc.d
D. grub-boot
11. What is the maximum number of primary partitions available on an MBR partition-
ing system?
A. Two
B. Four
C. One
D. Five
12. When working with disk partitions through a tool like fdisk, you see the type 0x82. Which
type of partition is this?
A. Linux
B. Linux swap
C. NTFS
D. FAT
7. Assuming that a USB disk contains a single partition and is made available on /dev/sdb,
which command mounts the disk in /media/usb?
A. mount /dev/sdb1 /media/usb
B. usbconnect /dev/sdb0 /media/usb
C. mount /dev/sdb0 /media/usb
D. usbmount /dev/sdb1 /media/usb
8. What is one reason a device driver does not appear in the output of lsmod, even though the
device is loaded and working properly?
A. The use of systemd means drivers are not required for most devices.
B. The use of an initrd.img means support is enabled by default.
C. The system does not need a driver for the device.
D. Support for the device has been compiled directly into the kernel.
9. Which option to rmmod will cause the module to wait until it’s no longer in use to unload
the module?
A. -test
B. -b
C. -w
D. -unload
10. Which command will output a new GRUB configuration file and send the output to the
correct location for booting?
A. update-grub
B. update-grub boot > /boot/grub.cfg
C. grub-rc.d
D. grub-boot
11. What is the maximum number of primary partitions available on an MBR partition-
ing system?
A. Two
B. Four
C. One
D. Five
12. When working with disk partitions through a tool like fdisk, you see the type 0x82. Which
type of partition is this?
A. Linux
B. Linux swap
C. NTFS
D. FAT
Loading page 18...
4 Chapter 1 ■ System Management (Domain 1.0)
13. Which file should you edit when using GRUB2 in order to define or set options like
the timeout?
A. /etc/default/grub
B. /etc/grub/boot
C. /etc/boot/grub.d
D. /grub.d/boot
14. Which option for the grub2-mkconfig command sends output to a file instead of STDOUT?
A. -stdout
B. --fileout
C. -o
D. -f
15. Of the following choices, which size would be most appropriate for the /boot partition of a
Linux system?
A. At least 1 GB.
B. Between 100 MB and 200 MB.
C. /boot should not be partitioned separately.
D. Less than 5 MB.
16. Which of the following commands initializes a physical disk partition for use with LVM?
A. lvmcreate
B. pvcreate
C. vgextend
D. pvs
17. Which of the following commands installs GRUB into the MBR of the second SATA disk?
A. grub2-install /dev/hdb2
B. grub2-install /dev/sda2
C. grub2-config /dev/sda
D. grub2-install /dev/sdb
18. Which command is used to create a logical volume with LVM?
A. pvcreate
B. lvmcreate
C. lvcreate
D. volcreate
19. What is the logical order for creation of an LVM logical volume?
A. Physical volume creation, volume group creation, logical volume creation
B. Physical volume creation, logical volume creation, volume group creation
C. Logical volume creation, physical volume creation, volume group creation
D. LVM creation, format, partition
13. Which file should you edit when using GRUB2 in order to define or set options like
the timeout?
A. /etc/default/grub
B. /etc/grub/boot
C. /etc/boot/grub.d
D. /grub.d/boot
14. Which option for the grub2-mkconfig command sends output to a file instead of STDOUT?
A. -stdout
B. --fileout
C. -o
D. -f
15. Of the following choices, which size would be most appropriate for the /boot partition of a
Linux system?
A. At least 1 GB.
B. Between 100 MB and 200 MB.
C. /boot should not be partitioned separately.
D. Less than 5 MB.
16. Which of the following commands initializes a physical disk partition for use with LVM?
A. lvmcreate
B. pvcreate
C. vgextend
D. pvs
17. Which of the following commands installs GRUB into the MBR of the second SATA disk?
A. grub2-install /dev/hdb2
B. grub2-install /dev/sda2
C. grub2-config /dev/sda
D. grub2-install /dev/sdb
18. Which command is used to create a logical volume with LVM?
A. pvcreate
B. lvmcreate
C. lvcreate
D. volcreate
19. What is the logical order for creation of an LVM logical volume?
A. Physical volume creation, volume group creation, logical volume creation
B. Physical volume creation, logical volume creation, volume group creation
C. Logical volume creation, physical volume creation, volume group creation
D. LVM creation, format, partition
Loading page 19...
Chapter 1 ■ System Management (Domain 1.0) 5
20. Which command should be run after making a change to the /etc/default/grub file?
A. grub
B. grub-mkconfig
C. grub-inst
D. reboot
21. Which command is used to change details of a logical volume?
A. lvmcreate
B. pvcreate
C. lvchange
D. lvmscan
22. 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?
A. /dev/hdb2
B. /dev/hda0
C. /dev/disk1
D. /dev/sda1
23. Which of the following commands installs GRUB into the master boot record (MBR) of the
first SATA drive?
A. grub-install /dev/hda
B. grub-install /dev/sda
C. grub-install /dev/hd0,0
D. grub -i /dev/hda
24. Which option given to a yum command will install a given package?
A. update
B. configure
C. install
D. get
25. After a new hard drive is inserted into the system, what is the correct order to make the drive
ready for use within Linux?
A. Use fdisk to create partitions, and then mount the partitions.
B. Mount the partitions.
C. Use fdisk to create partitions and mount -a to mount all the newly created partitions.
D. Use fdisk to create partitions, then format the partitions using a command such as
mkfs, and then mount the partitions.
20. Which command should be run after making a change to the /etc/default/grub file?
A. grub
B. grub-mkconfig
C. grub-inst
D. reboot
21. Which command is used to change details of a logical volume?
A. lvmcreate
B. pvcreate
C. lvchange
D. lvmscan
22. 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?
A. /dev/hdb2
B. /dev/hda0
C. /dev/disk1
D. /dev/sda1
23. Which of the following commands installs GRUB into the master boot record (MBR) of the
first SATA drive?
A. grub-install /dev/hda
B. grub-install /dev/sda
C. grub-install /dev/hd0,0
D. grub -i /dev/hda
24. Which option given to a yum command will install a given package?
A. update
B. configure
C. install
D. get
25. After a new hard drive is inserted into the system, what is the correct order to make the drive
ready for use within Linux?
A. Use fdisk to create partitions, and then mount the partitions.
B. Mount the partitions.
C. Use fdisk to create partitions and mount -a to mount all the newly created partitions.
D. Use fdisk to create partitions, then format the partitions using a command such as
mkfs, and then mount the partitions.
Loading page 20...
6 Chapter 1 ■ System Management (Domain 1.0)
26. When working with an rpm package file and using rpm2cpio, by default the output is sent to
which location?
A. STDOUT
B. The file cpio.out
C. The file a.out
D. The file /tmp/cpi.out
27. Which of the following describes a primary difference between ext2 and ext3 filesystems?
A. ext3 was primarily a bug-fix update to ext2.
B. ext3 includes journaling for the filesystem.
C. ext3 completely changed the tools needed for management of the disks.
D. ext3 has no significant differences.
28. According to the Filesystem Hierarchy Standard (FHS), what is the correct location for add-
on application software packages?
A. /etc
B. /var
C. /tmp
D. /opt
29. Which option to the mount command will mount all filesystems that are currently available
in /etc/fstab?
A. -f
B. -d
C. -a
D. -m
30. Which option of the systemctl command will change a service so that it runs on the next boot
of the system?
A. enable
B. startonboot
C. loadonboot
D. start
31. Which option to xfs_metadump displays a progress indicator?
A. -g
B. -p
C. -f
D. -v
26. When working with an rpm package file and using rpm2cpio, by default the output is sent to
which location?
A. STDOUT
B. The file cpio.out
C. The file a.out
D. The file /tmp/cpi.out
27. Which of the following describes a primary difference between ext2 and ext3 filesystems?
A. ext3 was primarily a bug-fix update to ext2.
B. ext3 includes journaling for the filesystem.
C. ext3 completely changed the tools needed for management of the disks.
D. ext3 has no significant differences.
28. According to the Filesystem Hierarchy Standard (FHS), what is the correct location for add-
on application software packages?
A. /etc
B. /var
C. /tmp
D. /opt
29. Which option to the mount command will mount all filesystems that are currently available
in /etc/fstab?
A. -f
B. -d
C. -a
D. -m
30. Which option of the systemctl command will change a service so that it runs on the next boot
of the system?
A. enable
B. startonboot
C. loadonboot
D. start
31. Which option to xfs_metadump displays a progress indicator?
A. -g
B. -p
C. -f
D. -v
Loading page 21...
Chapter 1 ■ System Management (Domain 1.0) 7
32. 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 con-
tain large files?
A. du
B. df
C. ls
D. locate
33. Which file contains information about the filesystems to mount, their partitions, and the
options that should be used to mount them?
A. /etc/filesystems
B. /etc/mounts
C. /etc/fstab
D. systemd.mount
34. According to the FHS, what is the proper mount point for removable media?
A. /etc
B. /srv
C. /tmp
D. /media
35. How many SCSI devices are supported per bus?
A. 7 to 15
B. 2 to 4
C. 12
D. 4
36. Which option to umount will cause the command to attempt to remount the filesystem in
read-only mode if the unmounting process fails?
A. -o
B. -r
C. -f
D. -v
37. Which of the following represents the correct format for the /etc/fstab file?
A. <directory> <device> <type> <options>
B. <device> <type> <options>
C. <device> <type> <options> <directory> <dump> <fsck>
D. <device> <directory> <type> <options> <dump> <fsck>
32. 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 con-
tain large files?
A. du
B. df
C. ls
D. locate
33. Which file contains information about the filesystems to mount, their partitions, and the
options that should be used to mount them?
A. /etc/filesystems
B. /etc/mounts
C. /etc/fstab
D. systemd.mount
34. According to the FHS, what is the proper mount point for removable media?
A. /etc
B. /srv
C. /tmp
D. /media
35. How many SCSI devices are supported per bus?
A. 7 to 15
B. 2 to 4
C. 12
D. 4
36. Which option to umount will cause the command to attempt to remount the filesystem in
read-only mode if the unmounting process fails?
A. -o
B. -r
C. -f
D. -v
37. Which of the following represents the correct format for the /etc/fstab file?
A. <directory> <device> <type> <options>
B. <device> <type> <options>
C. <device> <type> <options> <directory> <dump> <fsck>
D. <device> <directory> <type> <options> <dump> <fsck>
Loading page 22...
8 Chapter 1 ■ System Management (Domain 1.0)
38. Which of the following commands is used to identify the UUID for partitions?
A. blkid
B. partprobe
C. find
D. cat
39. The xfs_info command is functionally equivalent to which command and option?
A. xfs_test -n
B. xfs_list
C. tunexfs -i
D. xfs_growfs -n
40. Which of the following commands will create a btrfs filesystem on the first SATA drive?
A. mkfs /dev/sda1
B. mkfs.btrfs /dev/sda
C. mkfs.btr2fs /dev/sda1
D. mkfs –b /dev/sda
41. Which command and option can be used to determine whether a given service is cur-
rently loaded?
A. systemctl ––ls
B. telinit
C. systemctl status
D. sysctl -a
42. 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?
A. resize2fs
B. parted
C. mkfs
D. rfdisk
43. 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?
A. mount -t vfat /dev/sdb1 /mnt
B. usbmount /dev/sdb1 /mnt/usb
C. mount -t vfat /dev/sdb1 /mnt/usb
D. mount -t usb /dev/sdb1 /mnt/usb
38. Which of the following commands is used to identify the UUID for partitions?
A. blkid
B. partprobe
C. find
D. cat
39. The xfs_info command is functionally equivalent to which command and option?
A. xfs_test -n
B. xfs_list
C. tunexfs -i
D. xfs_growfs -n
40. Which of the following commands will create a btrfs filesystem on the first SATA drive?
A. mkfs /dev/sda1
B. mkfs.btrfs /dev/sda
C. mkfs.btr2fs /dev/sda1
D. mkfs –b /dev/sda
41. Which command and option can be used to determine whether a given service is cur-
rently loaded?
A. systemctl ––ls
B. telinit
C. systemctl status
D. sysctl -a
42. 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?
A. resize2fs
B. parted
C. mkfs
D. rfdisk
43. 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?
A. mount -t vfat /dev/sdb1 /mnt
B. usbmount /dev/sdb1 /mnt/usb
C. mount -t vfat /dev/sdb1 /mnt/usb
D. mount -t usb /dev/sdb1 /mnt/usb
Loading page 23...
Chapter 1 ■ System Management (Domain 1.0) 9
44. Which option within gdisk will change the partition name?
A. n
B. b
C. v
D. c
45. Which command on a systemd-controlled system would place the system into
single-user mode?
A. systemctl stop
B. systemctl isolate rescue.target
C. systemctl single-user
D. systemctl runlevel one
46. Which options to fsck can be used to check all filesystems listed in /etc/fstab while excluding
the root partition?
A. -NR
B. -AR
C. -X
D. -C
47. Which option in /etc/fstab sets the order in which the device is checked at boot time?
A. options
B. dump
C. fsck
D. checkorder
48. Which file is used to indicate the local time zone on a Linux server?
A. /etc/timez
B. /etc/timezoneconfig
C. /etc/timezone
D. /etc/localtz
49. Within which directory will you find files related to the time zone for various regions?
A. /etc/timezoneinfo
B. /etc/zoneinfo
C. /var/zoneinfo
D. /usr/share/zoneinfo
44. Which option within gdisk will change the partition name?
A. n
B. b
C. v
D. c
45. Which command on a systemd-controlled system would place the system into
single-user mode?
A. systemctl stop
B. systemctl isolate rescue.target
C. systemctl single-user
D. systemctl runlevel one
46. Which options to fsck can be used to check all filesystems listed in /etc/fstab while excluding
the root partition?
A. -NR
B. -AR
C. -X
D. -C
47. Which option in /etc/fstab sets the order in which the device is checked at boot time?
A. options
B. dump
C. fsck
D. checkorder
48. Which file is used to indicate the local time zone on a Linux server?
A. /etc/timez
B. /etc/timezoneconfig
C. /etc/timezone
D. /etc/localtz
49. Within which directory will you find files related to the time zone for various regions?
A. /etc/timezoneinfo
B. /etc/zoneinfo
C. /var/zoneinfo
D. /usr/share/zoneinfo
Loading page 24...
10 Chapter 1 ■ System Management (Domain 1.0)
50. Which option best describes the following, gathered with the ls -la command?
lrwxrwxrwx. 1 root root 35 Jul 8 2014
.fetchmailrc -> .configs/fetchmail/.fetchmailrc
A. It is a file called .fetchmailrc that is linked using a symbolic link.
B. It is a file called .configs/fetchmail/.fetchmailrc that is owned by lrwxrwxrwx.
C. It is a directory called .fetchmailrc that is owned by user Jul.
D. It is a local directory called .configs/fetchmail/.fetchmailrc.
51. Which environment variable controls the format of dates and times, such as a 12-hour or
24-hour formatted clock?
A. LOCALE_DATE
B. DATE_FORMAT
C. LC_TIME
D. LC_DATE
52. Which of the following encodings provides a multibyte representation of characters?
A. ISO-8859
B. UTF-8
C. ISO-L
D. UFTMulti
53. Which command can be used to view the available time zones on a system?
A. tzd
B. /etc/locale
C. timedatectl
D. tzsel
54. Which option to lspci is used to display both numeric codes and device names?
A. -numdev
B. -n
C. -nn
D. -devnum
55. Which of the following values for the LANG variable will configure the system to bypass
locale translations where possible?
A. LANG=COMPAT
B. LANG=NONE
C. LANG=C
D. LANG=END
50. Which option best describes the following, gathered with the ls -la command?
lrwxrwxrwx. 1 root root 35 Jul 8 2014
.fetchmailrc -> .configs/fetchmail/.fetchmailrc
A. It is a file called .fetchmailrc that is linked using a symbolic link.
B. It is a file called .configs/fetchmail/.fetchmailrc that is owned by lrwxrwxrwx.
C. It is a directory called .fetchmailrc that is owned by user Jul.
D. It is a local directory called .configs/fetchmail/.fetchmailrc.
51. Which environment variable controls the format of dates and times, such as a 12-hour or
24-hour formatted clock?
A. LOCALE_DATE
B. DATE_FORMAT
C. LC_TIME
D. LC_DATE
52. Which of the following encodings provides a multibyte representation of characters?
A. ISO-8859
B. UTF-8
C. ISO-L
D. UFTMulti
53. Which command can be used to view the available time zones on a system?
A. tzd
B. /etc/locale
C. timedatectl
D. tzsel
54. Which option to lspci is used to display both numeric codes and device names?
A. -numdev
B. -n
C. -nn
D. -devnum
55. Which of the following values for the LANG variable will configure the system to bypass
locale translations where possible?
A. LANG=COMPAT
B. LANG=NONE
C. LANG=C
D. LANG=END
Loading page 25...
Chapter 1 ■ System Management (Domain 1.0) 11
56. If you need to temporarily reconfigure all locale variables and settings for a given session,
which environment variable can be used?
A. LC_LIST
B. LC_GLOBAL
C. LC_ALL
D. ALL_LOCALE
57. Which of the following commands will set the systemwide time zone to 'America/
Los_Angeles'?
A. ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
B. ln -sf America/Los_Angeles ; /etc/localtime
C. ln -sd /etc/localtime /usr/share/timezone/America/Los_Angeles
D. ln -sf /etc/localtime /usr/share/zoneinfo/America/Los_Angeles
58. Which locale-related variable is used for currency-related localization?
A. LC_MONE
B. LC_CURRENCY
C. LC_MONETARY
D. LC_CURR
59. Which command is used to query and work with the hardware clock on the system?
A. hwc
B. ntpdate
C. systime
D. hwclock
60. Which option to the date command can be used to set the date and time?
A. date -f
B. date -t
C. date --change
D. date -s
61. Which function of the hwclock command will set the hardware or BIOS clock to the current
system time?
A. -w
B. -s
C. -a
D. -m
56. If you need to temporarily reconfigure all locale variables and settings for a given session,
which environment variable can be used?
A. LC_LIST
B. LC_GLOBAL
C. LC_ALL
D. ALL_LOCALE
57. Which of the following commands will set the systemwide time zone to 'America/
Los_Angeles'?
A. ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
B. ln -sf America/Los_Angeles ; /etc/localtime
C. ln -sd /etc/localtime /usr/share/timezone/America/Los_Angeles
D. ln -sf /etc/localtime /usr/share/zoneinfo/America/Los_Angeles
58. Which locale-related variable is used for currency-related localization?
A. LC_MONE
B. LC_CURRENCY
C. LC_MONETARY
D. LC_CURR
59. Which command is used to query and work with the hardware clock on the system?
A. hwc
B. ntpdate
C. systime
D. hwclock
60. Which option to the date command can be used to set the date and time?
A. date -f
B. date -t
C. date --change
D. date -s
61. Which function of the hwclock command will set the hardware or BIOS clock to the current
system time?
A. -w
B. -s
C. -a
D. -m
Loading page 26...
12 Chapter 1 ■ System Management (Domain 1.0)
62. Which of the following commands sets the hardware or BIOS clock to UTC based on the
current system time?
A. hwclock --systohc --utc
B. hwclock --systohc --localtime
C. hwclock --systohc
D. hwclock --systoutc
63. Which of the following commands shows the current default route without performing DNS
lookups on the IP address(es) involved?
A. netstat -rn
B. netstat -n
C. netstat -r
D. netstat -f
64. A Serial ATA (SATA) disk will use which of the following identifiers?
A. /dev/hdX
B. /dev/sataX
C. /dev/sdX
D. /disk/sataX
65. Which of the following commands adds a default gateway of 192.168.1.1 for interface eth0?
A. route add default gateway 192.168.1.1 eth0
B. eth0 --dg 192.168.1.1
C. route add default gw 192.168.1.1 eth0
D. route define eth0 192.168.1.1
66. Which option for the host command will query for the authoritative name servers for a
given domain?
A. -t ns
B. -t all
C. -ns
D. -named
67. Which option for the ping command enables you to choose the interface from which the
ICMP packets will be generated?
A. -i
B. -I
C. -t
D. -a
62. Which of the following commands sets the hardware or BIOS clock to UTC based on the
current system time?
A. hwclock --systohc --utc
B. hwclock --systohc --localtime
C. hwclock --systohc
D. hwclock --systoutc
63. Which of the following commands shows the current default route without performing DNS
lookups on the IP address(es) involved?
A. netstat -rn
B. netstat -n
C. netstat -r
D. netstat -f
64. A Serial ATA (SATA) disk will use which of the following identifiers?
A. /dev/hdX
B. /dev/sataX
C. /dev/sdX
D. /disk/sataX
65. Which of the following commands adds a default gateway of 192.168.1.1 for interface eth0?
A. route add default gateway 192.168.1.1 eth0
B. eth0 --dg 192.168.1.1
C. route add default gw 192.168.1.1 eth0
D. route define eth0 192.168.1.1
66. Which option for the host command will query for the authoritative name servers for a
given domain?
A. -t ns
B. -t all
C. -ns
D. -named
67. Which option for the ping command enables you to choose the interface from which the
ICMP packets will be generated?
A. -i
B. -I
C. -t
D. -a
Loading page 27...
Chapter 1 ■ System Management (Domain 1.0) 13
68. Which of the following commands queries for the mail servers for the domain example.com?
A. dig example.com mx
B. dig example.com
C. host -t smtp example.com
D. dig example.com smtp
69. Which of the following addresses represents the localhost in IPv6, such as you might find in
/etc/hosts?
A. 0:1
B. ::1
C. 127:0:1
D. :127:0:0:1
70. Which command can be used to listen for netlink messages on a network?
A. ip monitor
B. netlink -a
C. ip netlink
D. route
71. 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?
A. group: files ldap
B. lookup: group [local ldap]
C. group: [local ldap]
D. group: localfiles ldap
72. 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?
A. dig example.com @192.168.2.5
B. dig -t 192.168.2.5 example.com
C. dig -s 192.168.2.5 example.com
D. dig server=192.168.2.5 example.com
73. Which of the following commands will enumerate the hosts database?
A. getent hosts
B. gethosts
C. nslookup
D. host
68. Which of the following commands queries for the mail servers for the domain example.com?
A. dig example.com mx
B. dig example.com
C. host -t smtp example.com
D. dig example.com smtp
69. Which of the following addresses represents the localhost in IPv6, such as you might find in
/etc/hosts?
A. 0:1
B. ::1
C. 127:0:1
D. :127:0:0:1
70. Which command can be used to listen for netlink messages on a network?
A. ip monitor
B. netlink -a
C. ip netlink
D. route
71. 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?
A. group: files ldap
B. lookup: group [local ldap]
C. group: [local ldap]
D. group: localfiles ldap
72. 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?
A. dig example.com @192.168.2.5
B. dig -t 192.168.2.5 example.com
C. dig -s 192.168.2.5 example.com
D. dig server=192.168.2.5 example.com
73. Which of the following commands will enumerate the hosts database?
A. getent hosts
B. gethosts
C. nslookup
D. host
Loading page 28...
14 Chapter 1 ■ System Management (Domain 1.0)
74. Which of the following configuration lines will set the DNS server to 192.168.1.4 using /etc/
resolv.conf?
A. dns 192.168.1.4
B. dns-server 192.168.1.4
C. nameserver 192.168.1.4
D. name-server 192.168.1.4
75. 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?
A. route add -net 192.168.51.0 netmask 255.255.255.0 gw 192.168.22.1
B. route add -net 192.168.51/24 gw 192.168.22.51
C. route -net 192.168.51.0/24 192.168.22.1
D. route add 192.168.51.1 -n 192.168.22.0//255.255.255.0
76. Which of the following commands shows network services or sockets that are currently
listening along with sockets that are not listening?
A. netstat -a
B. netlink -a
C. sockets -f
D. opensock -l
77. 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?
A. /etc
B. /usr/bin
C. /mail
D. /var
78. Which of the following commands will change the default gateway to 192.168.1.1
using eth0?
A. ip route default gw 192.168.1.1
B. ip route change default via 192.168.1.1 dev eth0
C. ip route default gw update 192.168.1.1
D. ip route update default 192.168.1.1 eth0
79. Which of the following commands displays the Start of Authority information for the
domain example.com?
A. dig example.com soa
B. dig example.com authority
C. dig example.com -auth
D. dig -t auth example.com
74. Which of the following configuration lines will set the DNS server to 192.168.1.4 using /etc/
resolv.conf?
A. dns 192.168.1.4
B. dns-server 192.168.1.4
C. nameserver 192.168.1.4
D. name-server 192.168.1.4
75. 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?
A. route add -net 192.168.51.0 netmask 255.255.255.0 gw 192.168.22.1
B. route add -net 192.168.51/24 gw 192.168.22.51
C. route -net 192.168.51.0/24 192.168.22.1
D. route add 192.168.51.1 -n 192.168.22.0//255.255.255.0
76. Which of the following commands shows network services or sockets that are currently
listening along with sockets that are not listening?
A. netstat -a
B. netlink -a
C. sockets -f
D. opensock -l
77. 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?
A. /etc
B. /usr/bin
C. /mail
D. /var
78. Which of the following commands will change the default gateway to 192.168.1.1
using eth0?
A. ip route default gw 192.168.1.1
B. ip route change default via 192.168.1.1 dev eth0
C. ip route default gw update 192.168.1.1
D. ip route update default 192.168.1.1 eth0
79. Which of the following commands displays the Start of Authority information for the
domain example.com?
A. dig example.com soa
B. dig example.com authority
C. dig example.com -auth
D. dig -t auth example.com
Loading page 29...
Chapter 1 ■ System Management (Domain 1.0) 15
80. 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?
A. search
B. domain
C. local-domain
D. local-order
81. Which of the following commands prevents traffic from reaching the host 192.168.1.3?
A. route add -host 192.168.1.3 reject
B. route -nullroute 192.168.1.3
C. route add -null 192.168.1.3
D. route add -block 192.168.1.3
82. 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?
A. ping -n 4
B. ping -t 4
C. ping -p 4
D. ping -c 4
83. 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?
A. Add a firewall entry for the IP address of www.example.com to prevent traffic from
passing through it.
B. Delete www.example.com from the route table using the route command.
C. Add a null route to prevent access to the IP address for www.example.com.
D. Add an entry for www.example.com in /etc/hosts to point to 127.0.0.1.
84. Which of the following commands should be executed after running ip route change?
A. ip route flush cache
B. ip route reload
C. ip route cache reload
D. ip route restart
85. Which option should be used to send a DNS query for an SPF record with dig?
A. -t txt
B. -t spf
C. -t mx
D. -t mailspf
80. 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?
A. search
B. domain
C. local-domain
D. local-order
81. Which of the following commands prevents traffic from reaching the host 192.168.1.3?
A. route add -host 192.168.1.3 reject
B. route -nullroute 192.168.1.3
C. route add -null 192.168.1.3
D. route add -block 192.168.1.3
82. 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?
A. ping -n 4
B. ping -t 4
C. ping -p 4
D. ping -c 4
83. 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?
A. Add a firewall entry for the IP address of www.example.com to prevent traffic from
passing through it.
B. Delete www.example.com from the route table using the route command.
C. Add a null route to prevent access to the IP address for www.example.com.
D. Add an entry for www.example.com in /etc/hosts to point to 127.0.0.1.
84. Which of the following commands should be executed after running ip route change?
A. ip route flush cache
B. ip route reload
C. ip route cache reload
D. ip route restart
85. Which option should be used to send a DNS query for an SPF record with dig?
A. -t txt
B. -t spf
C. -t mx
D. -t mailspf
Loading page 30...
16 Chapter 1 ■ System Management (Domain 1.0)
86. 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?
A. The G signifies that the route is good.
B. The G signifies that the route is unavailable.
C. The G signifies that this is a gateway.
D. The G signifies that the route is an aggregate.
87. Which of the following commands requests a zone transfer of example.org from the server at
192.168.1.4?
A. dig example.org @192.168.1.4 axfr
B. dig example.org @192.168.1.4
C. dig example.org @192.168.1.4 xfer
D. dig example.org #192.168.1.4 xfer
88. Which yum option displays the dependencies for the package specified?
A. list
B. deplist
C. dependencies
D. listdeps
89. Which of the following commands can be used to display the current disk utilization?
A. df
B. du
C. diskutil
D. diskuse
90. 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?
A. mkinitrd
B. mkramdisk
C. mkdisk --init
D. mkfs.init
91. Which of the following commands is used to display the currently loaded modules on a
running system?
A. ls -mod
B. lsmod
C. tree
D. mod --list
86. 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?
A. The G signifies that the route is good.
B. The G signifies that the route is unavailable.
C. The G signifies that this is a gateway.
D. The G signifies that the route is an aggregate.
87. Which of the following commands requests a zone transfer of example.org from the server at
192.168.1.4?
A. dig example.org @192.168.1.4 axfr
B. dig example.org @192.168.1.4
C. dig example.org @192.168.1.4 xfer
D. dig example.org #192.168.1.4 xfer
88. Which yum option displays the dependencies for the package specified?
A. list
B. deplist
C. dependencies
D. listdeps
89. Which of the following commands can be used to display the current disk utilization?
A. df
B. du
C. diskutil
D. diskuse
90. 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?
A. mkinitrd
B. mkramdisk
C. mkdisk --init
D. mkfs.init
91. Which of the following commands is used to display the currently loaded modules on a
running system?
A. ls -mod
B. lsmod
C. tree
D. mod --list
Loading page 31...
28 more pages available. Scroll down to load them.
Preview Mode
Sign in to access the full document!
100%
Study Now!
XY-Copilot AI
Unlimited Access
Secure Payment
Instant Access
24/7 Support
AI Assistant
Document Details
Subject
CompTIA Certifications