Free XK0-006 Exam Braindumps
CompTIA Linux+ Questions 57–64 (page: 9)

Updated On: 30-Apr-2026

A systems administrator is creating a backup copy of the /home/ directory. Which of the following commands allows the administrator to archive and compress the directory at the same time?

  1. cpio -o /backups/home.tar.xz /home/
  2. rsync -z /backups/home.tar.xz /home/
  3. tar -cJf /backups/home.tar.xz /home/
  4. dd of=/backups/home.tar.xz if=/home/

Answer(s): C

Explanation:

The tar -cJf command creates (-c) an archive, compresses it with XZ (-J), and writes it to a file (-f). This allows archiving and compression of the /home/ directory in one step.



An administrator receives reports that a web service is not responding. The administrator reviews the following outputs:



Which of the following is the reason the web service is not responding?

  1. The private key needs to be renamed from server.crt to server.key so the service can find it.
  2. The private key does not match the public key, and both keys should be replaced.
  3. The private key is not in the correct location and needs to be moved to the correct directory.
  4. The private key has the incorrect permissions and should be changed to 0755 for the service.

Answer(s): C

Explanation:

The error log shows "cannot load certificate key /etc/pki/nginx/private/server.key", but the listing reveals that server.key is located in /etc/pki/nginx/ rather than the expected /etc/pki/nginx/private/ directory. Since the file exists but not where Nginx is configured to look, moving it to the correct directory resolves the issue.



Which of the following best describes a use case for playbooks in a Linux system?

  1. To provide a set of tasks and configurations to deploy an application
  2. To provide the instructions for implementing version control on a repository
  3. To provide the security information required for a container
  4. To provide the storage volume information required for a pod

Answer(s): A

Explanation:

In Ansible, a playbook is a YAML file that defines tasks, configurations, and automation workflows. It is commonly used to deploy applications, configure systems, and manage infrastructure on Linux systems.



An administrator must secure an account for a user who is going on extended leave. Which of the following steps should the administrator take? (Choose two).

  1. Set the user's files to immutable.
  2. Instruct the user to log in once per week.
  3. Delete the user's /home folder.
  4. Run the command passwd -l user.
  5. Change the date on the /home folder to that of the expected return date.
  6. Change the user's shell to /sbin/nologin.

Answer(s): D,F

Explanation:

passwd -l user locks the user's account by disabling the password, preventing logins.
Change the user's shell to /sbin/nologin ensures the account cannot be used for interactive logins, further securing it.



A Linux administrator needs to securely erase the contents of a hard disk. Which of the following commands is the best for this task?

  1. sudo rm -rf /dev/sda1
  2. sudo shred /dev/sda1
  3. sudo parted rm /dev/sda1
  4. sudo dd if=/dev/null of=/dev/sda1

Answer(s): B

Explanation:

The shred command securely erases data by overwriting the specified device or file multiple times, making recovery nearly impossible. This is the best option for securely erasing a hard disk.



Which of the following utilities supports the automation of security compliance and vulnerability management?

  1. SELinux
  2. Nmap
  3. AIDE
  4. OpenSCAP

Answer(s): D

Explanation:

OpenSCAP is a framework that automates security compliance checking and vulnerability management by using standardized security content (SCAP). It helps administrators enforce policies and detect vulnerabilities.



Users report that a Linux system is unresponsive and simple commands take too long to complete. The Linux administrator logs in to the system and sees the following:



Which of the following is the system experiencing?

  1. High latency
  2. High uptime
  3. High CPU load
  4. High I/O wait times

Answer(s): C

Explanation:

The load averages (8.71, 8.24, 7.71) are well above the number of CPUs (4), showing CPU saturation.
Additionally, Output 2 indicates very high CPU usage (65.88% usr, 20.54% sys) with 0% idle, confirming the system is under heavy CPU load, which explains the unresponsiveness.



A systems administrator wants to prevent the current contents of a file from being overwritten and wants to allow new additions at the end of the file. Which of the following commands should the administrator use?

  1. setenforce file
  2. setfacl -m m::t file
  3. chattr +a file
  4. chmod +t file

Answer(s): C

Explanation:

The chattr +a command sets the append-only attribute on a file. This prevents overwriting or deletion of existing contents, while still allowing new data to be appended to the end of the file.



Viewing page 9 of 19
Viewing questions 65 - 72 out of 160 questions


Post your Comments and Discuss CompTIA XK0-006 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!