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
A Linux administrator is troubleshooting a memory-related issue.
Based on the output of the commands:

Which of the following commands would address the issue?
- A . top -p 8321
- B . kill -9 8321
- C . renice -10 8321
- D . free 8321
A Linux administrator is configuring a two-node cluster and needs to be able to connect the nodes to each other using SSH keys from the root account.
Which of the following commands will accomplish this task?
- A . [root@nodea ssh ―i ~/ . ssh/±d rsa root@nodeb
- B . [root@nodea scp -i . ssh/id rsa root@nodeb
- C . [root@nodea ssh―copy-id ―i .ssh/id rsa root@nodeb
- D . [root@nodea # ssh add -c ~/ . ssh/id rsa root@nodeb
- E . [root@nodea # ssh add -c ~/. ssh/id rsa root@nodeb
A Linux administrator has physically added a new RAID adapter to a system.
Which of the following commands should the Linux administrator run to confirm that the device has been recognized? (Select TWO).
- A . rmmod
- B . Is -11 /etc
- C . Ishw ―class disk
- D . pvdisplay
- E . rmdir /dev
- F . dmesg
An administrator started a long-running process in the foreground that needs to continue without interruption.
Which of the following keystrokes should the administrator use to continue running the process in the background?
- A . <Ctrl+z> bg
- B . <Ctrl+d> bg
- C . <Ctrl+b> jobs -1
- D . <Ctrl+h> bg &
After installing some RPM packages, a systems administrator discovers the last package that was installed was not needed.
Which of the following commands can be used to remove the package?
- A . dnf remove packagename
- B . apt-get remove packagename
- C . rpm -i packagename
- D . apt remove packagename
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
A Linux engineer needs to create a custom script, cleanup.sh, to run at boot as part of the system services.
Which of the following processes would accomplish this task?
- A . Create a unit file in the /etc/default/ directory.
systemct1 enable cleanup
systemct1 is-enabled cleanup - B . Create a unit file in the /etc/ske1/ directory.
systemct1 enable cleanup
systemct1 is-enabled cleanup - C . Create a unit file in the /etc/systemd/system/ directory.
systemct1 enable cleanup
systemct1 is-enabled cleanup - D . Create a unit file in the /etc/sysctl.d/ directory.
systemct1 enable cleanup
systemct1 is-enabled cleanup
A Linux administrator is reviewing changes to a configuration file that includes the following section:

The Linux administrator is trying to select the appropriate syntax formatter to correct any issues with the configuration file.
Which of the following should the syntax formatter support to meet this goal?
- A . Markdown
- B . XML
- C . YAML
- D . JSON
A systems administrator is investigating a service that is not starting up.
Given the following information:

Which of the following systemd commands should the administrator use in order to obtain more details about the failing service?
- A . systemct1 analyze network
- B . systemct1 info network
- C . sysctl -a network
- D . journalctl -xu network
An administrator would like to mirror the website files on the primary web server, www1, to the backup web server, www2.
Which of the following commands should the administrator use to most efficiently accomplish this task?
- A . [wwwl ] rsync ―a ―e ssh /var/www/html/ user1@www2 : /var/www/html
- B . [ wwwl ] scp ―r /var/www/html user1@www2 : / var/www/html
- C . [www2 ] cd /var/www/html; wget ―m http: //wwwl/
- D . [wwwl ] cd /var/www/html && tar cvf ―