May 22, 2026 PASS CompTIA XK0-005 EXAM WITH UPDATED DUMPS [Q325-Q345]

Share

May 22, 2026 PASS CompTIA XK0-005 EXAM WITH UPDATED DUMPS

XK0-005 Questions PDF [2026] Use Valid New dump to Clear Exam


The CompTIA XK0-005 exam covers a wide range of topics related to Linux operating systems, including installation and package management, GNU and Unix commands, Linux file systems, scripting and data management, Linux security, and much more. XK0-005 exam consists of multiple-choice and performance-based questions, which test candidates' ability to apply their knowledge in real-world scenarios. Passing the CompTIA Linux+ Certification Exam is a great way to demonstrate your skills and knowledge to potential employers and advance your career in the IT field.


CompTIA XK0-005, also known as the CompTIA Linux+ Certification Exam, is a vendor-neutral certification exam designed to validate the skills and knowledge of candidates who want to work with Linux operating systems. XK0-005 exam is intended for those who have experience with Linux and want to advance their careers in the field of IT. CompTIA Linux+ Certification Exam certification demonstrates that candidates have a strong understanding of Linux system administration and can manage and troubleshoot Linux systems in a professional setting.

 

NEW QUESTION # 325
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?

  • A. chown web:web /home/web
  • B. chmod -R 400 /home/web
  • C. setfacl read /home/web
  • D. echo "umask 377" >> /home/web/.bashrc

Answer: D

Explanation:
The command that will satisfy the requirement of having all files that are created by the user named web have read-only permissions by the owner is echo "umask 377" >> /home/web/.bashrc. This command will append the umask 377 command to the end of the .bashrc file in the web user's home directory. The .bashrc file is a shell script that is executed whenever a new interactive shell session is started by the user. The umask command sets the file mode creation mask, which determines the default permissions for newly created files or directories by subtracting from the maximum permissions (666 for files and 777 for directories). The umask 377 command means that the user does not want to give any permissions to the group or others (3 = 000 in binary), and only wants to give read permission to the owner (7 - 3 = 4 = 100 in binary). Therefore, any new file created by the web user will have read-only permission by the owner (400) and no permission for anyone else. Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 8: Managing Users and Groups; Umask Command in Linux | Linuxize


NEW QUESTION # 326
A Linux engineer is setting the sticky bit on a directory called devops with 755 file permission.
Which of the following commands will accomplish this task?

  • A. chown 1755 devops
  • B. chmod 1755 devops
  • C. chmod -s 755 devops
  • D. chown -s 755 devops

Answer: B

Explanation:
The command that will set the sticky bit on a directory called devops with 755 file permission is chmod 1755 devops. This command will use chmod to change the mode of the directory devops to 1755, which means that the owner has read, write, and execute permissions (7), the group has read and execute permissions (5), and others have read and execute permissions (5). The first digit 1 indicates that the sticky bit is set on the directory, which is a special permission that prevents users from deleting or renaming files in the directory that they do not own.


NEW QUESTION # 327
A Linux administrator recently changed the IP addresses of all the web servers from 10.10.50.x to
10.10.100.x. The administrator needs to update the serverlist.txt file to reflect the change.
The file contains the following:
10:WebSvr01:10.10.50.21:Main
11:WebSvr02:10.10.50.22:Acconting
12:WebSvr03:10.10.50.23:Intranet
20:NFS01:10.10.20.21:FileServer
30:SMTP01:10.10.30.31:Email
Which of the following commands will change the IP addresses and update the files in place?

  • A. sed -g 's|.50|.100|a' serverlist.txt
  • B. sed 's|.50|.100|g' serverlist.txt
  • C. sed -i 's|.50|.100|' serverlist.txt
  • D. sed -i 's|.50|.100|g' serverlist.txt

Answer: C


NEW QUESTION # 328
A systems administrator is reviewing the following output on the text editor that is being used to update the company's internal database records:

