Free XK0-006 Exam Braindumps
CompTIA Linux+ Questions 41–48 (page: 7)

Updated On: 30-Apr-2026

A Linux administrator just finished setting up passwordless SSH authentication between two nodes. However, upon test validation, the remote host prompts for a password. Given the following logs:



Which of the following is the most likely cause of the issue?

  1. The SELinux policy is incorrectly targeting the unconfined_u context.
  2. The administrator forgot to restart the SSHD after creating the authorized_keys file.
  3. The authorized_keys file has the incorrect root permissions assigned.
  4. The authorized_keys file does not have the correct security context to match SELinux policy.

Answer(s): D

Explanation:

The log shows avc: denied { read } caused by SELinux when sshd tries to access authorized_keys. The file has the wrong SELinux context (unconfined_u:object_r:home_root_t) instead of the expected context for SSH. This mismatch blocks SSH key authentication even though file permissions are correct. Adjusting the SELinux context (e.g., with restorecon) resolves the issue.



Which of the following commands should a Linux administrator use to determine the version of a kernel module?

  1. modprobe bluetooth
  2. lsmod bluetooth
  3. depmod bluetooth
  4. modinfo bluetooth

Answer(s): D

Explanation:

The modinfo command displays detailed information about a kernel module, including its version, author, description, and parameters.



A Linux user runs the following command:

nohup ping comptia.com &

Which of the following commands should the user execute to attach the process to the current terminal?

  1. renice
  2. jobs
  3. exec
  4. fg

Answer(s): D

Explanation:

The fg command brings a background job to the foreground, attaching it to the current terminal. Since the ping process was started in the background with &, fg is the correct way to reattach it.



A systems administrator wants to review the amount of time the NetworkManager service took to start. Which of the following commands accomplishes this goal?

  1. resolvectl
  2. journalctl
  3. systemctl daemon-reload
  4. systemd-analyze blame

Answer(s): D

Explanation:

The systemd-analyze blame command shows the startup time of each service managed by systemd, allowing the administrator to see how long NetworkManager (or any other service) took to start.



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?

  1. ufw allow dns/tcp to 10.0.0.0/24
  2. ufw enable 53/tcp from 10.0.0.0/24
  3. ufw allow 53/tcp from 10.0.0.0/24
  4. ufw disable from 10.0.0.0/24

Answer(s): C

Explanation:

The ufw allow 53/tcp from 10.0.0.0/24 command explicitly opens TCP port 53 (DNS) for connections coming from the 10.0.0.0/24 network, which is the correct way to configure this firewall rule.



Which of the following describes PEP 8?

  1. The style guide for Python code
  2. Python virtual environments
  3. A package installer for Python
  4. A Python variable holding octal values

Answer(s): A

Explanation:

PEP 8 is the official Python Enhancement Proposal that provides coding style guidelines for writing clean, consistent, and readable Python code.



While hardening a system, an administrator runs a port scan with Nmap, which returned the following output:



Which of the following is the best way to address this security issue?

  1. Configuring a firewall to block traffic on port 23 on the server
  2. Changing the systems administrator's password to prevent unauthorized access
  3. Closing port 80 on the network switch to block traffic
  4. Disabling and removing the Telnet service on the server

Answer(s): D

Explanation:

Port 23/tcp indicates Telnet, which is insecure because it transmits data in plaintext. The best hardening approach is to disable and remove the Telnet service entirely, eliminating the vulnerability rather than just blocking it at the firewall. Secure alternatives like SSH should be used instead.



A DevOps engineer needs to create a local Git repository. Which of the following commands should the engineer use?

  1. git init
  2. git clone
  3. git config
  4. git add

Answer(s): A

Explanation:

The git init command initializes a new, empty Git repository in the current directory, making it the correct choice for creating a local repository.



Viewing page 7 of 19
Viewing questions 49 - 56 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!