CompTIA Linux + XK0-006 (V8) Exam Practice Test 2

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Thames
T
Thames
Community Contributor
Quizzes Created: 11371 | Total Attempts: 9,893,164
| Questions: 25 | Updated: Sep 30, 2026
Please wait...
Question 1 / 26
🏆 Rank #-- ▾
0 %
0/100
Score 0/100

1. A security audit finds that a critical configuration file has its immutable attribute set, preventing it from being modified or deleted even by root until the attribute is explicitly removed. Separately, the audit finds a log file configured so new entries can only ever be added to it, never edited or deleted, even by a privileged user. Which two file attributes are described, respectively?

Explanation

The immutable attribute prevents any modification or deletion of a file until explicitly removed, while the append-only attribute permits new data to be added but blocks editing or deleting existing content. The sticky bit, setuid, and setgid are special permission bits affecting execution and directory deletion behavior rather than these chattr-managed attributes.

Submit
Please wait...
About This Quiz
CompTIA Linux + Xk0-006 (V8) Exam Practice Test 2 - Quiz

This practice assessment focuses on key concepts for the CompTIA Linux + XK0-006 (V8) certification. It evaluates your understanding of Linux system administration, command-line proficiency, and troubleshooting skills. This resource is essential for anyone preparing for the certification exam, helping you identify areas for improvement and reinforcing your knowledge in... see moreLinux administration. see less

2.

What first name or nickname would you like us to use?

You may optionally provide this to label your report, leaderboard, or certificate.

2. A server's memory usage graph shows steadily climbing consumption over several days with no corresponding increase in workload, eventually leading to the out-of-memory killer terminating processes. Which performance issue does this describe?

Explanation

Steadily climbing memory consumption with no corresponding workload increase, eventually triggering the OOM killer, is a memory leak. Swapping describes active use of disk-based virtual memory due to low RAM, high context switching describes excessive CPU time spent switching between processes, a CPU bottleneck describes CPU capacity being the limiting factor, and packet drops describe network-layer loss rather than a gradual memory consumption trend.

Submit

3. A web application accepts connections but users report certificate warnings in their browsers, and an administrator finds the server's TLS certificate expired two days ago without being renewed. Separately, a different server still has clients negotiating connections using TLS 1.0, a version considered obsolete and insecure. Which two security troubleshooting categories are described, respectively?

Explanation

An expired TLS certificate causing browser warnings is a certificate issue, while clients still negotiating with an outdated version like TLS 1.0 is obsolete or insecure protocol usage. An SELinux issue concerns security context and policy, a misconfigured package repository concerns software installation sources, and a remote access issue concerns SSH or similar connectivity problems rather than either of these two described symptoms.

Submit

4. A network administrator troubleshooting a routing problem finds that a server can reach hosts on its own subnet but cannot reach any hosts beyond it, and suspects the default route is missing or misconfigured. Which issue is this?

Explanation

The ability to reach the local subnet but not beyond it, with a missing or misconfigured default route, is specifically a gateway/routing issue. A DNS issue would affect name resolution rather than routed reachability, a DHCP issue would affect address assignment, interface misconfiguration generically covers many possible issues, and link down would prevent even local subnet reachability entirely.

Submit

5. A user reports that new files cannot be created in a directory even though df shows plenty of free disk space remaining on that filesystem. An administrator suspects the filesystem has run out of the structures needed to track new files, even though raw space remains. Which issue is this?

Explanation

Inode exhaustion occurs when a filesystem runs out of inodes, the structures used to track files, even though raw disk space remains available, preventing new file creation. OS filesystem full describes running out of actual space rather than inodes specifically, a partition not writable concerns a mount or permission issue, quota issues concern per-user or per-group space limits, and a package dependency issue is unrelated to filesystem structure exhaustion.

Submit

6. After attempting to install a new application, a package manager reports that the requested package requires a library version older than what is currently installed on the system, and refuses to proceed with installation. Which issue is this?

Explanation

A package requiring a specific, often conflicting, library version that isn't satisfied by what's currently installed is a package dependency issue. OS filesystem full concerns available disk space, server inaccessible concerns broader connectivity or availability, device failure concerns hardware malfunction, and killed processes concerns processes being terminated rather than a version conflict blocking installation.

Submit

7. A monitoring system needs to receive real-time updates pushed from a CI/CD pipeline the moment a deployment completes, using a lightweight HTTP callback that the pipeline sends to a specified URL, rather than the monitoring system needing to poll for status. Which data acquisition method is this?

Explanation

A webhook is a lightweight HTTP callback a system sends to a specified URL the moment an event occurs, exactly matching this push-based deployment notification. SNMP traps are a similar unsolicited-push concept but specific to the SNMP protocol rather than a general HTTP callback, health checks are periodic probes rather than event-driven pushes, log aggregation centralizes log data, and agent-based monitoring describes installed collection software rather than this specific callback mechanism.

