A systems administrator wants to review the amount of time the NetworkManager service took to start. Which of the following commands accomplishes this goal?
Answer : D
System boot performance analysis is an important system management task included in Linux+ V8. When administrators need to determine how long services take to start during boot, systemd analysis tools are required.
The correct command is systemd-analyze blame. This command lists all systemd services and shows how long each one took to initialize during the boot process. It is commonly used to identify slow-starting services that may impact system startup performance, including NetworkManager.
The other options are incorrect. resolvectl is used for DNS resolution management and provides no service timing information. journalctl can display logs but does not provide a clear, summarized service startup timing report. systemctl daemon-reload only reloads systemd unit files and does not perform analysis.
Linux+ V8 documentation explicitly references systemd-analyze blame as the correct tool for diagnosing service startup delays. Therefore, the correct answer is D.
Which of the following cryptographic functions ensures a hard drive is encrypted when not in use?
Answer : B
Disk encryption is a key Linux+ V8 security objective, especially for protecting data at rest. LUKS (Linux Unified Key Setup) is the standard Linux framework for full-disk and partition-level encryption.
Option B is correct. LUKS provides strong encryption for storage devices, ensuring that data remains unreadable when the system is powered off or the disk is removed. It integrates with tools like cryptsetup and supports key management, passphrases, and multiple unlock methods.
The other options are incorrect. GPG encrypts files, not entire disks. PKI certificates are used for identity and trust, not disk encryption. OpenSSL is a cryptographic library, not a disk encryption mechanism.
Linux+ V8 documentation explicitly identifies LUKS as the primary solution for disk encryption on Linux systems. Therefore, the correct answer is B.
A Linux user frequently tests shell scripts located in the /home/user/scripts directory. Which of the following commands allows the user to run the program by invoking only the script name?
Answer : C
In Linux, the ability to execute a program by typing only its name depends on whether the directory containing the executable is included in the user's PATH environment variable. The PATH variable defines a colon-separated list of directories that the shell searches when a command is entered.
Option C, export PATH=$PATH:/home/user/scripts, correctly appends the /home/user/scripts directory to the existing PATH variable. Once this command is executed, any executable script located in that directory can be run simply by typing its filename, provided the script has execute permissions. This behavior is explicitly covered in the Linux+ V8 objectives related to environment variables and shell configuration.
The other options are incorrect. Option A incorrectly attempts to redefine the SHELL variable and uses invalid syntax. Option B modifies the TERM variable, which controls terminal type and has nothing to do with command execution. Option D attempts to create an alias using invalid syntax and would not affect command lookup behavior.
Linux+ V8 documentation emphasizes modifying the PATH variable as the standard and recommended method for simplifying script execution. This approach is commonly used by developers and administrators who frequently run custom scripts.
Therefore, the correct answer is C.
A systems administrator needs to open the DNS TCP port on a Linux system from network 10.0.0.0/24. Which of the following commands should the administrator use for this task?
Answer : C
Firewall configuration is a key topic in the Security domain of CompTIA Linux+ V8. DNS primarily uses UDP port 53, but TCP port 53 is also required for zone transfers, large responses, and certain reliability scenarios. In this case, the administrator explicitly needs to allow DNS over TCP from a specific network.
The correct command is ufw allow 53/tcp from 10.0.0.0/24. This rule allows incoming TCP traffic on port 53 only from the specified subnet, following the principle of least privilege. Linux+ V8 documentation emphasizes restricting firewall rules by source network whenever possible to minimize attack surfaces.
Option A is incorrect because UFW service aliases like dns are not always guaranteed to map explicitly to TCP, and the syntax is incomplete. Option B is invalid because ufw enable is used to enable the firewall globally and does not define rules. Option D disables firewall protections and introduces a major security risk.
Linux+ V8 best practices stress precise, minimal firewall rules instead of broad or disabling actions. Therefore, C is the correct and secure choice.
A Linux administrator attempts to unmount the local filesystem /data in order to mount a new volume. However, the administrator receives the following error message:
umount: /data: target is busy
Which of the following commands should the administrator run to resolve the issue?
Answer : D
The correct answer is D. fuser -mk /data because it directly addresses the issue of a ''busy'' mount point by identifying and terminating processes that are currently using the filesystem. The error ''target is busy'' occurs when one or more processes are actively accessing files or directories within the mounted filesystem, preventing it from being safely unmounted.
The fuser command is specifically designed to identify processes that are using files, directories, or sockets. When used with the -m option, it checks all processes accessing the specified mount point. The -k option sends a signal (by default SIGKILL) to terminate those processes. This frees the filesystem, allowing the administrator to successfully run the umount command afterward.
Option A (tree -g /data) is incorrect because it only displays the directory structure and permissions; it does not identify or stop processes using the filesystem.
Option B (ls -ld /data) is incorrect because it shows directory metadata such as permissions and ownership, not active usage.
Option C (stat -f /data) is incorrect because it provides filesystem statistics but does not help identify or resolve active process locks.
From a Linux+ troubleshooting perspective, tools like fuser and lsof are essential for diagnosing resource contention issues. Properly resolving ''busy'' mount points ensures data integrity and prevents corruption when unmounting filesystems, making this a critical administrative skill.
Which of the following commands should an administrator use to see a full hardware inventory of a Linux system?
Answer : A
Hardware inventory and system information gathering are core responsibilities in Linux system management and are explicitly covered in CompTIA Linux+ V8 objectives. Among the listed commands, dmidecode is the most comprehensive tool for retrieving detailed hardware inventory information.
The dmidecode command reads data directly from the system's DMI (Desktop Management Interface) / SMBIOS tables, which are provided by the system firmware (BIOS or UEFI). It reports detailed information about system hardware components, including motherboard details, BIOS version, system manufacturer, CPU sockets, memory slots, installed RAM modules, serial numbers, and asset tags. This makes it the preferred tool when a full hardware inventory is required.
The other options provide only partial or specific information. lsmod lists currently loaded kernel modules and does not provide physical hardware inventory. dmesg displays kernel ring buffer messages, which may include hardware detection logs but are not structured or complete inventory data. lscpu reports CPU architecture and processor details only, not the entire system hardware.
Linux+ V8 documentation highlights dmidecode as the authoritative utility for system hardware discovery and inventory auditing. It is commonly used in enterprise environments for documentation, troubleshooting, capacity planning, and compliance reporting.
Because it provides the most complete and authoritative hardware information available from the system firmware, the correct answer is A. dmidecode.
Application owners are reporting that their application stops responding after several days of running, and they need to restart it. A Linux administrator obtains the following details from the dmesg command:
invoked oom-killer
Call Trace:
out_of_memory
oom_kill_process
The application owners mentioned that resources to the system have been increased, and the error takes longer to appear. Which of the following best describes the reason the process is being terminated by OOM?
Answer : C
The correct answer is C. The application might have a memory leak because the dmesg output clearly shows that the Linux kernel is invoking the OOM (Out Of Memory) killer, which terminates processes when the system runs out of available memory. The presence of entries such as invoked oom-killer, out_of_memory, and oom_kill_process confirms that the system is exhausting its memory resources over time.
A key detail in the scenario is that the application runs for several days before failing, and when system resources (RAM) are increased, the issue takes longer to occur. This behavior is a classic indicator of a memory leak, where an application gradually consumes more memory without releasing it. Instead of stabilizing, memory usage continuously grows until it reaches the system limit, at which point the OOM killer terminates the process to prevent system instability.
Option A (CPU type is incompatible) is incorrect because CPU incompatibility would cause immediate execution failures, not delayed memory exhaustion. Option B (kernel panic) is incorrect because a kernel panic would crash the entire system, not selectively terminate a user-space process. Option D (swap configuration not correctly sized) is partially plausible but not the best answer; while insufficient swap can contribute to OOM conditions, it does not explain the gradual memory consumption pattern observed.
In Linux+ troubleshooting, identifying memory leaks is critical when dealing with long-running applications. Administrators should monitor memory usage using tools like top, htop, or ps, and investigate application behavior. Applying patches, optimizing code, or restarting services periodically are common mitigation strategies, along with configuring appropriate memory and swap resources.