CompTIA XK0-006 Practice Test Questions and Exam Dumps Part 6: Q101–Q120

View Full CompTIA XK0-006 Exam Dumps and Practice Test Dumps.

 

Question 101

Which command is commonly used to create a new LVM physical volume from a disk or partition?

  1. pvcreate
  2. lvcreate
  3. vgcreate
  4. mkfs

Correct Answer: 1

Explanation

The pvcreate command prepares a disk or partition for use as an LVM physical volume. After creating the physical volume, an administrator can add it to a volume group with vgcreate or vgextend. Then logical volumes can be created with lvcreate. The physical volume is the lowest layer in the common LVM structure. Understanding these layers is important when managing flexible Linux storage because LVM allows administrators to resize and organize storage more easily than fixed partitions.

Question 102

Which LVM component combines one or more physical volumes into a storage pool?

  1. Logical volume
  2. Volume group
  3. Filesystem
  4. Mount point

Correct Answer: 2

Explanation

A volume group, or VG, combines one or more physical volumes into a larger storage pool. Logical volumes are then created from the available space inside the volume group. For example, several disks can be prepared with pvcreate, added to a volume group, and then used to create logical volumes. This layered design makes storage management flexible. Administrators can add physical volumes to a volume group when more capacity is needed, depending on the storage configuration and available space.

Question 103

Which command is used to create a new logical volume in an existing volume group?

  1. vgcreate
  2. pvcreate
  3. lvcreate
  4. lvmount

Correct Answer: 3

Explanation

The lvcreate command creates a logical volume from available space in an LVM volume group. A typical process is to create a physical volume, create or extend a volume group, and then create a logical volume. After the logical volume is created, it normally needs a filesystem before it can be used for regular file storage. Logical volumes are useful because they can provide more flexible storage management than traditional fixed disk partitions.

Question 104

Which command displays information about available block devices, including disks, partitions, and logical volumes?

  1. lsblk
  2. lsusb
  3. lspci
  4. lsmod

Correct Answer: 1

Explanation

The lsblk command displays information about block devices such as hard drives, SSDs, partitions, and some device-mapper or LVM devices. It presents the storage devices in a tree-like structure, which makes relationships between disks and partitions easier to understand. This command is especially useful when troubleshooting storage or identifying the correct device before mounting, partitioning, or creating filesystems. Administrators should carefully verify device names before performing destructive storage operations.

Question 105

Which command is commonly used to extend an existing LVM logical volume?

  1. lvremove
  2. lvextend
  3. pvremove
  4. vgremove

Correct Answer: 2

Explanation

The lvextend command increases the size of an existing LVM logical volume. After extending the logical volume, the filesystem may also need to be expanded so that it can use the newly available space. The exact filesystem command depends on the filesystem type. For example, ext4 can commonly be expanded with resize2fs, while XFS uses xfs_growfs. Administrators should check the filesystem and available space before resizing to avoid mistakes.

Question 106

Which command is commonly used to create an ext4 filesystem on a device?

  1. mount
  2. mkfs.ext4
  3. fsck.ext4
  4. resize2fs

Correct Answer: 2

Explanation

The mkfs.ext4 command creates an ext4 filesystem on a specified block device. For example, an administrator might use it when preparing a new partition or logical volume for storage. This operation initializes the filesystem structure, so it should only be performed on the correct device because existing data can be destroyed. fsck.ext4 is used for checking and repairing an ext4 filesystem, while resize2fs is used for resizing ext-family filesystems.

Question 107

Which filesystem is known for using a copy-on-write design and supporting features such as snapshots?

  1. ext2
  2. ext3
  3. Btrfs
  4. FAT32

Correct Answer: 3

Explanation

