CompTIA XK0-006 Practice Test Questions and Exam Dumps Part 14: Q261–Q280

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

 

Question 261

Which command can create a new logical volume inside an existing LVM volume group?

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

Correct Answer: 2

Explanation

The lvcreate command creates a logical volume inside an existing LVM volume group. Logical volumes provide flexible storage management because their size can be adjusted more easily than traditional fixed partitions. Before creating a logical volume, the physical volume and volume group must normally already exist. After creation, the administrator can create a filesystem on the logical volume and mount it. Careful planning is important because the available free space in the volume group limits the size of new logical volumes.

Question 262

Which LVM feature allows an administrator to capture a point-in-time copy of a logical volume?

  1. LVM snapshot
  2. Physical mirror
  3. Volume cache
  4. Partition clone

Correct Answer: 1

Explanation

An LVM snapshot provides a point-in-time view of a logical volume. It can be useful for backups, testing, or temporarily preserving a filesystem state before making major changes. A snapshot is not automatically a complete independent backup, and it requires appropriate free space and planning. If the snapshot area becomes full, its usefulness can be affected. Administrators should monitor snapshot space and understand the performance and storage implications before relying on snapshots for recovery.

Question 263

Which command can display detailed information about logical volumes managed by LVM?

  1. lvshow
  2. lvdisplay
  3. show-lvm
  4. logical-info

Correct Answer: 2

Explanation

The lvdisplay command provides detailed information about LVM logical volumes. It can show the logical volume path, size, status, and associated volume group. This information is useful when troubleshooting storage configuration or verifying that a logical volume was created correctly. Administrators can use other LVM commands to inspect physical volumes and volume groups as well. Understanding the relationship between physical volumes, volume groups, and logical volumes is important when managing flexible Linux storage.

Question 264

Which command can show whether a block device has a filesystem label or UUID?

  1. blkid
  2. diskid
  3. fsinfo
  4. device-label

Correct Answer: 1

Explanation

The blkid command displays information about block devices, including filesystem type, UUID, and labels when available. UUIDs are commonly used in /etc/fstab because they provide a stable identifier that is less dependent on device naming such as /dev/sda1. Administrators can use blkid when configuring mounts or troubleshooting storage devices. Before modifying /etc/fstab, it is important to confirm that the UUID and filesystem type correspond to the intended device.

Question 265

Which filesystem is designed to support features such as snapshots, checksums, and copy-on-write?

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

Correct Answer: 3

Explanation

Btrfs is a modern Linux filesystem that uses copy-on-write and provides features such as snapshots, checksums, subvolumes, and flexible storage management. These features can be useful for systems that need filesystem-level snapshots or data integrity checking. Btrfs is different from traditional filesystems such as ext2. Administrators should understand the specific behavior and management tools of the chosen filesystem before deploying it in production. Backup and recovery procedures should also be tested with the actual filesystem.

Question 266

Which command can check and report the health information of a supported SATA or NVMe drive using SMART data?

  1. smartctl
  2. diskhealth
  3. drivecheck
  4. smartdisk

Correct Answer: 1

Explanation

The smartctl utility is commonly used to read SMART information from supported storage devices. SMART data can provide information about drive health, errors, temperature, and other indicators. Administrators can use it as part of preventive monitoring and troubleshooting. SMART information is not a guarantee that a disk will not fail, so important data should still be backed up. When a drive shows serious errors or declining health indicators, administrators should plan replacement rather than waiting for complete failure.

Question 267

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

  1. mkfs
  2. makefs
  3. filesystem-create
  4. fsnew

Correct Answer: 1

Explanation

The mkfs utility is used to create a filesystem on a block device. Specific filesystem types can often be selected with options such as mkfs.ext4 or mkfs.xfs. Creating a filesystem is a destructive operation because existing data on the target device may be overwritten. Administrators must verify the device name carefully before running the command. After creation, the filesystem can normally be mounted and added to persistent configuration when appropriate.

Question 268

Which mount option makes a filesystem read-only?

  1. rw
  2. ro
  3. safe
  4. readonlyfs

Correct Answer: 2

Explanation

The ro mount option mounts a filesystem as read-only. This can be useful when administrators want to protect data from modification, investigate a filesystem, or temporarily restrict writes. The opposite option, rw, allows read and write access when supported by the filesystem and system configuration. When a filesystem unexpectedly becomes read-only, administrators should investigate the underlying reason, such as filesystem errors or storage problems, instead of simply forcing it back to read-write mode.

Question 269

Which command can show currently mounted filesystems in a human-readable format?

  1. mounts -h
  2. findmnt
  3. showmounts
  4. filesystem-list

Correct Answer: 2

Explanation

The findmnt command can display information about currently mounted filesystems and their mount points. It is useful for quickly understanding how storage is attached to the Linux filesystem hierarchy. Administrators can use it when troubleshooting missing mounts, incorrect mount options, or unexpected filesystem locations. It can also provide information in formats that are easier to process in scripts. When investigating storage problems, findmnt can be used together with tools such as lsblk and blkid.

Question 270

Which systemd target is commonly used when a Linux system provides a normal multi-user environment without a graphical desktop requirement?

  1. network.target
  2. multi-user.target
  3. basic.target
  4. server.target

Correct Answer: 2

Explanation

multi-user.target represents a normal multi-user system state and is commonly used on servers that do not require a graphical desktop environment. It starts the services needed for normal multi-user operation. Administrators can configure the system’s default target depending on whether a graphical environment is required. Understanding systemd targets is useful when troubleshooting boot behavior because targets group related services and dependencies. A server can often operate efficiently using a non-graphical multi-user target.

Question 271

