CompTIA Linux+ XK0-006 Practice Test 21
Question 200
A Linux administrator is investigating the following specific issue: A compliance officer wants an auditable baseline comparison against a recognized hardened Linux configuration. Which action BEST addresses the requirement?
- Enable the appropriate kernel IP forwarding setting and validate routing and firewall decisions together
- Correct peer AllowedIPs and routing for the intended private prefixes while retaining validated public keys
- Require a supported multifactor authentication step and validate recovery access separately
- Run an approved OpenSCAP scan with the applicable SCAP profile and record controlled remediation decisions
Explanation
Correct Answer
D:Run an approved OpenSCAP scan with the applicable SCAP profile and record controlled remediation decisions. This directly addresses the stated Linux administration condition because sCAP automates comparison of installed configuration against machine-readable security benchmark rules. If the underlying problem is ignored, treating a passed vulnerability scan as equivalent to every configuration compliance control can miss hardening gaps. Verify the fix by confirming that the report records evaluated rules evidence and approved exceptions after a follow-up scan.
Incorrect Answers
A:Enable the appropriate kernel IP forwarding setting and validate routing and firewall decisions together could be useful for a different Linux requirement, for example when a Linux router has forwarding firewall rules but traffic still fails to pass between its interfaces. In the current condition, the effective action is to run an approved OpenSCAP scan with the applicable SCAP profile and record controlled remediation decisions.
B:Correct peer AllowedIPs and routing for the intended private prefixes while retaining validated public keys could be useful for a different Linux requirement, for example when two Linux hosts use WireGuard but the tunnel does not pass traffic because peer AllowedIPs are wrong. In the current condition, the effective action is to run an approved OpenSCAP scan with the applicable SCAP profile and record controlled remediation decisions.
C:Require a supported multifactor authentication step and validate recovery access separately could be useful for a different Linux requirement, for example when a sensitive remote administration workflow currently accepts a stolen password without another factor. In the current condition, the effective action is to run an approved OpenSCAP scan with the applicable SCAP profile and record controlled remediation decisions.
Question 201
For this Linux+ scenario, A developer pastes a production SSH private key into a public AI chatbot to debug an authentication issue, the planned fix is to remove exposed credentials from the workflow and rotate any disclosed key under data-governance policy. Why will that fix work?
- External AI service prompts may cross organizational security boundaries and should not contain sensitive secrets
- Compose describes multi-container application resources and repeatable lifecycle operations
- Python distinguishes lists dictionaries strings and other types and operations depend on those types
- Git commit history can be reorganized locally before publication while preserving final content
Explanation
Correct Answer
A:External AI service prompts may cross organizational security boundaries and should not contain sensitive secrets. That is the key operating principle behind the selected remediation, remove exposed credentials from the workflow and rotate any disclosed key under data-governance policy. The distinction matters because treating chat input as a guaranteed private secret vault can compromise infrastructure credentials. An appropriate observable outcome is that the key is revoked and a policy-approved redacted diagnostic request still solves the problem.
Incorrect Answers
B:Compose describes multi-container application resources and repeatable lifecycle operations is a valid explanation for another Linux operation, such as when a team has a three-service local development stack and starts its containers in the wrong dependency order. The principle here is that external AI service prompts may cross organizational security boundaries and should not contain sensitive secrets.
C:Python distinguishes lists dictionaries strings and other types and operations depend on those types is a valid explanation for another Linux operation, such as when a Python automation script parses a JSON inventory but treats a list of hosts as a dictionary. The principle here is that external AI service prompts may cross organizational security boundaries and should not contain sensitive secrets.
D:Git commit history can be reorganized locally before publication while preserving final content is a valid explanation for another Linux operation, such as when a team wants to merge multiple small Linux configuration commits into one reviewed deployment change. The principle here is that external AI service prompts may cross organizational security boundaries and should not contain sensitive secrets.
Question 202
The team proposes to keep source review and standard static analysis despite using a locally hosted AI model after observing A team uses a private local LLM to review an Ansible playbook and assumes no further code security check is needed. Which Linux behavior supports the change?
- cloud-init performs first-boot initialization based on metadata and configured modules
- Running a model locally changes data exposure boundaries but does not make model output inherently accurate
- Infrastructure-as-code state records managed resource identities and coordinates changes to declared resources
- Compose describes multi-container application resources and repeatable lifecycle operations
Explanation
Correct Answer
B:Running a model locally changes data exposure boundaries but does not make model output inherently accurate. That is the key operating principle behind the selected remediation, keep source review and standard static analysis despite using a locally hosted AI model. The distinction matters because replacing peer review with a model verdict can miss privilege escalation and idempotency mistakes. An appropriate observable outcome is that independent tests and a human reviewer approve the playbook without relying solely on model confidence.
Incorrect Answers
A:cloud-init performs first-boot initialization based on metadata and configured modules is a valid explanation for another Linux operation, such as when a cloud image must install monitoring packages and authorized SSH keys on first boot. The principle here is that running a model locally changes data exposure boundaries but does not make model output inherently accurate.
C:Infrastructure-as-code state records managed resource identities and coordinates changes to declared resources is a valid explanation for another Linux operation, such as when a platform team uses OpenTofu to provision cloud Linux hosts but two engineers overwrite the same state file. The principle here is that running a model locally changes data exposure boundaries but does not make model output inherently accurate.
D:Compose describes multi-container application resources and repeatable lifecycle operations is a valid explanation for another Linux operation, such as when a team has a three-service local development stack and starts its containers in the wrong dependency order. The principle here is that running a model locally changes data exposure boundaries but does not make model output inherently accurate.
Question 203
In the scenario A former contractor's password remains valid but the local account should have been disabled last week, the chosen corrective control is to lock or expire the account using controlled account tools and verify additional key or session access paths. What underlying mechanism makes this appropriate?
- A cryptographic hash detects accidental or malicious byte changes while HMAC adds secret-key authenticity
- Enterprise distributions may backport security patches without changing the upstream software feature version
- Account disablement and password aging are distinct controls that affect different authentication methods
- Removing directory entries does not guarantee underlying storage blocks or flash cells are unrecoverable
Explanation
Correct Answer
C:Account disablement and password aging are distinct controls that affect different authentication methods. That is the key operating principle behind the selected remediation, lock or expire the account using controlled account tools and verify additional key or session access paths. The distinction matters because locking only the password hash can leave alternate public-key or existing-session access active. An appropriate observable outcome is that new login tests through all supported methods fail while current services remain operational.
Incorrect Answers
A:A cryptographic hash detects accidental or malicious byte changes while HMAC adds secret-key authenticity is a valid explanation for another Linux operation, such as when a backup system compares files using an obsolete weak digest but requires a modern integrity check. The principle here is that account disablement and password aging are distinct controls that affect different authentication methods.
B:Enterprise distributions may backport security patches without changing the upstream software feature version is a valid explanation for another Linux operation, such as when a vulnerability scanner flags an installed enterprise Linux package even though its vendor backported the fix. The principle here is that account disablement and password aging are distinct controls that affect different authentication methods.
D:Removing directory entries does not guarantee underlying storage blocks or flash cells are unrecoverable is a valid explanation for another Linux operation, such as when an administrator deletes an encrypted drive's file paths and calls the confidential data irrecoverably destroyed. The principle here is that account disablement and password aging are distinct controls that affect different authentication methods.
Question 204
A Linux host has not yet addressed this problem: A Linux operator wants to preserve permissions and timestamps while archiving a website configuration tree. What is the MOST direct failure or security risk?
- Formatting the surviving member during recovery can destroy the last working copy of the array data
- Attempting to repair this binary by merely changing file permissions does not change its CPU instructions
- Exposing a new TCP listener inside an isolated guest does not make it routable from the external LAN
- Assuming compression by itself preserves ownership and permissions can produce incomplete restores
Explanation
Correct Answer
D:Assuming compression by itself preserves ownership and permissions can produce incomplete restores. This follows from the underlying Linux mechanism: tar preserves directory hierarchy and selected filesystem metadata independently of optional compression. A targeted remedy is to create a tar archive with appropriate metadata handling and verify extraction in a separate test directory. After correction, a useful verification is that a test restore reproduces the expected files and required ownership metadata.
Incorrect Answers
A:Formatting the surviving member during recovery can destroy the last working copy of the array data can be a concern in another case, for example when a degraded Linux RAID1 mirror is still running but /proc/mdstat shows only one healthy member. The described Linux condition instead directly exposes this risk: assuming compression by itself preserves ownership and permissions can produce incomplete restores.
B:Attempting to repair this binary by merely changing file permissions does not change its CPU instructions can be a concern in another case, for example when an operations team deploys an x86_64-only binary to an AArch64 Linux host and it cannot execute. The described Linux condition instead directly exposes this risk: assuming compression by itself preserves ownership and permissions can produce incomplete restores.
C:Exposing a new TCP listener inside an isolated guest does not make it routable from the external LAN can be a concern in another case, for example when a guest application must be accessible from the LAN but its interface uses an isolated host-only virtual network. The described Linux condition instead directly exposes this risk: assuming compression by itself preserves ownership and permissions can produce incomplete restores.
Question 205
For this Linux+ scenario, A user needs a second directory entry for a file that must survive removal of the first filename, the planned fix is to create a hard link on the same filesystem where permitted and verify the shared inode. Why will that fix work?
- Hard links reference the same inode and file data rather than storing a separate pathname target
- Container writable layers are not a reliable substitute for explicitly managed persistent data storage
- Package upgrades may install new defaults while retaining or replacing administrator-modified configuration files
- UID and GID values, not displayed usernames alone, determine many filesystem ownership decisions
Explanation
Correct Answer
A:Hard links reference the same inode and file data rather than storing a separate pathname target. That is the key operating principle behind the selected remediation, create a hard link on the same filesystem where permitted and verify the shared inode. The distinction matters because assuming a hard link can cross filesystems or reference directories freely can cause errors. An appropriate observable outcome is that stat shows matching inode numbers and the data remains accessible after removing one link.
Incorrect Answers
B:Container writable layers are not a reliable substitute for explicitly managed persistent data storage is a valid explanation for another Linux operation, such as when a containerized service loses uploaded files when its container is replaced during deployment. The principle here is that hard links reference the same inode and file data rather than storing a separate pathname target.
C:Package upgrades may install new defaults while retaining or replacing administrator-modified configuration files is a valid explanation for another Linux operation, such as when an application service fails after a configuration package update because its installed default file changed. The principle here is that hard links reference the same inode and file data rather than storing a separate pathname target.
D:UID and GID values, not displayed usernames alone, determine many filesystem ownership decisions is a valid explanation for another Linux operation, such as when a support script edits /etc/passwd directly and now an account's UID conflicts with an existing service. The principle here is that hard links reference the same inode and file data rather than storing a separate pathname target.
Question 206
An operations team leaves this Linux condition unchanged: An application handshake stalls across a VPN although small pings and route lookups succeed. Which adverse consequence is MOST likely?
- Reinstalling unrelated user packages cannot restore a root device referenced by an incorrect UUID
- Treating successful small ICMP tests as proof of large TCP payload delivery can hide a black-hole issue
- Randomly disabling password quality or MFA modules to restore login can weaken intended protections
- Simply forcing all traffic over a degraded member can make availability and throughput worse
Explanation
Correct Answer
B:Treating successful small ICMP tests as proof of large TCP payload delivery can hide a black-hole issue. This follows from the underlying Linux mechanism: encapsulation overhead can make the effective path MTU smaller than the physical interface MTU. A targeted remedy is to investigate MTU and MSS with suitable path probes and packet captures then correct the route or tunnel settings. After correction, a useful verification is that a large encrypted application transfer completes without repeated TCP retransmission.
Incorrect Answers
A:Reinstalling unrelated user packages cannot restore a root device referenced by an incorrect UUID can be a concern in another case, for example when a Linux machine drops into an initramfs shell and reports that the root filesystem UUID cannot be found. The described Linux condition instead directly exposes this risk: treating successful small ICMP tests as proof of large TCP payload delivery can hide a black-hole issue.
C:Randomly disabling password quality or MFA modules to restore login can weaken intended protections can be a concern in another case, for example when an authentication service fails after an administrator installed a new PAM module for login hardening. The described Linux condition instead directly exposes this risk: treating successful small ICMP tests as proof of large TCP payload delivery can hide a black-hole issue.
D:Simply forcing all traffic over a degraded member can make availability and throughput worse can be a concern in another case, for example when a network team creates an interface bond but one member negotiates a different speed and loses traffic. The described Linux condition instead directly exposes this risk: treating successful small ICMP tests as proof of large TCP payload delivery can hide a black-hole issue.
Question 207
A Linux administrator is evaluating the operational consequences of A virtualization host has a large data disk but its partitions have not been expanded after cloud resizing. Which problem is MOST directly associated?
- Treating all failure output as stdout can leave a failure investigation without error details
- Extending an LVM logical volume without growing the filesystem leaves application-visible free space unchanged
- Growing only the application filesystem before extending underlying partition capacity can fail
- Declaring an optional removable disk mandatory can block or delay startup when it is missing
Explanation
Correct Answer
C:Growing only the application filesystem before extending underlying partition capacity can fail. This follows from the underlying Linux mechanism: disk size, partition boundary, logical volume and filesystem capacity can differ after a virtual disk grows. A targeted remedy is to inspect lsblk and partition geometry then use a supported growpart or partitioning workflow before resizing filesystem layers. After correction, a useful verification is that partition and filesystem inspections agree on the new intended storage size.
Incorrect Answers
A:Treating all failure output as stdout can leave a failure investigation without error details can be a concern in another case, for example when a script should capture diagnostic error messages separately from its normal command output. The described Linux condition instead directly exposes this risk: growing only the application filesystem before extending underlying partition capacity can fail.
B:Extending an LVM logical volume without growing the filesystem leaves application-visible free space unchanged can be a concern in another case, for example when a database volume group has free extents but its logical filesystem has run out of space. The described Linux condition instead directly exposes this risk: growing only the application filesystem before extending underlying partition capacity can fail.
D:Declaring an optional removable disk mandatory can block or delay startup when it is missing can be a concern in another case, for example when a host cannot boot after a stale USB disk entry in /etc/fstab becomes unavailable. The described Linux condition instead directly exposes this risk: growing only the application filesystem before extending underlying partition capacity can fail.
Question 208
After applying the relevant Linux fix for A logging service handles thousands of small messages per second but throughput collapses when it flushes each write, which evidence BEST demonstrates success?
- A remote TCP connection reaches the intended bound address and the handshake begins
- The combined monitoring view reports both host resource state and application-level availability
- Authorized users log in under the complete approved PAM policy while prohibited attempts fail
- A tuned test maintains mandated durability while achieving acceptable ingest throughput
Explanation
Correct Answer
D:A tuned test maintains mandated durability while achieving acceptable ingest throughput. This outcome directly tests whether the Linux operation, profile write batching, sync frequency and storage latency against durability requirements, addresses the specified failure. The technical reason is that excessive synchronous writes can make storage latency dominate small-request workloads. Without correcting the underlying issue, disabling every durable write without understanding recovery needs can risk losing critical audit messages.
Incorrect Answers
A:A remote TCP connection reaches the intended bound address and the handshake begins might confirm success for a different Linux problem, such as when a public Linux server exposes TCP 8443 internally but remote connection attempts fail before a TLS handshake. Here the required evidence is that a tuned test maintains mandated durability while achieving acceptable ingest throughput.
B:The combined monitoring view reports both host resource state and application-level availability might confirm success for a different Linux problem, such as when a Linux operations team has agents on half its servers while the others are only pinged externally. Here the required evidence is that a tuned test maintains mandated durability while achieving acceptable ingest throughput.
C:Authorized users log in under the complete approved PAM policy while prohibited attempts fail might confirm success for a different Linux problem, such as when an authentication service fails after an administrator installed a new PAM module for login hardening. Here the required evidence is that a tuned test maintains mandated durability while achieving acceptable ingest throughput.
Question 209
What risk BEST explains the need to fix the following Linux situation: A database volume group has free extents but its logical filesystem has run out of space?
- Extending an LVM logical volume without growing the filesystem leaves application-visible free space unchanged
- Using an unanchored global replacement can alter unrelated configuration keys or values
- Reformatting the local mount-point directory cannot restore a nonexistent remote NFS export
- Renaming a gzip byte stream to a tar filename does not create an archive index
Explanation
Correct Answer
A:Extending an LVM logical volume without growing the filesystem leaves application-visible free space unchanged. This follows from the underlying Linux mechanism: LVM size and filesystem size are separate layers that must both be expanded for new capacity to become usable. A targeted remedy is to extend the logical volume and then grow its supported filesystem using the correct XFS or ext4 utility. After correction, a useful verification is that lvs and df report the planned larger block allocation and filesystem capacity.
Incorrect Answers
B:Using an unanchored global replacement can alter unrelated configuration keys or values can be a concern in another case, for example when an engineer must replace only matching lines in a large configuration inventory while leaving others untouched. The described Linux condition instead directly exposes this risk: extending an LVM logical volume without growing the filesystem leaves application-visible free space unchanged.
C:Reformatting the local mount-point directory cannot restore a nonexistent remote NFS export can be a concern in another case, for example when a backup system sees repeated NFS mount failures after the remote NAS export was renamed. The described Linux condition instead directly exposes this risk: extending an LVM logical volume without growing the filesystem leaves application-visible free space unchanged.
D:Renaming a gzip byte stream to a tar filename does not create an archive index can be a concern in another case, for example when a large backup archive is compressed with gzip but the restore procedure expects to browse files without full extraction. The described Linux condition instead directly exposes this risk: extending an LVM logical volume without growing the filesystem leaves application-visible free space unchanged.
Question 210
A production Linux host has this unresolved condition: A container retains old environment settings after a deployment updated only a host shell variable. What should the administrator do FIRST?
- Inspect apt package holds and approved pinning policy before scheduling the targeted update
- Recreate or appropriately restart the service with explicit container environment configuration
- Configure an appropriate persistent timer and corresponding oneshot service with verified calendar settings
- Check the path with lsof and resolve the owning process before retrying the maintenance step
Explanation
Correct Answer
B:Recreate or appropriately restart the service with explicit container environment configuration. This directly addresses the stated Linux administration condition because container environment variables are captured at creation and do not automatically follow unrelated host shell edits. If the underlying problem is ignored, expecting an already-running container to inherit arbitrary later host environment changes can leave stale credentials. Verify the fix by confirming that the newly created container reports the intended approved environment and application behavior.
Incorrect Answers
A:Inspect apt package holds and approved pinning policy before scheduling the targeted update could be useful for a different Linux requirement, for example when an Ubuntu host needs a security fix but unattended upgrades are unintentionally held for one package. In the current condition, the effective action is to recreate or appropriately restart the service with explicit container environment configuration.
C:Configure an appropriate persistent timer and corresponding oneshot service with verified calendar settings could be useful for a different Linux requirement, for example when a periodic backup job needs a systemd timer that runs after a host was powered off overnight. In the current condition, the effective action is to recreate or appropriately restart the service with explicit container environment configuration.
D:Check the path with lsof and resolve the owning process before retrying the maintenance step could be useful for a different Linux requirement, for example when a log-rotation process cannot delete an archived file because another process still has it open. In the current condition, the effective action is to recreate or appropriately restart the service with explicit container environment configuration.