Btrfs is a modern Linux filesystem that uses copy-on-write technology. It provides features such as snapshots, subvolumes, checksums, and flexible storage management. These capabilities can be useful for system administration and recovery tasks. Copy-on-write means that existing data is not immediately overwritten when changes occur; new data can be written elsewhere and filesystem metadata updated accordingly. Btrfs has a different feature set from traditional filesystems such as ext3 and ext4.

Question 108

Which command can be used to view the current filesystem mounts and their associated devices?

  1. mount
  2. chmod
  3. passwd
  4. useradd

Correct Answer: 1

Explanation

Running mount without arguments commonly displays currently mounted filesystems and information about their devices and mount points. This is useful when checking whether a filesystem is mounted correctly or investigating storage problems. Administrators can compare this information with /etc/fstab when troubleshooting persistent mounts. Other commands can provide similar information, such as findmnt, but mount remains a common and important Linux command for understanding mounted filesystems.

Question 109

What is the main purpose of the nofail option in /etc/fstab?

  1. It encrypts the filesystem
  2. It prevents filesystem writes
  3. It allows boot to continue if the specified filesystem cannot be mounted
  4. It automatically formats the filesystem

Correct Answer: 3

Explanation

The nofail mount option tells the system that failure to mount that filesystem should not normally prevent the boot process from continuing. This can be useful for optional disks, removable storage, or devices that may not always be available. Without appropriate handling, a missing or unavailable filesystem listed in /etc/fstab can cause boot delays or failures. Administrators should use mount options carefully because incorrect filesystem configuration can affect system startup.

Question 110

Which command is commonly used to display NetworkManager connection information and manage network connections from the command line?

  1. nmcli
  2. netctl
  3. routecfg
  4. ipconfig

Correct Answer: 1

Explanation

nmcli is the command-line interface for NetworkManager. It can display network devices and connections and can also be used to create, modify, activate, or deactivate network configurations. It is especially useful on Linux systems that use NetworkManager for network management. For example, administrators can use it to inspect connection profiles, configure IP settings, or bring a connection up or down. Learning nmcli is valuable for managing modern Linux network environments without relying only on graphical tools.

Question 111

Which command can display the routing table on a modern Linux system?

  1. ip route
  2. ip user
  3. route-dns
  4. netstat-user

Correct Answer: 1

Explanation

The ip route command displays the kernel’s current routing table. The routing table tells Linux where packets should be sent based on their destination addresses. It can show entries for directly connected networks, gateways, and default routes. This command is useful when troubleshooting connectivity problems, especially when a system can communicate with local devices but cannot reach remote networks. Administrators should check routes carefully because an incorrect default gateway or missing route can cause network communication failures.

Question 112

Which protocol automatically provides IP configuration such as an IP address, subnet mask, gateway, and DNS server?

  1. DNS
  2. DHCP
  3. SSH
  4. NTP

Correct Answer: 2

Explanation

DHCP, or Dynamic Host Configuration Protocol, automatically provides network configuration to clients. Depending on the DHCP server configuration, a client can receive an IP address, subnet mask, default gateway, DNS server information, and lease details. This avoids manually configuring every device on a network. DHCP is commonly used on client systems and many server environments. When troubleshooting an address problem, administrators should verify that the DHCP service is reachable and that the client is requesting a valid lease.

Question 113

Which command can be used to query DNS records directly from a DNS server?

  1. dig
  2. chmod
  3. passwd
  4. lsmod

Correct Answer: 1

Explanation

The dig command is a powerful DNS troubleshooting tool. It can query DNS servers for records such as A, AAAA, MX, NS, and TXT records. Administrators can use it to determine whether DNS resolution is working and whether the expected server is returning the correct information. It also provides detailed output that can help identify problems with DNS configuration, delegation, or responses. Compared with a simple name lookup, dig provides more diagnostic information.

Question 114

Which Linux virtualization technology is commonly associated with KVM?

  1. Kernel-based virtualization
  2. Kernel Virtual Machine
  3. Key Verification Manager
  4. Kubernetes Virtual Module

Correct Answer: 2

