Free CompTIA XK0-005 Exam Actual Questions

The questions for XK0-005 were last updated On Mar 26, 2025

At ValidExamDumps, we consistently monitor updates to the CompTIA XK0-005 exam questions by CompTIA. Whenever our team identifies changes in the exam questions,exam objectives, exam focus areas or in exam requirements, We immediately update our exam questions for both PDF and online practice exams. This commitment ensures our customers always have access to the most current and accurate questions. By preparing with these actual questions, our customers can successfully pass the CompTIA Linux+ Certification Exam exam on their first attempt without needing additional materials or study guides.

Other certification materials providers often include outdated or removed questions by CompTIA in their CompTIA XK0-005 exam. These outdated questions lead to customers failing their CompTIA Linux+ Certification Exam exam. In contrast, we ensure our questions bank includes only precise and up-to-date questions, guaranteeing their presence in your actual exam. Our main priority is your success in the CompTIA XK0-005 exam, not profiting from selling obsolete exam questions in PDF or Online Practice Test.

 

Question No. 1

An administrator attempts to connect to a remote server by running the following command:

$ nmap 192.168.10.36

Starting Nmap 7.60 ( https://nmap.org ) at 2022-03-29 20:20 UTC

Nmap scan report for www1 (192.168.10.36)

Host is up (0.000091s latency).

Not shown: 979 closed ports

PORT STATE SERVICE

21/tcp open ftp

22/tcp filtered ssh

631/tcp open ipp

Nmap done: 1 IP address (1 host up) scanned in 0.06 seconds

Which of the following can be said about the remote server?

Show Answer Hide Answer
Correct Answer: A

This is because the port 22/tcp is shown as filtered by nmap, which means that nmap cannot determine whether the port is open or closed because a firewall or other device is blocking its probes. If the SSH server was not running on the remote server, the port would be shown as closed, which means that nmap received a TCP RST packet in response to its probe. If the remote SSH server was using SSH protocol version 1, the port would be shown as open, which means that nmap received a TCP SYN/ACK packet in response to its probe. If the SSH host key on the remote server had expired, the port would also be shown as open, but the SSH client would display a warning message about the host key verification failure. Therefore, the best explanation for the filtered state of the port 22/tcp is that a firewall is preventing nmap from reaching the SSH server.

You can find more information about nmap port states and how to interpret them in the following web search results:

Nmap scan what does STATE=filtered mean?

How to find ports marked as filtered by nmap

Technical Tip: NMAP scan shows ports as filtered


Question No. 2

A Linux administrator rebooted a server. Users then reported some of their files were missing. After doing some troubleshooting, the administrator found one of the filesystems was missing. The filesystem was not listed in /etc/f stab and might have been mounted manually by someone prior to reboot. Which of the following would prevent this issue from reoccurring in the future?

Show Answer Hide Answer
Correct Answer: C

The best way to prevent this issue from reoccurring in the future is to create a mount unit and enable it to be started at boot. A mount unit is a systemd unit that defines how and where a filesystem should be mounted. By creating a mount unit for the missing filesystem and enabling it with systemct1 enable, the administrator can ensure that the filesystem will be automatically mounted at boot time, regardless of whether it is listed in /etc/fstab or not. Syncing the mount units will not prevent the issue, as it will only synchronize the state of existing mount units with /etc/fstab, not create new ones. Mounting the filesystem manually will not prevent the issue, as it will only mount the filesystem temporarily, not permanently. Remounting all the missing filesystems will not prevent the issue, as it will only mount the filesystems until the next reboot, not after.Reference:CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 14: Managing Disk Storage, page 457.


Question No. 3

Which of the following actions are considered good security practices when hardening a Linux server? (Select two).

Show Answer Hide Answer
Correct Answer: B, E

Some good security practices when hardening a Linux server are:

Removing unnecessary packages (B) to reduce the attack surface and eliminate potential vulnerabilities

Disabling the SSH root login possibility (E) to prevent unauthorized access and brute-force attacks on the root accountReference:

[CompTIA Linux+ Study Guide], Chapter 9: Securing Linux, Section: Hardening Linux

[How to Harden Your Linux Server]


Question No. 4

A junior administrator updated the PostgreSQL service unit file per the data-base administrator's recommendation. The service has been restarted, but changes have not been applied. Which of the following should the administrator run for the changes to take effect?

Show Answer Hide Answer
Correct Answer: B

To apply changes to a systemd service unit file, the administrator needs to reload the systemd daemon using the commandsystemct1 daemon-reload(B). This will make systemd aware of the new or changed unit files. The other commands will not reload the systemd daemon or apply the changes.Reference:

[CompTIA Linux+ Study Guide], Chapter 7: Managing System Services, Section: Modifying Systemd Services

[How to Reload Systemd Services]


Question No. 5

A junior systems administrator has just generated public and private authentication keys for passwordless login. Which of the following files will be moved to the remote servers?

Show Answer Hide Answer
Correct Answer: D

The file id_rsa.pub will be moved to the remote servers for passwordless login. The id_rsa.pub file is the public authentication key that is generated by thessh-keygencommand. The public key can be copied to the remote servers by using thessh-copy-idcommand or manually. The remote servers will use the public key to authenticate the user who has the corresponding private key (id_rsa). This will allow the user to log in without entering a password. The other options are incorrect because they are either private keys (id_rsa, id_dsa.pem, or id_ecdsa) or non-existent files (id_dsa.pem or id_ecdsa).Reference:CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 13: Managing Network Services, page 410.