Submit

8. A developer wants to see exactly what changed between the currently staged files and the last commit before actually committing, to review the changes line by line. Which Git command shows this?

Explanation

git diff shows the line-by-line differences between the working directory, staged changes, and the last commit. git log shows commit history, git status shows which files are staged or modified without showing line-level content differences, git branch manages branches, and git clone copies an entire repository rather than showing a diff.

Submit

9. A Python script written by a new team member uses tabs in some places and spaces in others for indentation within the same function, causing an IndentationError when run. Which foundational Python concept does this violate?

Explanation

Python uses indentation itself to define code blocks, and mixing tabs and spaces inconsistently within the same block causes an IndentationError, a fundamental syntax requirement rather than just a style preference. Data types and structures concern how values are represented, PEP 8 best practices generically cover broader style conventions beyond this specific syntactic requirement, virtual environments concern dependency isolation, and built-in modules are part of the standard library.

Submit

10. A script needs to capture the output of a command and store it in a variable for later use in the script, using a syntax that evaluates the command in a subshell and substitutes its output text. Complete the sentence: this technique, using the syntax $(foo), is called ______.

Explanation

Command substitution, using $(foo) or the older backtick syntax, evaluates a command in a subshell and substitutes its output as text, commonly used to capture command results into a variable.

Submit

11. A DevOps team wants every code change to automatically trigger security and quality checks as early as possible in the development process, ideally before code is even merged, rather than discovering issues only after deployment. Which CI/CD concept does this represent?

Explanation

Shift left testing specifically means moving testing and security checks as early as possible in the development process, before merge or deployment. GitOps uses Git as the source of truth for infrastructure state, pipelines generically describe the automated sequence of build and deployment steps, DevSecOps generically describes integrating security throughout the development lifecycle, and version control tracks code changes rather than describing early-stage testing timing specifically.

Submit

12. An administrator wants to encrypt an entire disk partition at rest so that its contents are unreadable without the correct passphrase or key, even if the physical drive is removed and read on another system. Which technology fits this need?

Explanation

LUKS2 provides full disk or partition encryption, making the contents unreadable without the correct passphrase or key even if the drive is moved to another system. GPG encrypts individual files or messages rather than whole partitions, OpenSSL implements TLS and general cryptographic operations, WireGuard is a VPN protocol for data in transit, and HMAC provides message authentication rather than data-at-rest encryption.

Submit

13. A security team requires that any user attempting to authenticate to a critical server must provide both their password and a time-based one-time code generated by an authenticator app. Which account hardening concept does this represent?

Explanation

Requiring both a password and a time-based one-time code from a second factor is multifactor authentication. Password complexity concerns character requirements, password history prevents reuse of prior passwords, restricted shells limit what commands an account can execute, and pam_tally2 tracks failed login attempts rather than requiring a second authentication factor.

Submit

14. An administrator reviewing the Filesystem Hierarchy Standard needs to know where variable data such as logs, spool files, and caches are conventionally stored on a Linux system. Which directory is this?

Explanation

/var stores variable data such as logs, spool files, and caches that change frequently during normal operation. /etc holds system configuration files, /usr holds user-installed software and shared resources, /tmp holds temporary files that may be cleared on reboot, and /proc is a virtual filesystem exposing kernel and process information rather than storing persistent variable data.

Submit

15. A firewalld administrator wants to permit traffic to a named service like 'http' without needing to remember and manually specify its underlying TCP port number. Which firewalld concept enables this?

Explanation

The ports versus services distinction lets an administrator reference a named, predefined service like http instead of manually specifying its underlying port number. Rich rules provide custom fine-grained syntax, runtime versus permanent configuration concerns persistence of changes, zones group interfaces under trust levels, and the Netfilter module is the underlying kernel packet filtering framework rather than the named-service convenience feature.

Submit

16. An administrator building a container image wants to specify which command runs by default when a container starts from that image, unless the user overrides it at runtime. Which Dockerfile instruction sets this default?

Explanation

CMD specifies the default command a container runs when started, which can be overridden at runtime. FROM specifies the base image, USER specifies which user the container process runs as, ENTRYPOINT defines a command that is harder to override and is often used alongside CMD for default arguments, and pruning is a cleanup operation rather than a Dockerfile instruction.

Submit

17. An administrator wants to configure a DHCP server so that Linux clients on the network automatically receive their IP address, subnet mask, and default gateway without manual configuration. Which basic service configuration does this represent?

Explanation

DHCP automatically assigns IP addresses, subnet masks, and gateway information to clients on a network. DNS resolves hostnames to IP addresses, NTP/PTP synchronize system clocks, HTTP serves web content, and SMTP transfers email rather than assigning network configuration to clients.

Submit

18. An administrator wants to schedule a one-time report generation job to run at 2 AM tonight only, rather than on a recurring daily or weekly basis. Which scheduling tool fits this need?

Explanation

