An administrator receives the following output while attempting to unmount a filesystem:
umount /data1: target is busy.
Which of the following commands should the administrator run next to determine why the filesystem is busy?
Answer : D
Filesystem unmount failures are common troubleshooting scenarios covered in Linux+ V8. When the error ''target is busy'' appears, it means one or more processes are actively using files or directories within the mount point.
The correct diagnostic command is lsof | grep /data1. The lsof (list open files) utility displays all open files and the processes using them. Filtering the output with grep /data1 identifies exactly which processes are holding file descriptors on the filesystem, preventing it from being unmounted.
The other options are incorrect. ps -f displays process information but does not show open file usage. du -sh calculates disk usage and does not identify active processes. top monitors system performance but cannot pinpoint filesystem locks.
Linux+ V8 documentation emphasizes using lsof or fuser to identify resource locks before unmounting filesystems. Therefore, the correct answer is D.
An administrator needs to create a new logical volume from sets of provisioned disks. Which of the following shows the correct order of commands the administrator should execute?
Answer : A
Logical Volume Management (LVM) is a fundamental storage management concept in CompTIA Linux+ V8. LVM provides a layered abstraction between physical storage devices and the filesystems used by the operating system. To successfully provision a new logical volume, an administrator must follow a strict hierarchy of operations:
pvcreate (Physical Volume): This is the first step. The administrator must initialize the raw physical disks or partitions for use by LVM. This command writes LVM metadata to the disk, making it a 'Physical Volume' (PV).
vgcreate (Volume Group): In the second step, the administrator combines one or more Physical Volumes into a single storage pool called a 'Volume Group' (VG). The VG acts like a virtual disk drive created from the combined capacity of the underlying PVs.
lvcreate (Logical Volume): Finally, the administrator carves out space from the Volume Group to create 'Logical Volumes' (LV). These LVs act like partitions and are where the administrator will actually create a filesystem (e.g., mkfs.ext4) and mount it for use.
This order is mandatory because each layer depends on the existence of the one below it. You cannot create a VG without PVs, and you cannot create an LV without a VG.
Therefore, the sequence pvcreate -> vgcreate -> lvcreate is the verified and only correct order of execution.
Which of the following commands is used to display detailed information about block devices on a Linux system?
Answer : A
The correct answer is A. lsblk because it is specifically designed to display detailed information about block devices such as hard drives, SSDs, partitions, and their mount points in a structured, hierarchical format. The lsblk (list block devices) command provides a clear overview of how storage devices are organized, including relationships between disks and their partitions.
When executed, lsblk shows important details such as device names (e.g., sda, sdb), sizes, types (disk or partition), and mount points. This makes it extremely useful for system administrators when managing storage, troubleshooting disk issues, or verifying newly attached devices.
Option B (mount) is incorrect because it is used to mount filesystems, not to display a comprehensive list of all block devices.
Option C (df) is incorrect because it shows disk space usage of mounted filesystems, not detailed device-level information.
Option D (fdisk) is partially related but incorrect in this context. While fdisk can be used to view and manage partition tables, it is more interactive and not as convenient for simply displaying a structured overview of all block devices.
From a Linux+ system management perspective, lsblk is an essential tool for storage administration. It allows administrators to quickly assess disk layouts, identify mounted and unmounted devices, and verify configurations. Its readability and efficiency make it a preferred command for everyday disk management and troubleshooting tasks in Linux environments.
Which of the following best describes a use case for playbooks in a Linux system?
Answer : A
In the context of Linux automation and orchestration, playbooks are most commonly associated with configuration management tools such as Ansible, which is explicitly referenced in the CompTIA Linux+ V8 objectives. Playbooks are written in YAML and are designed to define a series of tasks, configurations, and desired system states that should be applied to one or more Linux systems in a repeatable and automated manner.
A primary use case for playbooks is application deployment and system configuration automation. Playbooks allow administrators to specify tasks such as installing packages, configuring services, managing users, setting permissions, deploying application files, and starting or enabling services. This aligns directly with option A, which accurately describes playbooks as a method to provide a set of tasks and configurations required to deploy an application consistently across environments.
The remaining options are not accurate representations of playbook functionality. Option B refers to version control implementation, which is handled by tools like Git and is not the purpose of playbooks themselves, although playbooks may be stored in version control systems. Option C describes container security information, which is typically managed through container runtime configurations, secrets, or security policies rather than playbooks. Option D refers to storage volume information for a pod, which is specific to Kubernetes manifests and not a general Linux playbook use case.
According to Linux+ V8 documentation, automation tools and playbooks help reduce human error, improve consistency, and support Infrastructure as Code (IaC) practices. Playbooks are a key mechanism for orchestrating multi-step operations across multiple systems, making them essential for modern Linux system administration.
Therefore, the correct answer is A, as it best describes the practical and documented use case for playbooks in a Linux system.
An administrator needs to remove the directory /home/user1/data and all of its contents. Which of the following commands should the administrator use?
Answer : C
File and directory management is a core system administration skill addressed in Linux+ V8. When an administrator needs to delete a directory that contains files or subdirectories, a recursive deletion is required.
The correct command is rm -r /home/user1/data. The rm command removes files, and the -r (recursive) option allows it to delete directories and all of their contents, including nested files and subdirectories. This is the standard and correct method for removing non-empty directories.
The other options are incorrect. rmdir -p only removes empty directories and will fail if the directory contains files. ln -d is used to create directory hard links, not remove directories. cut -d is a text-processing command unrelated to filesystem operations.
Linux+ V8 documentation stresses caution when using rm -r, as it permanently deletes data without recovery unless backups exist. Therefore, the correct answer is C.
A Linux administrator observes low network throughput. The administrator gathers the following output:
$ ip link show eth0
eth0:
$ ping -s 1472 -M do 192.168.10.2
PING 192.168.10.2(192.168.10.2) 1472(1500) bytes of data.
From 10.10.9.72 icmp_seq=1 frag needed and DF set
Which of the following is the cause of the low network throughput?
Answer : D
Network throughput issues are often caused by Maximum Transmission Unit (MTU) mismatches. MTU defines the largest packet size (in bytes) that can be sent over a network interface. According to CompTIA Linux+ V8 networking objectives, a standard Ethernet MTU is 1500 bytes. Larger values, such as 9000, are known as 'Jumbo Frames' and must be supported by every device in the network path (switches, routers, and the destination host).
In this scenario, the output of ip link show eth0 reveals that the local interface is configured for an MTU of 9000. However, when the administrator runs a ping test with a payload of 1472 bytes (which, with headers, equals a 1500-byte packet) and the 'Don't Fragment' (-M do) flag, the system returns an error: 'frag needed and DF set'.
This error message indicates that a device somewhere in the network path has a smaller MTU (likely the standard 1500) and cannot handle the 9000-byte packets the server wants to send. Since the 'Don't Fragment' bit is set, the device cannot break the packet down and instead drops it. This results in packet loss, retransmissions, and significantly lower throughput as the protocol tries to adapt.
Options A, B, and C are not supported by the provided evidence. A duplex mismatch (Option C) would typically show collisions or CRC errors in ifconfig or ip -s link. Driver or hardware issues would manifest as interface flaps or total connectivity loss. The explicit 'frag needed' message is a definitive indicator of an MTU mismatch.
The resolution would be to either ensure Jumbo Frames are enabled throughout the network or lower the local MTU to 1500.
A Linux administrator installed a new program inside $HOME/.local/bin and is trying to execute it without using an absolute path. Which of the following should the administrator use for this task?
Answer : C
The correct answer is C. export PATH=$PATH:$HOME/.local/bin because it correctly appends the directory $HOME/.local/bin to the existing PATH environment variable. The PATH variable defines a list of directories that the shell searches when a user enters a command without specifying its full path. By adding a directory to PATH, executables within that directory can be run directly from the command line.
In this case, the administrator installed a program in $HOME/.local/bin, which is not always included in the default PATH for all systems or users. By using export PATH=$PATH:$HOME/.local/bin, the existing PATH is preserved and extended to include the new directory. The use of $PATH ensures that previously defined directories remain accessible, while the colon (:) separates multiple directory entries.
Option A is incorrect because it literally assigns the string ''PATH'' instead of referencing the current PATH variable, effectively breaking command lookup.
Option B and D are incorrect because they attempt to assign a value to $PATH, which is invalid syntax. Environment variables should be assigned using their name (PATH), not with a dollar sign.
From a Linux+ perspective, managing environment variables is a fundamental skill in user and system configuration. Properly configuring the PATH variable ensures efficient command execution and usability, especially when installing custom or user-specific applications. For persistence, this change is typically added to shell configuration files like ~/.bashrc or ~/.profile.