Which of the following extensions should the systems administrator use when saving the file?

  • A. .yaml
  • B. .json
  • C. .tf
  • D. .sh

Answer: A


NEW QUESTION # 329
Joe, a user, is unable to log in to the Linux system Given the following output:

Which of the following command would resolve the issue?

  • A. pam_tally2 -u joe -r
  • B. chage -E 90 joe
  • C. passwd -u joe
  • D. usermod -s /bin/bash joe

Answer: A

Explanation:
Explanation
Based on the output of the image sent by the user, Joe is unable to log in to the Linux system because his account has been locked due to too many failed login attempts. The pam_tally2 -u joe -r command will resolve this issue by resetting Joe's failed login counter to zero and unlocking his account. This command uses the pam_tally2 module to manage user account locking based on login failures. The usermod -s /bin/bash joe command will change Joe's login shell to /bin/bash, but this will not unlock his account. The passwd -u joe command will unlock Joe's password if it has been locked by passwd -l joe, but this will not reset his failed login counter or unlock his account if it has been locked by pam_tally2. The chage -E 90 joe command will set Joe's account expiration date to 90 days from today, but this will not unlock his account or reset his failed login counter. References: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 18: Securing Linux Systems, page 537.


NEW QUESTION # 330
An administrator needs to set the time of a VM that has no network connectivity to an NTP server.
The VM's host, however, is synchronized with NTP.
Which of the following allows the administrator to synchronize the time of the VM with the host?

  • A. time
  • B. date
  • C. ntpdate
  • D. hwclock

Answer: D


NEW QUESTION # 331
A Linux engineer needs to get information from the foo.com domain mail servers. Which of the following network tools should the engineer use?

  • A. dig mx foo.com
  • B. arp mx foo.com
  • C. nc mx foo.com
  • D. route mx foo.com

Answer: A

Explanation:
To query Mail Exchange (MX) records for a domain, use dig:dig mx foo.com To query Mail Exchange (MX) records for a domain, use dig:dig mx foo.com To query Mail Exchange (MX) records for a domain, use dig:dig mx foo.com MX records specify which mail servers handle email for a domain.
Why the other options are incorrect?
A: arp mx foo.com # Incorrect, arp is used for MAC address resolution, not DNS lookups.
B: nc mx foo.com # Incorrect, nc (netcat) is used for networking and port scanning, not DNS queries.
D: route mx foo.com # Incorrect, route manages routing tables, not DNS records.
References:
Linux dig Command - Linux Documentation


NEW QUESTION # 332
A systems administrator configured firewall rules using firewalld. However, after the system is rebooted, the firewall rules are not present:

The systems administrator makes additional checks:

Which of the following is the reason the firewall rules are not active?

  • A. The firewalld service is not enabled.
  • B. iptables is conflicting with firewalld.
  • C. The wrong system target is activated.
  • D. FIREWALL_ARGS has no value assigned.

Answer: A


NEW QUESTION # 333
A systems administrator receives the following message after running an ip link command to verify the status of a network interface named enp0s3:
state DOWN
Which of the following commands should the administrator use to resolve this issue?

  • A. ip link add enp0s3 up
  • B. ip link enp0s3 up
  • C. ip link set enp0s3 up
  • D. ip link ifb enp0s3 up

Answer: C


NEW QUESTION # 334
An administrator thinks that the user Joe may be running an unauthorized process on a Linux server. Which of the following commands should the administrator run to confirm this idea?

  • A. top -u 'Joe'
  • B. ps -ax 'Joe'
  • C. jobs -n 'Joe'
  • D. lsof -p 'Joe'

Answer: A

Explanation:
top -u Joe filters the process display to only show processes owned by user Joe, allowing the administrator to see if Joe is running any unauthorized processes.


NEW QUESTION # 335
A user is unable to remotely log on to a server using the server name server1 and port 22. The Linux engineer troubleshoots the issue and gathers the following information:
Which of the following is most likely causing the issue?

  • A. sshd is not an active service.
  • B. sshd is running on a non-standard port.
  • C. serverl is using an incorrect IP address.
  • D. server 1 is not in the DNS.

