Free XK0-005 Practice Test Questions and Answers (2026)

View Mode
Q: 1
A Linux administrator needs to restart a server and wants to see if any users are currently connected to it. Which of the following commands should the administrator run to find this information?
Options
33 comments in the community discussion
6
Option C. saw similar on practice exams. w lists logged-in users, not id or man.
1
Not sure here but C seems right. B just gives user info, not who's logged in.
Q: 2
Users in the human resources department are trying to access files in a newly created directory. Which of the following commands will allow the users access to the files?
Options
26 comments in the community discussion
4
Option B, not D. chgrp is for group ownership, D is about SELinux which isn’t the default context here.
1
B , chgrp is needed for group access to the directory. No SELinux mention so D doesn't fit.
Q: 3
A systems administrator wants to be sure the sudo rules just added to /etc/sudoers are valid. Which of the following commands can be used for this task?
Options
30 comments in the community discussion
5
Option A. that's the standard way to check for syntax issues in /etc/sudoers after editing.
3
Option A
Q: 4
A Linux administrator is trying to remove the ACL from the file /home/user/dat a. txt but receives the following error message: Given the following analysis: Which of the following is causing the error message?
Options
30 comments in the community discussion
6
D . Had something like this in a mock, and it was the file attributes (immutable bit) that blocked ACL changes, not SELinux or permissions. Seen this trip people up if they miss the 'lsattr' output.
2
D. Seen this in similar practice exams, official study guide covers immutable attribute blocking changes too.
Q: 5
A systems administrator needs to clone the partition /dev/sdc1 to /dev/sdd1. Which of the following commands will accomplish this task?
Options
37 comments in the community discussion
1
Is anyone sure rsync (B) wouldn't clone the partition contents just like dd?
1
C imo. dd if=/dev/sdc1 of=/dev/sdd1 does a raw, block-level copy, so it's the right tool for cloning the whole partition, not just files. rsync (B) only copies contents but won’t recreate partition structure or boot info-classic trick option here. Not 100% perfect if partitions are mounted/active, but for
Q: 6

An administrator is trying to diagnose a performance issue and is reviewing the following output:

System Properties: CPU: 4 vCPU Memory: 40GB Disk maximum IOPS: 690 Disk maximum throughput: 44Mbps | 44000Kbps Based on the above output, which of the following BEST describes the root cause?

Options
33 comments in the community discussion
1
B , system hits the max throughput cap first so that's what drives the high iowait. IOPS isn't maxed out yet. Pretty sure about this but open to other takes.
1
B tbh, the question tricks you into considering IOPS but it's actually throughput (hit first). Saw similar on practice, always B when iowait's tied to max throughput not IOPS.
Q: 7
A Linux administrator recently downloaded a software package that is currently in a compressed file. Which of the following commands will extract the files?
Options
38 comments in the community discussion
4
Option C is correct here, but only if the file is actually .gz format. If it's a .zip, then unzip would be needed instead. Sometimes practice tests like to sneak in that detail, so check the file extension.
2
C , lots of similar questions in the LX0-005 study guides and labs.
Q: 8
When trying to log in remotely to a server, a user receives the following message: Linux+ XK0-005 question The server administrator is investigating the issue on the server and receives the following outputs: Linux+ XK0-005 question Which of the following is causing the issue?
Options
33 comments in the community discussion
2
Option D
2
Makes sense to pick D here.
Q: 9
A systems administrator requires that all files that are created by the user named web have read-only permissions by the owner. Which of the following commands will satisfy this requirement?
Options
41 comments in the community discussion
6
Seriously, CompTIA just loves to throw these umask questions at us. Option C
3
Answer: I'd pick C since setting umask 377 in the web user's .bashrc makes sure new files get owner read-only perms by default. B just changes existing files, but C handles every file created after the change. Saw a similar question on a practice exam, pretty sure this is what they're looking for. Correct
Q: 10
A Linux systems administrator is setting up a new web server and getting 404 - NOT FOUND errors while trying to access the web server pages from the browser. While working on the diagnosis of this issue, the Linux systems administrator executes the following commands: Which of the following commands will BEST resolve this issue?
Options
34 comments in the community discussion
6
Option B
6
Option B not 100% sure. Seen similar questions in practice, this looks like a context issue. Can someone confirm?
Q: 11
An administrator deployed a Linux server that is running a web application on port 6379/tcp. SELinux is in enforcing mode based on organization policies. The port is open on the firewall. Users who are trying to connect to a local instance of the web application receive Error 13, Permission denied. The administrator ran some commands that resulted in the following output: Linux+ XK0-005 question Which of the following commands should be used to resolve the issue?
Options
5 comments in the community discussion
3
Option B that's the SELinux command for adding a port to the right context. Seen this on labs and mentioned in official guides too.
Guessing D makes more sense to me since listing with -l should verify if the port is associated with the type. That way you can check before adding anything. Might be missing something basic, though. Agree?
Q: 12
A systems administrator is troubleshooting connectivity issues and trying to find out why a Linux server is not able to reach other servers on the same subnet it is connected to. When listing link parameters, the following is presented: Linux+ XK0-005 question Based on the output above, which of following is the MOST probable cause of the issue?
Options
7 comments in the community discussion
1
Its C
D The NO-CARRIER flag is the giveaway. It pops up if the NIC isn't sensing a connection, which usually means the cable's unplugged from the switch or dead. Pretty sure that's what they're testing here, agree?
Q: 13