Which systemd command shows the default target configured for the system?

  1. systemctl default
  2. systemctl get-default
  3. systemctl target
  4. systemctl show-default-target

Correct Answer: 2

Explanation

The systemctl get-default command displays the systemd target that the system normally enters after boot. For example, it may show multi-user.target or graphical.target. This information is useful when troubleshooting unexpected boot behavior or determining whether a system is configured to start a graphical environment. If the default target is incorrect, an administrator can change it using the appropriate systemd command. Changes should be planned carefully on production systems because they affect the normal boot state.

Question 272

Which command can show the dependencies of a systemd unit?

  1. systemctl list-dependencies
  2. systemctl unit-tree
  3. systemctl depends
  4. systemctl show-links

Correct Answer: 1

Explanation

The systemctl list-dependencies command displays the units related through systemd dependency relationships. This is useful when troubleshooting why a service starts, stops, or fails during boot. A service may depend on networking, storage, another service, or a target. Understanding dependencies can help administrators identify the real source of a failure instead of changing the affected service blindly. The command can be used with a specific unit to focus the output on the service being investigated.

Question 273

Which command can temporarily prevent a user account from being used for login by locking the account?

  1. usermod -L
  2. usermod -R
  3. userlock
  4. passwd -disable

Correct Answer: 1

Explanation

The usermod -L command locks a user account by modifying its password information so normal password authentication cannot be used. Account locking can be useful when temporarily disabling an account without deleting its files or configuration. Administrators should understand that different authentication methods may behave differently depending on system configuration. When an employee leaves an organization, administrators should also review SSH keys, active sessions, group memberships, scheduled tasks, and other access methods instead of relying only on password locking.

Question 274

Which command can display password aging and account expiration information for a user?

  1. passwd –age
  2. chage -l
  3. userage
  4. account-info

Correct Answer: 2

Explanation

The chage -l command displays password aging information for a user account. It can show details such as the last password change, minimum and maximum password age, warning period, and account expiration information. This is useful when troubleshooting login problems caused by expired passwords or accounts. Administrators can use other chage options to configure these policies. Password aging should be applied according to organizational security requirements rather than using identical settings for every environment.

Question 275

Which file commonly contains local user account information such as usernames and user IDs?

  1. /etc/users
  2. /etc/passwd
  3. /etc/accounts
  4. /var/users

Correct Answer: 2

Explanation

The /etc/passwd file contains local account information such as usernames, user IDs, group IDs, home directories, and login shells. Modern Linux systems normally do not store actual password hashes in this file; those are usually stored in /etc/shadow. The file can be useful when troubleshooting account configuration and identifying the shell or home directory associated with a user. Administrators should avoid manually editing account databases unless they understand the format and have a strong reason to do so.

Question 276

Which file normally stores protected password hashes for local Linux accounts?

  1. /etc/login
  2. /etc/security
  3. /etc/shadow
  4. /var/passwords

Correct Answer: 3

Explanation

The /etc/shadow file normally stores password hashes and password aging information for local Linux accounts. Because it contains sensitive authentication data, access to this file is heavily restricted. Administrators should protect it from unauthorized users and avoid exposing its contents unnecessarily. Password hashes are not the original plaintext passwords, but weak passwords can still be vulnerable to offline cracking if an attacker obtains the hashes. Strong passwords and appropriate authentication controls remain important security measures.

Question 277

Which Linux mechanism can require users to provide more than one authentication factor?

  1. MFA
  2. RAID
  3. LVM
  4. ACL

Correct Answer: 1

Explanation

Multi-factor authentication, or MFA, requires users to provide multiple types of authentication evidence, such as a password plus a hardware token or time-based code. MFA can significantly reduce the risk associated with stolen passwords because an attacker also needs the additional factor. Linux systems can integrate MFA through PAM modules and external identity services. Administrators should test MFA carefully before enforcing it globally because incorrect configuration can prevent legitimate users from accessing the system.

Question 278

Which SSH configuration setting controls whether the root account can log in directly through SSH?

  1. RootAccess
  2. PermitRootLogin
  3. AllowRootSSH
  4. SSHRootMode

Correct Answer: 2

Explanation

The PermitRootLogin setting in the OpenSSH server configuration controls direct SSH login for the root account. Administrators commonly restrict or disable direct root login and instead require users to authenticate with normal accounts and use sudo for privileged operations. This approach provides better accountability because actions can be associated with individual user accounts. After changing SSH configuration, administrators should validate the configuration and keep an existing administrative session available until the new settings are confirmed.

Question 279

Which SSH feature allows an administrator to securely forward a local port to a service available from a remote system?

  1. SSH local port forwarding
  2. SSH compression
  3. SSH host naming
  4. SSH key rotation

Correct Answer: 1

Explanation

SSH local port forwarding allows a local port to securely tunnel traffic to a destination through an SSH server. It is useful when accessing internal services that are not directly reachable from the administrator’s workstation. For example, an administrator may create a local port that forwards traffic through an SSH server to an internal web application. Port forwarding should be controlled carefully because it can provide access paths into protected networks. Administrators should only use it when authorized.

Question 280

Which practice best reduces the risk of exposing unnecessary network services on a Linux server?

  1. Enable every available service.
  2. Disable unused services and restrict required ports.
  3. Run all services as root.
  4. Allow every inbound connection.

Correct Answer: 2

Explanation

Disabling unused services and restricting required network ports reduces the server’s attack surface. Every running service can potentially contain vulnerabilities or provide an entry point for attackers, so servers should run only the services they actually need. Firewall rules can further restrict access to required ports and trusted networks. Services should also use least privilege and secure authentication where possible. Regularly reviewing listening ports and installed services helps administrators identify unnecessary exposure before it becomes a security problem.