Skip to content

CompTIA Linux+

Here you have the best CompTIA XK0-005 practice exam questions

  • Preview the first 5 of 477 questions for free
  • These questions were last updated on May 6, 2026
  • This site is not affiliated with or endorsed by CompTIA.
Question 1 of 477

An administrator accidentally deleted the /boot/vmlinuz file and must resolve the issue before the server is rebooted. Which of the following commands should the administrator use to identify the correct version of this file?

Answer

Suggested Answer

The suggested answer is A.

To identify the correct version of the /boot/vmlinuz file that needs to be restored, the 'rpm -qa | grep kernel' command can be used to list all installed kernel packages, and 'uname -a' can display information about the currently running kernel. By combining the outputs of these commands, an administrator can determine the specific version of the kernel that is needed. This approach directly addresses the requirement to identify the correct version of the deleted file.

Community Votes4 votes
ASuggested
100%
Question 2 of 477

A cloud engineer needs to change the secure remote login port from 22 to 49000. Which of the following files should the engineer modify to change the port number to the desired value?

Answer

Suggested Answer

The suggested answer is D.

To change the secure remote login port from 22 to 49000, the engineer should modify the /etc/ssh/sshd_config file. This file contains the configuration settings for the SSH server, including the port number. The engineer needs to find the line that specifies Port 22 and change it to Port 49000. After making this change, the SSH service must be restarted for the new port configuration to take effect.

Community Votes3 votes
DSuggested
100%
Question 3 of 477

A new file was added to a main Git repository. An administrator wants to synchronize a local copy with the contents of the main repository. Which of the following commands should the administrator use for this task?

Answer

Suggested Answer

The suggested answer is B.

To synchronize a local copy with the contents of the main Git repository, the administrator should use the 'git pull' command. This command fetches the latest changes from the remote repository and merges them into the local branch, ensuring that the local copy has the most recent updates, including any new files that were added.

Community Votes1 vote
DMost voted
100%
Question 4 of 477

A Linux administrator needs to redirect all HTTP traffic temporarily to the new proxy server 192.0.2.25 on port 3128. Which of the following commands will accomplish this task?

Answer

Suggested Answer

The suggested answer is D.

To redirect all HTTP traffic temporarily to the new proxy server 192.0.2.25 on port 3128, the command used must perform destination NAT (DNAT) on incoming TCP packets destined for port 80. The correct command that meets all these criteria is 'iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 192.0.2.25:3128'. This command appends a rule to the PREROUTING chain in the NAT table, specifically targeting TCP packets with a destination port of 80 and redirecting them to the new proxy server at the specified IP address and port.

Community Votes1 vote
DSuggested
100%
Question 5 of 477

Developers have requested implementation of a persistent, static route on the application server. Packets sent over the interface eth0 to 10.0.213.5/32 should be routed via 10.0.5.1. Which of the following commands should the administrator run to achieve this goal?

Answer

Suggested Answer

The suggested answer is D.

To implement a persistent, static route on the application server, the command 'ip route add 10.0.213.5/32 via 10.0.5.1 dev eth0' should be used. This command correctly specifies that packets sent to the destination 10.0.213.5/32 should be routed via the gateway 10.0.5.1, using the interface eth0. The 'ip route add' command is the appropriate way to add a new route to the routing table in Linux. For persistence across reboots, this command should be added to the appropriate network configuration file or system startup script.

Community Votes1 vote
DSuggested
100%

472 more questions await

Unlock the full CompTIA XK0-005 question bank

5 of 477 completed1%

Choose your plan

One-time payment · No subscription · No hidden fees

Standard

Quick preparation

$25

30 days access

30 day access to all questions
Instant free updates
Highest passing rate in industry
Printable PDF download
No money-back guarantee
Best Value

Premium

Guaranteed success

$60$35

90 days access

PDF

Printable PDF download

New

Save every question as a PDF for offline study or printing.

90 day access to all questions
Instant free updates
Highest passing rate in industry
Pass guaranteed or money back

100% Money-Back Guarantee

Don't pass? Full refund.

4.9/5

Based on 4,748+ reviews

Trusted by thousands of professionals

Join certified professionals who passed their exams with Examice

Examice helped me pass my AWS certification on the first try! The questions were incredibly similar to the real exam. Comments helped me understand answers I was struggling with.
S
Sarah C.
Cloud Engineer
Great results in a short prep time. Passed on my first attempt.
D
David K.
Network Engineer
I needed to pass an exam for work, and this website delivered. The quality for the price is outstanding, and the support is really good. I passed without issues.
M
Michael R.
Security Analyst
Skeptical at first, but impressed. Every question included clear, detailed explanations.
L
Lisa M.
Solutions Architect
The guarantee gave me confidence to invest in the premium package. Turns out I didn't need it. Passed comfortably. The explanations for each answer were incredibly detailed and helped me grasp security concepts that I'd been struggling with for months.
R
Robert H.
Cybersecurity Consultant
Used Examice for my PMP certification. The questions were well structured and covered all exam domains thoroughly.
J
James T.
IT Manager
After failing my first attempt with other study materials, I switched to Examice and passed confidently on my second attempt.
A
Anna W.
Data Engineer
The premium package was worth it. 90 days of access gave me the flexibility to study when it worked for me, without feeling rushed.
E
Emily J.
DevOps Engineer
Straightforward questions that matched the real exam perfectly. Studied for two weeks and passed with a great score.
K
Karen P.
Systems Administrator

Frequently Asked Questions

Everything you need to know. Contact us for more.

Our CompTIA XK0-005 questions are based on real exam experiences and are continuously updated to match the current exam format. We maintain a +99% pass rate because our questions closely mirror what you'll see on the actual exam.

With our Premium package, you get a 100% money-back guarantee. If you don't pass your exam after studying with our materials, simply contact us with your exam results and we'll refund your purchase. Terms and conditions apply, read our full refund policy to learn more.

Our question bank is updated regularly based on feedback from recent exam takers. We typically review and update our content every week with reports about new questions or changes to the exam format.

Standard package access cannot be extended. However, Premium package gives you 90 days which is typically more than enough time to prepare thoroughly. If you need additional time, you can purchase a new package at any time.

This is a one-time payment with no recurring charges. Once you purchase, you get full access to all exam questions for the duration of your package (30 days for Standard, 90 days for Premium). No hidden fees or automatic renewals.

Pass on your first try

All 477questions · Detailed explanations · Printable PDF · 90 days access

Money-back guaranteeSecure checkout
$35

one-time payment