CompTIA XK0-005 Practice Exams
Last updated on Nov 16,2026- Exam Code: XK0-005
- Exam Name: CompTIA Linux+ Exam
- Certification Provider: CompTIA
- Latest update: Nov 16,2026
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?
- A . rpm -qa | grep kernel; uname -a
- B . yum -y update; shutdown -r now
- C . cat /etc/centos-release; rpm -Uvh –nodeps
- D . telinit 1; restorecon -Rv /boot
A Linux system is getting an error indicating the root filesystem is full.
Which of the following commands should be used by the systems administrator to resolve this issue? (Choose three.)
- A . df -h /
- B . fdisk -1 /dev/sdb
- C . growpart /dev/mapper/rootvg-rootlv
- D . pvcreate /dev/sdb
- E . lvresize CL +10G -r /dev/mapper/rootvg-rootlv
- F . lsblk /dev/sda
- G . parted -l /dev/mapper/rootvg-rootlv
- H . vgextend /dev/rootvg /dev/sdb
One leg of an LVM-mirrored volume failed due to the underlying physical volume, and a systems administrator is troubleshooting the issue.
The following output has been provided:

Given this scenario, which of the following should the administrator do to recover this volume?
- A . Reboot the server. The volume will automatically go back to linear mode.
- B . Replace the failed drive and reconfigure the mirror.
- C . Reboot the server. The volume will revert to stripe mode.
- D . Recreate the logical volume.
A systems administrator wants to list all local accounts in which the UID is greater than 500.
Which of the following commands will give the correct output?
- A . find /etc/passwd ―size +500
- B . cut ―d: fl / etc/ passwd > 500
- C . awk -F: ‘$3 > 500 {print $1}’ /etc/passwd
- D . sed ‘/UID/’ /etc/passwd < 500
A Linux administrator created the directory /project/access2all. By creating this directory, the administrator is trying to avoid the deletion or modification of files from non-owners.
Which of the following will accomplish this goal?
- A . chmod +t /project/access2all
- B . chmod +rws /project/access2all
- C . chmod 2770 /project/access2all
- D . chmod ugo+rwx /project/access2all
A systems administrator is troubleshooting a connectivity issue pertaining to access to a system named db.example.com. The system IP address should be 192.168.20.88.
The administrator issues the dig command and receives the following output:
![]()
The administrator runs grep db.example.com /etc/hosts and receives the following output:
![]()
Given this scenario, which of the following should the administrator do to address this issue?
- A . Modify the /etc/hosts file and change the db.example.com entry to 192.168.20.89.
- B . Modify the /etc/network file and change the db.example.com entry to 192.168.20.88.
- C . Modify the /etc/network file and change the db.example.com entry to 192.168.20.89.
- D . Modify the /etc/hosts file and change the db.example.com entry to 192.168.20.88.
A systems administrator is investigating why one of the servers has stopped connecting to the internet.

Which of the following is causing the issue?
- A . The DNS address has been commented out in the configuration file.
- B . The search entry in the /etc/resolv.conf file is incorrect.
- C . Wired connection 1 is offline.
- D . No default route is defined.
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 -s 755 devops
- B . chown 1755 devops
- C . chmod -s 755 devops
- D . chmod 1755 devops
A Linux engineer needs to download a ZIP file and wants to set the nice of value to -10 for this new process.
Which of the following commands will help to accomplish the task?
- A . $ nice -v -10 wget https://foo.com/installation.zip
- B . $ renice -v -10 wget https://foo.com/installation.2ip
- C . $ renice -10 wget https://foo.com/installation.zip
- D . $ nice -10 wget https://foo.com/installation.zip
An administrator recently updated the BIND software package and would like to review the default configuration that shipped with this version.
Which of the following files should the administrator review?
- A . /etc/named.conf.rpmnew
- B . /etc/named.conf.rpmsave
- C . /etc/named.conf
- D . /etc/bind/bind.conf