Answer: B

Explanation:
The sshd is the Secure Shell Daemon, which is a service that allows remote login to a Linux system using the SSH protocol. The output shows that the sshd is running on port 2222, which is a non-standard port for SSH. The default port for SSH is 22, which is what the user is trying to use. Therefore, the statement B is most likely causing the issue. The statements A, C, and D are incorrect because they do not explain why the user cannot log on using port 22. Reference: [How to Change SSH Port in Linux]


NEW QUESTION # 336
A systems engineer is adding a new 1GB XFS filesystem that should be temporarily mounted under /ops/app.
Which of the following is the correct list of commands to achieve this goal?

  • A.
  • B.
  • C.
  • D.

Answer: D

Explanation:
Explanation
The list of commands in option D is the correct way to achieve the goal. The commands are as follows:
fallocate -l 1G /ops/app.img creates a 1GB file named app.img under the /ops directory.
mkfs.xfs /ops/app.img formats the file as an XFS filesystem.
mount -o loop /ops/app.img /ops/app mounts the file as a loop device under the /ops/app directory. The other options are incorrect because they either use the wrong commands (dd or truncate instead of fallocate), the wrong options (-t or -f instead of -o), or the wrong order of arguments (/ops/app.img
/ops/app instead of /ops/app /ops/app.img). References: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 10: Managing Storage, pages 323-324.


NEW QUESTION # 337
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.

Answer:

Explanation:
See the explanation below.
Explanation:
yum install httpd
systemct1 --now enable httpd
systemct1 status httpd
netstat -tunlp | grep 80
pkill <processname>
systemct1 restart httpd
systemct1 status httpd


NEW QUESTION # 338
A Linux administrator needs to run a web application on a server that requires the use of a desktop web browser to enter the final configuration information. The administrator determines the server is running in multi-user mode. The administrator verifies that a web browser is installed on the server and that it has a display manager installed. Which of the following commands will best allow the administrator to temporarily use the web browser on the server?

  • A. sudo systemctl restart gdm
  • B. sudo systemctl set-default runlevel5.target
  • C. sudo systemctl isolate graphical.target
  • D. sudo systemctl --no-wall rescue

Answer: C

Explanation:
The systemctl isolate graphical.target command switches the system to graphical mode (runlevel 5). This will start the display manager and allow the administrator to use a graphical environment, including a web browser. The switch is temporary, and the system will revert to multi-user mode after reboot unless explicitly changed.


NEW QUESTION # 339
A Linux engineer is removing a previously created firewall rule. Which of the following commands will help the administrator accomplish this task?

  • A. ufw delete 80/tcp deny
  • B. delete7!
  • C. ufw delete 80/tcp
  • D. ufw delete deny 80/tcp

Answer: D

Explanation:
The ufw (Uncomplicated Firewall) delete command is used to remove rules.
If the original rule was ufw deny 80/tcp, it must be deleted with:ufw delete deny 80/tcp If the original rule was ufw deny 80/tcp, it must be deleted with:ufw delete deny 80/tcp If the original rule was ufw deny 80/tcp, it must be deleted with:ufw delete deny 80/tcp Why the other options are incorrect?
A: ufw delete 80/tcp # Incorrect, because delete requires specifying the action (allow or deny).
C: ufw delete 80/tcp deny # Incorrect syntax; deny must come before the port.
D: delete7! # Incorrect, this is not a valid ufw command.
References:
UFW Documentation - Ubuntu


NEW QUESTION # 340
Which of the following Git commands would send committed changes to a remote repository?

  • A. git commit -a
  • B. git push origin master
  • C. git stash
  • D. git add .

Answer: B