at schedules a one-time job to run once at a specified future time. crontab schedules recurring jobs on a fixed schedule, anacron handles periodic jobs on systems that may not be running continuously, nice sets process priority, and jobs lists jobs in the current shell session rather than scheduling a future one-time task.

Submit

19. An administrator needs to permanently remove a user account and its associated home directory from a system in one step, since the employee has left the company. Separately, for a different employee going on extended leave, the administrator wants to temporarily lock the account's password without deleting anything, so it can be easily reactivated later. Which two commands/options are described, respectively?

Explanation

userdel -r removes both the account and its home directory in one step, while passwd -l locks an account's password without deleting anything, allowing easy reactivation. usermod -aG adds a user to a supplementary group, chage -E sets an account expiration date, and groupdel removes a group rather than describing either of these two account lifecycle actions.

Submit

20. An administrator needs to see which process currently has a specific network port open, in order to identify what is blocking a service from binding to that port. Which command is well suited to this?

Explanation

lsof can list open files, including network sockets, and identify which process holds a specific port open. ps and top show general process information without focusing on open file or socket ownership, nice sets process priority, and jobs lists jobs running in the current shell session rather than showing which process holds a specific port.

Submit

21. An administrator needs to safely copy an entire failing disk, byte for byte, to a replacement disk, continuing past unreadable sectors rather than stopping at the first error, to preserve as much recoverable data as possible. Complete the sentence: the tool purpose-built for this resilient block-level copying is ______.

Explanation

ddrescue is purpose-built to continue past unreadable sectors during failing-disk recovery, unlike plain dd which typically halts or handles read errors less gracefully. This makes it the preferred tool specifically for rescuing data from failing or damaged drives.

Submit

22. A user wants to quickly return to the directory they were in immediately before their current one, without typing out the full previous path. Which shell shortcut accomplishes this?

Explanation

Using - with the cd command returns to the previous working directory without needing to type its full path. ~ represents the home directory, .. represents the parent directory, and . represents the current directory, none of which specifically recall the immediately prior working directory.

Submit

23. Match each network troubleshooting tool to its primary purpose.

Explanation

ping checks basic reachability, traceroute maps the hop-by-hop path, mtr combines both into a continuous live view, ss displays local socket statistics, and tcpdump captures raw packet contents, each serving a distinct diagnostic purpose.

Submit

24. An administrator suspects a filesystem was not cleanly unmounted after a power failure and wants to check and repair any inconsistencies before remounting it. Which utility is this?

Explanation

fsck checks and repairs filesystem inconsistencies, exactly what is needed after an unclean unmount. mkfs creates a new filesystem rather than repairing an existing one, df reports disk space usage, du reports directory space consumption, and xfs_growfs expands an XFS filesystem's size rather than repairing corruption.

Submit

25. An administrator wants a real-time summary of CPU, memory, and sensor temperature readings, along with a live graphical view of GPU utilization, on a server equipped with a dedicated GPU used for machine learning workloads. Which tool specifically shows live GPU utilization?

Explanation

nvtop provides a live, graphical view of GPU utilization, memory, and processes, purpose-built for monitoring GPU workloads. lm_sensors reports temperature and voltage sensor readings, dmidecode reports hardware and BIOS information from the system's DMI tables, lshw lists detailed hardware configuration broadly, and ipmitool manages server hardware out-of-band through IPMI rather than showing live GPU utilization specifically.

Submit
×
Saved
Thank you for your feedback!
View My Results
Cancel
  • All
    All (25)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
A security audit finds that a critical configuration file has its...
A server's memory usage graph shows steadily climbing consumption over...
A web application accepts connections but users report certificate...
A network administrator troubleshooting a routing problem finds that a...
A user reports that new files cannot be created in a directory even...
After attempting to install a new application, a package manager...
A monitoring system needs to receive real-time updates pushed from a...
A developer wants to see exactly what changed between the currently...
A Python script written by a new team member uses tabs in some places...
A script needs to capture the output of a command and store it in a...
A DevOps team wants every code change to automatically trigger...
An administrator wants to encrypt an entire disk partition at rest so...
A security team requires that any user attempting to authenticate to a...
An administrator reviewing the Filesystem Hierarchy Standard needs to...
A firewalld administrator wants to permit traffic to a named service...
An administrator building a container image wants to specify which...
An administrator wants to configure a DHCP server so that Linux...
An administrator wants to schedule a one-time report generation job to...
An administrator needs to permanently remove a user account and its...
An administrator needs to see which process currently has a specific...
An administrator needs to safely copy an entire failing disk, byte for...
A user wants to quickly return to the directory they were in...
Match each network troubleshooting tool to its primary purpose.
An administrator suspects a filesystem was not cleanly unmounted after...
An administrator wants a real-time summary of CPU, memory, and sensor...
play-Mute sad happy unanswered_answer up-hover down-hover success oval cancel Check box square blue
Alert!