Explanation

KVM stands for Kernel-based Virtual Machine. It is a Linux kernel virtualization technology that allows Linux to function as a hypervisor when the appropriate hardware virtualization support is available. KVM is commonly used with tools such as QEMU to run virtual machines. Virtualization allows multiple guest operating systems to run on a physical host. Linux administrators should understand basic KVM concepts because virtual machines are widely used in servers, testing environments, cloud platforms, and development systems.

Question 115

Which command is commonly used to install a package on a Debian-based Linux system?

  1. rpm -i
  2. dpkg -r
  3. apt install
  4. tar -x

Correct Answer: 3

Explanation

apt install is commonly used to install packages on Debian-based distributions such as Debian and Ubuntu. APT handles package dependencies and normally obtains packages from configured repositories. The dpkg command can also install individual .deb packages, but it does not provide the same dependency-resolution features as APT. Package management is an important Linux administration task because administrators need reliable methods for installing, updating, removing, and maintaining software across systems.

Question 116

Which command is commonly used to query information about an installed RPM package?

  1. rpm -qi
  2. apt list
  3. dpkg -S
  4. tar -tf

Correct Answer: 1

Explanation

The rpm -qi command displays detailed information about an installed RPM package. The output can include the package name, version, release, architecture, installation date, vendor, and description. RPM-based distributions include systems such as Fedora, Rocky Linux, AlmaLinux, and other compatible distributions. Package information is useful during software troubleshooting because administrators can verify exactly which package version is installed. This can help identify missing updates, incompatible versions, or package-related configuration problems.

Question 117

Which systemd unit type is designed to define a service that can be started and managed by systemd?

  1. .socket
  2. .timer
  3. .service
  4. .mount

Correct Answer: 3

Explanation

A systemd .service unit describes a service or process that systemd can start, stop, restart, and monitor. Service unit files can define commands, dependencies, startup behavior, users, and other settings. Administrators commonly manage these units with commands such as systemctl start, systemctl stop, and systemctl status. Other unit types have different purposes: .timer schedules activation, .socket handles socket-based activation, and .mount describes filesystem mounts.

Question 118

What is the main purpose of a systemd timer?

  1. To schedule a unit to run at specific times or intervals
  2. To change file permissions
  3. To create a network interface
  4. To format a disk

Correct Answer: 1

Explanation

A systemd timer is used to schedule another systemd unit, commonly a service, to run at a particular time or on a repeating schedule. Timers can provide a modern alternative to traditional cron jobs and integrate closely with systemd logging and service management. For example, a timer can trigger a backup service every night. Administrators can inspect timers with systemctl list-timers. Understanding timers is useful for automating maintenance tasks such as backups, cleanup operations, and scheduled reports.

Question 119

Which command is commonly used to view the kernel’s message buffer for hardware and driver-related information?

  1. dmesg
  2. userlog
  3. servicemsg
  4. kernview

Correct Answer: 1

Explanation

The dmesg command displays messages from the Linux kernel’s message buffer. These messages can provide useful information about hardware detection, drivers, storage devices, USB devices, network interfaces, and kernel events. When a newly connected device does not work, checking dmesg can help determine whether Linux detected it or reported an error. The output can also contain warnings that are useful during troubleshooting. Access to some kernel messages may be restricted on modern Linux systems.

Question 120

A Linux server suddenly has very high CPU usage. Which tool is most useful for quickly identifying processes consuming CPU resources?

  1. mkdir
  2. top
  3. mount
  4. passwd

Correct Answer: 2

Explanation

The top command provides a live view of running processes and system resource usage. It can show CPU usage, memory usage, process IDs, users, and process states. When a server suddenly becomes slow because of high CPU utilization, top is a useful first diagnostic tool for identifying which processes are consuming the most CPU. After finding a problematic process, an administrator can investigate its logs, configuration, or behavior before deciding whether it should be restarted or stopped.