Explanation:
Comprehensive and Detailed Step-by-Step
git push origin master pushes committed changes to the remote repository.
git stash temporarily saves changes but does not push them.
git commit -a commits changes but does not send them to the remote repository.
git add . stages changes but does not commit or push them.


NEW QUESTION # 341
A Linux administrator needs to create an image named sda.img from the sda disk and store it in the /tmp directory. Which of the following commands should be used to accomplish this task?

  • A. dd of=/dev/sda if=/tmp/sda.img
  • B. dd --if=/dev/sda --of=/tmp/sda.img
  • C. dd if=/dev/sda of=/tmp/sda.img
  • D. dd --of=/dev/sda --if=/tmp/sda.img

Answer: C

Explanation:
The command dd if=/dev/sda of=/tmp/sda.img should be used to create an image named sda.img from the sda disk and store it in the /tmp directory. The dd command is a tool for copying and converting data on Linux systems. The if option specifies the input file or device, in this case
/dev/sda, which is the disk device. The of option specifies the output file or device, in this case
/tmp/sda.img, which is the image file. The command dd if=/dev/sda of=/tmp/sda.img will copy the entire disk data from /dev/sda to /tmp/sda.img and create an image file.


NEW QUESTION # 342
Due to low disk space, a Linux administrator finding and removing all log files that were modified more than 180 days ago. Which of the following commands will accomplish this task?

  • A. find /var/log -type f -mtime +180 -exec rm {} \
  • B. find /var/log -type c -atime +180 -remove
  • C. find /var/log -type d -mtime +180 -print -exec rm {} \;
  • D. find /var/log -type f -modified +180 -rm

Answer: C


NEW QUESTION # 343
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?

  • A. systemct1 enable postgresq1
  • B. systemct1 daemon-reload
  • C. Systemct1 get-default
  • D. systemct1 mask postgresq1

Answer: B

Explanation:
To apply changes to a systemd service unit file, the administrator needs to reload the systemd daemon using the command systemct1 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. References:
* [CompTIA Linux+ Study Guide], Chapter 7: Managing System Services, Section: Modifying Systemd Services
* [How to Reload Systemd Services]


NEW QUESTION # 344
A Linux administrator created a new file system. Which of the following files must be updated to ensure the filesystem mounts at boot time?

  • A. /etc/sysctl
  • B. /etc/fstab
  • C. /etc/nfsmount.conf
  • D. /etc/filesystems

Answer: B

Explanation:
The file that must be updated to ensure the filesystem mounts at boot time is /etc/fstab. This file contains information about the filesystems that are mounted automatically by the mount -a command, which is usually invoked during the system startup. The /etc/fstab file has six fields for each filesystem: device name, mount point, filesystem type, mount options, dump frequency, and pass number. To add a new filesystem to the /etc/fstab file, you need to specify these fields correctly and make sure the mount point directory exists.
The other options are not correct files for controlling persistent mount points of filesystems. The /etc/sysctl file is used to configure kernel parameters at runtime. The /etc/filesystems file is used to specify the order of filesystem types used by mount when no filesystem type is given. The /etc/nfsmount.conf file is used to set options for mounting NFS filesystems. Reference: Persistently mounting file systems; fstab(5) - Linux manual page


NEW QUESTION # 345
......


CompTIA XK0-005 (CompTIA Linux+ Certification) Certification Exam is a globally recognized certification that validates the skills and knowledge required for Linux system administration. CompTIA Linux+ Certification Exam certification is designed to test the candidate's ability to configure, manage, and troubleshoot Linux systems. Individuals who pass XK0-005 exam demonstrate their ability to work confidently with Linux systems, including installation, management of user accounts, networking, and security.

 

XK0-005 Study Guide Brilliant XK0-005 Exam Dumps PDF: https://www.prep4away.com/CompTIA-certification/braindumps.XK0-005.ete.file.html

Passing CompTIA XK0-005 Exam Using 2026 Practice Tests: https://drive.google.com/open?id=1hgjiJU8pl24oV7xPU-GrGrG29VcPjYB8