CompTIA Linux+ XK0-006 Practice Test 60
Question 590
A production Linux host has this unresolved condition: A Linux operator wants to preserve permissions and timestamps while archiving a website configuration tree. What should the administrator do FIRST?
- Check lm_sensors and supported BMC hardware readings using ipmitool before altering workloads
- Create a tar archive with appropriate metadata handling and verify extraction in a separate test directory
- Validate source availability and use a versioned destination or reviewed deletion policy before synchronization
- Use shell append redirection or tee -a rather than output truncation when writing the report
Explanation
Correct Answer
B:Create a tar archive with appropriate metadata handling and verify extraction in a separate test directory. This directly addresses the stated Linux administration condition because tar preserves directory hierarchy and selected filesystem metadata independently of optional compression. If the underlying problem is ignored, assuming compression by itself preserves ownership and permissions can produce incomplete restores. Verify the fix by confirming that a test restore reproduces the expected files and required ownership metadata.
Incorrect Answers
A:Check lm_sensors and supported BMC hardware readings using ipmitool before altering workloads could be useful for a different Linux requirement, for example when a rack server reports thermal alarms while ordinary CPU usage remains low. In the current condition, the effective action is to create a tar archive with appropriate metadata handling and verify extraction in a separate test directory.
C:Validate source availability and use a versioned destination or reviewed deletion policy before synchronization could be useful for a different Linux requirement, for example when a nightly rsync backup silently removes historical files when its source directory is accidentally emptied. In the current condition, the effective action is to create a tar archive with appropriate metadata handling and verify extraction in a separate test directory.
D:Use shell append redirection or tee -a rather than output truncation when writing the report could be useful for a different Linux requirement, for example when a system administrator needs to append nightly results to a report without destroying previous records. In the current condition, the effective action is to create a tar archive with appropriate metadata handling and verify extraction in a separate test directory.
Question 591
During a Linux service review, the team discovers: An administrator deletes an encrypted drive's file paths and calls the confidential data irrecoverably destroyed. Which corrective action should be selected?
- Restore the appropriate SELinux labels with restorecon after checking the persistent file-context mapping
- Configure UFW with the approved source-limited SSH allowance and a suitable default incoming policy
- Select an appropriate media-specific secure erasure or verified cryptographic erase procedure
- Apply an approved PAM password-quality and expiration policy then test compliant changes
Explanation
Correct Answer
C:Select an appropriate media-specific secure erasure or verified cryptographic erase procedure. This directly addresses the stated Linux administration condition because removing directory entries does not guarantee underlying storage blocks or flash cells are unrecoverable. If the underlying problem is ignored, using a simple rm operation as a certified data sanitization process can leave recoverable confidential data. Verify the fix by confirming that a documented sanitization report and verification meet the approved media disposal standard.
Incorrect Answers
A:Restore the appropriate SELinux labels with restorecon after checking the persistent file-context mapping could be useful for a different Linux requirement, for example when a web root was copied from another filesystem and SELinux now denies access despite correct Unix permissions. In the current condition, the effective action is to select an appropriate media-specific secure erasure or verified cryptographic erase procedure.
B:Configure UFW with the approved source-limited SSH allowance and a suitable default incoming policy could be useful for a different Linux requirement, for example when a remote Ubuntu host should allow administration from one subnet while denying other unsolicited inbound traffic. In the current condition, the effective action is to select an appropriate media-specific secure erasure or verified cryptographic erase procedure.
D:Apply an approved PAM password-quality and expiration policy then test compliant changes could be useful for a different Linux requirement, for example when a privileged local account can reuse the same weak password indefinitely without expiry. In the current condition, the effective action is to select an appropriate media-specific secure erasure or verified cryptographic erase procedure.
Question 592
After applying the relevant Linux fix for A guest application must be accessible from the LAN but its interface uses an isolated host-only virtual network, which evidence BEST demonstrates success?
- mdadm reports both intended active mirrors and a completed synchronization with verified application reads
- findmnt and a controlled reboot show required filesystems mounted while the optional absent disk does not block login
- Both guests obtain distinct identifiers and can communicate without duplicate-address alarms
- A permitted LAN client reaches the guest and undesired network access remains blocked
Explanation
Correct Answer
D:A permitted LAN client reaches the guest and undesired network access remains blocked. This outcome directly tests whether the Linux operation, change the libvirt virtual network to an approved bridged or routed design with necessary policy controls, addresses the specified failure. The technical reason is that host-only networking intentionally limits reachability compared with bridged or routed guest networks. Without correcting the underlying issue, exposing a new TCP listener inside an isolated guest does not make it routable from the external LAN.
Incorrect Answers
A:mdadm reports both intended active mirrors and a completed synchronization with verified application reads might confirm success for a different Linux problem, such as when a degraded Linux RAID1 mirror is still running but /proc/mdstat shows only one healthy member. Here the required evidence is that a permitted LAN client reaches the guest and undesired network access remains blocked.
B:findmnt and a controlled reboot show required filesystems mounted while the optional absent disk does not block login might confirm success for a different Linux problem, such as when a host cannot boot after a stale USB disk entry in /etc/fstab becomes unavailable. Here the required evidence is that a permitted LAN client reaches the guest and undesired network access remains blocked.
C:Both guests obtain distinct identifiers and can communicate without duplicate-address alarms might confirm success for a different Linux problem, such as when a virtualization operator clones a VM but both guest instances come up with duplicate network identities. Here the required evidence is that a permitted LAN client reaches the guest and undesired network access remains blocked.
Question 593
For this Linux+ scenario, An administrator writes a Bash function that must output a generated hostname and separately report success or failure, the planned fix is to use a command's exit status for success/failure and stdout for richer returned data. Why will that fix work?
- Bash return provides an exit status while functions can emit data through standard output
- A Git commit retains an earlier secret in repository history even when a later commit deletes the file
- Infrastructure-as-code state records managed resource identities and coordinates changes to declared resources
- A managed base interpreter may be protected from uncontrolled third-party package writes
Explanation
Correct Answer
A:Bash return provides an exit status while functions can emit data through standard output. That is the key operating principle behind the selected remediation, use a command's exit status for success/failure and stdout for richer returned data. The distinction matters because expecting the return builtin to transmit arbitrary strings can truncate or reject the desired result. An appropriate observable outcome is that a caller reads the intended output text and separately checks the function exit status.
Incorrect Answers
B:A Git commit retains an earlier secret in repository history even when a later commit deletes the file is a valid explanation for another Linux operation, such as when a security team accidentally committed an API secret and wants to hide it with a later deletion commit. The principle here is that Bash return provides an exit status while functions can emit data through standard output.
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 Bash return provides an exit status while functions can emit data through standard output.
D:A managed base interpreter may be protected from uncontrolled third-party package writes is a valid explanation for another Linux operation, such as when a Linux script installs Python packages straight into the vendor-managed system interpreter. The principle here is that Bash return provides an exit status while functions can emit data through standard output.
Question 594
For the Linux issue A Linux script installs Python packages straight into the vendor-managed system interpreter, the administrator applies use a project-scoped virtual environment and a requirements lock or supported dependency manifest. Which observation MOST directly confirms recovery?
- A caller reads the intended output text and separately checks the function exit status
- The project operates using its isolated environment without changing OS-managed Python packages
- The reviewed branch has one intended change and its resulting configuration matches the tested version
- A second playbook run reports no unnecessary changes and all permitted SSH checks pass
Explanation
Correct Answer
B:The project operates using its isolated environment without changing OS-managed Python packages. This outcome directly tests whether the Linux operation, use a project-scoped virtual environment and a requirements lock or supported dependency manifest, addresses the specified failure. The technical reason is that a managed base interpreter may be protected from uncontrolled third-party package writes. Without correcting the underlying issue, bypassing distribution protections can break system Python tools or create incompatible shared libraries.
Incorrect Answers
A:A caller reads the intended output text and separately checks the function exit status might confirm success for a different Linux problem, such as when an administrator writes a Bash function that must output a generated hostname and separately report success or failure. Here the required evidence is that the project operates using its isolated environment without changing OS-managed Python packages.
C:The reviewed branch has one intended change and its resulting configuration matches the tested version might confirm success for a different Linux problem, such as when a team wants to merge multiple small Linux configuration commits into one reviewed deployment change. Here the required evidence is that the project operates using its isolated environment without changing OS-managed Python packages.
D:A second playbook run reports no unnecessary changes and all permitted SSH checks pass might confirm success for a different Linux problem, such as when a fleet of twenty Linux servers needs the same SSH daemon settings without logging into each host interactively. Here the required evidence is that the project operates using its isolated environment without changing OS-managed Python packages.
Question 595
A Linux administrator is evaluating the operational consequences of A fleet of twenty Linux servers needs the same SSH daemon settings without logging into each host interactively. Which problem is MOST directly associated?
- Replacing peer review with a model verdict can miss privilege escalation and idempotency mistakes
- Using a simple for name in $(ls) construct can corrupt filenames and process incorrect paths
- Running different untracked manual commands on every server can cause configuration drift
- Assuming global site-packages match every machine can cause missing or incompatible module failures
Explanation
Correct Answer
C:Running different untracked manual commands on every server can cause configuration drift. This follows from the underlying Linux mechanism: agentless Ansible can apply declarative configuration tasks over supported remote connections. A targeted remedy is to use an Ansible inventory and an idempotent playbook with reviewed templates and change validation. After correction, a useful verification is that a second playbook run reports no unnecessary changes and all permitted SSH checks pass.
Incorrect Answers
A:Replacing peer review with a model verdict can miss privilege escalation and idempotency mistakes can be a concern in another case, for example when a team uses a private local LLM to review an Ansible playbook and assumes no further code security check is needed. The described Linux condition instead directly exposes this risk: running different untracked manual commands on every server can cause configuration drift.
B:Using a simple for name in $(ls) construct can corrupt filenames and process incorrect paths can be a concern in another case, for example when a script loops through filenames containing spaces and unexpectedly splits one path into multiple arguments. The described Linux condition instead directly exposes this risk: running different untracked manual commands on every server can cause configuration drift.
D:Assuming global site-packages match every machine can cause missing or incompatible module failures can be a concern in another case, for example when a Python monitoring script imports a library in development but fails after deployment on an otherwise healthy Linux host. The described Linux condition instead directly exposes this risk: running different untracked manual commands on every server can cause configuration drift.
Question 596
After applying the relevant Linux fix for An API on Linux meets average latency targets but brief outages are invisible in its dashboard, which evidence BEST demonstrates success?
- A controlled multi-host test produces time-ordered events with accurate source identifiers
- Bond status and link counters show healthy members and successful failover testing
- The corrected unit becomes active and the service logs show its successful startup
- A controlled short outage is reflected in the SLI and objective burn-rate measurements
Explanation
Correct Answer
D:A controlled short outage is reflected in the SLI and objective burn-rate measurements. This outcome directly tests whether the Linux operation, define an appropriate availability SLI and SLO and capture high-resolution success rates rather than daily mean latency alone, addresses the specified failure. The technical reason is that service-level indicators describe measured service behavior while objectives express a target over a defined period. Without correcting the underlying issue, a monthly average can conceal short severe failures that affect customers.
Incorrect Answers
A:A controlled multi-host test produces time-ordered events with accurate source identifiers might confirm success for a different Linux problem, such as when a log pipeline reports a Linux service crash but its event timestamps are inconsistent across three hosts. Here the required evidence is that a controlled short outage is reflected in the SLI and objective burn-rate measurements.
B:Bond status and link counters show healthy members and successful failover testing might confirm success for a different Linux problem, such as when a network team creates an interface bond but one member negotiates a different speed and loses traffic. Here the required evidence is that a controlled short outage is reflected in the SLI and objective burn-rate measurements.
C:The corrected unit becomes active and the service logs show its successful startup might confirm success for a different Linux problem, such as when a custom systemd unit fails because its configured executable was moved during a package upgrade. Here the required evidence is that a controlled short outage is reflected in the SLI and objective burn-rate measurements.
Question 597
For this Linux+ scenario, A platform team uses OpenTofu to provision cloud Linux hosts but two engineers overwrite the same state file, the planned fix is to use a properly protected shared state backend with locking and reviewed plan/apply workflow. Why will that fix work?
- Infrastructure-as-code state records managed resource identities and coordinates changes to declared resources
- Kubernetes workload configuration and secret distribution can be managed separately from application image layers
- Generated code can hallucinate API names and data fields even when its syntax is valid
- git stash can temporarily store working-tree and index modifications independently of branch history
Explanation
Correct Answer
A:Infrastructure-as-code state records managed resource identities and coordinates changes to declared resources. That is the key operating principle behind the selected remediation, use a properly protected shared state backend with locking and reviewed plan/apply workflow. The distinction matters because concurrent uncoordinated state writes can orphan infrastructure or undo another engineer's changes. An appropriate observable outcome is that a second plan after an approved apply shows a consistent state with no unexpected drift.
Incorrect Answers
B:Kubernetes workload configuration and secret distribution can be managed separately from application image layers is a valid explanation for another Linux operation, such as when a Kubernetes service requires configuration to change without baking credentials into a container image. The principle here is that infrastructure-as-code state records managed resource identities and coordinates changes to declared resources.
C:Generated code can hallucinate API names and data fields even when its syntax is valid is a valid explanation for another Linux operation, such as when an AI tool proposes Python code that appears to parse logs but fabricates unsupported fields. The principle here is that infrastructure-as-code state records managed resource identities and coordinates changes to declared resources.
D:git stash can temporarily store working-tree and index modifications independently of branch history is a valid explanation for another Linux operation, such as when an administrator needs to update a feature branch while preserving unrelated uncommitted local changes. The principle here is that infrastructure-as-code state records managed resource identities and coordinates changes to declared resources.
Question 598
A production Linux host has this unresolved condition: A team wants to merge multiple small Linux configuration commits into one reviewed deployment change. What should the administrator do FIRST?
- Supply validated cloud-init user-data with approved secrets handling and test it on a fresh instance
- Use a controlled interactive rebase or squash workflow before merging according to branch policy
- Compare model output with current vendor guidance and internal compliance standards before implementation
- Revoke the exposed credential and follow an approved secret-remediation and history-cleanup process
Explanation
Correct Answer
B:Use a controlled interactive rebase or squash workflow before merging according to branch policy. This directly addresses the stated Linux administration condition because Git commit history can be reorganized locally before publication while preserving final content. If the underlying problem is ignored, rewriting a branch already shared with collaborators without coordination can invalidate their references. Verify the fix by confirming that the reviewed branch has one intended change and its resulting configuration matches the tested version.
Incorrect Answers
A:Supply validated cloud-init user-data with approved secrets handling and test it on a fresh instance could be useful for a different Linux requirement, for example when a cloud image must install monitoring packages and authorized SSH keys on first boot. In the current condition, the effective action is to use a controlled interactive rebase or squash workflow before merging according to branch policy.
C:Compare model output with current vendor guidance and internal compliance standards before implementation could be useful for a different Linux requirement, for example when an administrator asks a model to create a Linux hardening policy that conflicts with the organization's approved controls. In the current condition, the effective action is to use a controlled interactive rebase or squash workflow before merging according to branch policy.
D:Revoke the exposed credential and follow an approved secret-remediation and history-cleanup process could be useful for a different Linux requirement, for example when a security team accidentally committed an API secret and wants to hide it with a later deletion commit. In the current condition, the effective action is to use a controlled interactive rebase or squash workflow before merging according to branch policy.
Question 599
In the scenario An administrator changes PAM rules and all SSH users lose access even though their passwords remain valid, the chosen corrective control is to restore a tested PAM configuration and identify the broken auth or account stack entry. What underlying mechanism makes this appropriate?
- A directory setgid bit causes new contained objects to inherit that directory's group under normal creation
- Kerberos ticket validation relies on bounded clock skew between participants
- PAM authentication and account control modules are evaluated in configured order for participating services
- Kernel audit events can record selected actions with process and identity context independent of shell history
Explanation
Correct Answer
C:PAM authentication and account control modules are evaluated in configured order for participating services. That is the key operating principle behind the selected remediation, restore a tested PAM configuration and identify the broken auth or account stack entry. The distinction matters because treating an SSH login failure as only a network firewall problem can ignore a broken authentication stack. An appropriate observable outcome is that a permitted account authenticates and an intentionally denied account remains blocked with clear audit evidence.
Incorrect Answers
A:A directory setgid bit causes new contained objects to inherit that directory's group under normal creation is a valid explanation for another Linux operation, such as when a shared project directory needs new files to inherit its group without making all users world-writable. The principle here is that PAM authentication and account control modules are evaluated in configured order for participating services.
B:Kerberos ticket validation relies on bounded clock skew between participants is a valid explanation for another Linux operation, such as when a Kerberos-enabled Linux client cannot authenticate after its system time drifts far from the domain controller. The principle here is that PAM authentication and account control modules are evaluated in configured order for participating services.
D:Kernel audit events can record selected actions with process and identity context independent of shell history is a valid explanation for another Linux operation, such as when a security team needs durable records of privileged file changes rather than just interactive shell history. The principle here is that PAM authentication and account control modules are evaluated in configured order for participating services.
Question 600
An administrator chooses to recreate or appropriately restart the service with explicit container environment configuration because of this Linux issue: A container retains old environment settings after a deployment updated only a host shell variable. Which technical principle BEST explains the remediation?
- Locking future password authentication does not always revoke every established authenticated process
- Mutable image tags can be retargeted while content-addressed digests select a specific immutable image
- The append flag preserves existing supplementary memberships when adding a group
- Container environment variables are captured at creation and do not automatically follow unrelated host shell edits
Explanation
Correct Answer
D:Container environment variables are captured at creation and do not automatically follow unrelated host shell edits. That is the key operating principle behind the selected remediation, recreate or appropriately restart the service with explicit container environment configuration. The distinction matters because expecting an already-running container to inherit arbitrary later host environment changes can leave stale credentials. An appropriate observable outcome is that the newly created container reports the intended approved environment and application behavior.
Incorrect Answers
A:Locking future password authentication does not always revoke every established authenticated process is a valid explanation for another Linux operation, such as when a user has been removed from a business unit but an old SSH login session still exists. The principle here is that container environment variables are captured at creation and do not automatically follow unrelated host shell edits.
B:Mutable image tags can be retargeted while content-addressed digests select a specific immutable image is a valid explanation for another Linux operation, such as when a developer uses a container image tag called latest and different deployments run different application builds. The principle here is that container environment variables are captured at creation and do not automatically follow unrelated host shell edits.
C:The append flag preserves existing supplementary memberships when adding a group is a valid explanation for another Linux operation, such as when a database support user needs a supplementary group but must retain their existing group memberships. The principle here is that container environment variables are captured at creation and do not automatically follow unrelated host shell edits.