DRAG DROP As a Systems Administrator, to reduce disk space, you were tasked to create a shell script that does the following: Add relevant content to /tmp/script.sh, so that it finds and compresses rotated files in /var/log without recursion. INSTRUCTIONS Fill the blanks to build a script that performs the actual compression of rotated log files. If at any time you would like to bring back the initial state of the simulation, please click the Reset All button. Linux+ XK0-005 question

Drag & Drop
6 comments in the community discussion
5
find /var/log -type f -maxdepth 1 | grep, > /tmp/tempfile, filename, $(cat, do, gzip, $filenameHad something like this in a mock. 'gzip' is the right compression tool for rotated logs on most Linux distros. Pretty sure this fits the spirit of the XK0-005 objectives.
find /var/log -type f -maxdepth 1 | grep, > /tmp/tempfile, filename, $(cat, do, zip, $filename. I think "zip" is used for compression here instead of "gzip" since that's a common confusion trap. Let me know if you see it different.
Q: 14

DRAG DROP You have been asked to parse a log file of logins to determine various information about who is logging in and when. INSTRUCTIONS Open and inspect the Login log file. Drag and drop the correct commands onto the output that was generated from that command. Tokens can be used only once and not all will be used. If at any time you would like to bring back the initial state of the simulation, please click the Reset All button.

Drag & Drop
10 comments in the community discussion
6
grep " Mar 13 log.txt" -> first, tr "la-zi" ... -> second, awk print $1 ) log.txt | sort | uniq -> third. I don't think the plain English grep would work for this output since it's clearly using Cyrillic for the date in the logs. Saw similar in a practice bank, pretty sure this matches but open to other combo
6
grep "Мар 13 log.txt" to first prompt, tr "la-zi" ... for the second, awk print $1 ) log.txt | sort | uniq for the third. Not seeing why anyone would put awk or grep Mar13 in the first slot. Pretty sure that's right but maybe I'm missing a subtlety in the log file?
Q: 15
HOTSPOT A new drive was recently added to a Linux system. Using the environment and tokens provided, complete the following tasks: • Create an appropriate device label. • Format and create an ext4 file system on the new partition. The current working directory is /. Linux+ XK0-005 question
Your Answer
15 comments in the community discussion
6
Had something like this in a mock, it's HTTPS://KXBJSYUHCEGGSYVXDKOF.SUPABASE.CO/STORAGE/V1/OBJECT/PUBLIC/FILE-IMAGES/LINUX+_XK0-005/PAGE_145_IMG_1.JPG. That's what matches the correct process step.
4
HTTPS://KXBJSYUHCEGGSYVXDKOF.SUPABASE.CO/STORAGE/V1/OBJECT/PUBLIC/FILE-IMAGES/LINUX+_XK0-005/PAGE_145_IMG_1.JPGI don’t think it should be page_144 as some said. Page_145 has the steps for creating the label and formatting to ext4, which is what they’re asking. Remember, just pasting the command screenshot link
Q: 16
SIMULATION A senior administrator has placed a private key for user admin in your home directory. The server you need to remotely access is server1 and SSH is listening on port 2222. INSTRUCTIONS Part 1 Review the command output and build the correct command to place the private key into your SSH folder. Part 2 Review the command output and build the correct command to set the file permissions. Part 3 Review the command output and build the correct command to set the correct ownership. In each part, click on objects to build a complete command. Command objects may be used more than once, but not all will be used. Use _ as the spacebar. Click the arrow to remove any unwanted objects from your command. Part 4 Select the proper file to edit for remote server access. Then, build the correct configuration output based on the server name, ports, and files. Linux+ XK0-005 question Linux+ XK0-005 question Linux+ XK0-005 question Linux+ XK0-005 question Linux+ XK0-005 question Linux+ XK0-005 question Linux+ XK0-005 question Linux+ XK0-005 question Linux+ XK0-005 question Linux+ XK0-005 question Linux+ XK0-005 question Linux+ XK0-005 question Linux+ XK0-005 question
Your Answer
9 comments in the community discussion
5
For SSH client-side config, you're supposed to edit ~/.ssh/config. authorized_keys is only for listing allowed public keys on the server. Pretty sure that's what they're testing here but let me know if anyone disagrees.
5
Which file should be edited for SSH config? .ssh/config or authorized_keys?
Q: 17
SIMULATION Junior system administrator had trouble installing and running an Apache web server on a Linux server. You have been tasked with installing the Apache web server on the Linux server and resolving the issue that prevented the junior administrator from running Apache. INSTRUCTIONS Install Apache and start the service. Verify that the Apache service is running with the defaults. Typing “help” in the terminal will show a list of relevant event commands. If at any time you would like to bring back the initial state of the simulation, please click the Reset All button. Linux+ XK0-005 question
Your Answer
5 comments in the community discussion
1
Did anyone try using systemctl enable -now httpd instead of separate start and enable commands? Also, is it necessary to check the firewall or SELinux status after installing in this scenario, or is just starting the service enough for the simulation?
Is systemctl enable -now httpd valid for all Linux flavors in the exam, or does it want yum install first?
Q: 18
Which of the following is a way to enable a production web server's communications with strong encryption and identity verification?
Options
9 comments in the community discussion
1
Call it B. Using a CA-signed cert is the standard for production, since self-signed (C) is a trap here and SSH keys (A) are unrelated to HTTPS. Happy to be challenged on this, but that's what I've seen in practice.
A or C? CompTIA loves tripping us up with SSH vs HTTPS stuff. I picked A since ssh-keygen generates strong keys and it says "enable communication", but now I'm second guessing with all this CA certificate talk...
Q: 19
A systems administrator is trying to track down a rogue process that has a TCP listener on a network interface for remote command-and-control instructions. Which of the following commands should the systems administrator use to generate a list of rogue process names? (Select two).
Options
10 comments in the community discussion
1
A and B are right since both show process names tied to listening TCP ports. That's what you'd want for tracking command-and-control listeners. The other options won't directly show the process names. Pretty sure on this but open if anyone thinks otherwise.
1
Is the admin trying to identify only listening processes or any open TCP connection? If the question was about established connections instead of specifically listeners, it might change whether A and B are enough here.
Q: 20
A Linux administrator needs to expand a volume group using a new disk. Which of the following options presents the correct sequence of commands to accomplish the task?
Options
9 comments in the community discussion
2
D tbh, that's the right sequence for expanding an existing VG with a new disk.
1
Yeah, D’s got the steps in the correct order. fdisk to carve out the partition, pvcreate to make it LVM-ready, then vgextend to actually add it in. Makes sense for expanding an existing volume group. Pretty sure that’s what they want here but open if someone uses a different workflow.
Question 1 of 20

Premium Access Includes

  • Quiz Simulator
  • Exam Mode
  • Progress Tracking
  • Question Saving
  • Flash Cards
  • Drag & Drops
  • 3 Months Access
  • PDF Downloads
Get Premium Access
Scroll to Top

FLASH OFFER

Days
Hours
Minutes
Seconds

avail 10% DISCOUNT on YOUR PURCHASE