Exam Details

  • Exam Code
    :XK0-005
  • Exam Name
    :CompTIA Linux+
  • Certification
    :CompTIA Certifications
  • Vendor
    :CompTIA
  • Total Questions
    :396 Q&As
  • Last Updated
    :Mar 23, 2025

CompTIA CompTIA Certifications XK0-005 Questions & Answers

  • Question 241:

    Which of the following tools is BEST suited to orchestrate a large number of containers across many different servers?

    A. Kubernetes

    B. Ansible

    C. Podman

    D. Terraform

  • Question 242:

    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. Option A

    B. Option B

    C. Option C

    D. Option D

  • Question 243:

    A Linux administrator was tasked with deleting all files and directories with names that are contained in the sobelete.txt file. Which of the following commands will accomplish this task?

    A. xargs -f cat toDelete.txt -rm

    B. rm -d -r -f toDelete.txt

    C. cat toDelete.txt | rm -frd

    D. cat toDelete.txt | xargs rm -rf

  • Question 244:

    A systems administrator made some changes in the ~/.bashrc file and added an alias command. When the administrator tried to use the alias command, it did not work. Which of the following should be executed FIRST?

    A. source ~/.bashrc

    B. read ~/.bashrc

    C. touch ~/.bashrc

    D. echo ~/.bashrc

  • Question 245:

    A systems administrator detected corruption in the /data filesystem. Given the following output: Which of the following commands can the administrator use to best address this issue?

    A. umount /data mkfs . xfs /dev/sclcl mount /data

    B. umount /data xfs repair /dev/ sdcl mount /data

    C. umount /data fsck /dev/ sdcl mount / data

    D. umount /data pvs /dev/sdcl mount /data

  • Question 246:

    A Linux administrator provisioned a new web server with custom administrative permissions for certain users. The administrator receives a report that user1 is unable to restart the Apache web service on this server. The administrator reviews the following output:

    [ root@server ] # id user1

    UID=1011 (user1) gid=1011 (USER1) groups=1011 (user1), 101 (www-data), 1120 (webadmin)

    [ root@server ] # cat /etc/sudoers.d/custom.conf

    user1 ALL=/usr/sbin/systemctl start httpd, /usr/sbin/systemctl stop httpd

    webadmin ALL=NOPASSWD: /etc/init.d.httpd restart, /sbin/service httpd restart, /usr/sbin/apache2ctl restart

    #%wheel ALL=(ALL) NOPASSWD: ALL

    Which of the following would most likely resolve the issue while maintaining a least privilege security model?

    A. User1 should be added to the wheel group to manage the service.

    B. User1 should have "NOPASSWD:" after the "ALL=" in the custom. conf.

    C. The wheel line in the custom. conf file should be uncommented.

    D. Webadmin should be listed as a group in the custom. conf file.

  • Question 247:

    Which of the following is a function of a bootloader?

    A. It initializes all the devices that are required to load the OS.

    B. It mounts the root filesystem that is required to load the OS.

    C. It helps to load the different kernels to initiate the OS startup process.

    D. It triggers the start of all the system services.

  • Question 248:

    A systems administrator made some unapproved changes prior to leaving the company. The newly hired administrator has been tasked with revealing the system to a compliant state. Which of the following commands will list and remove the correspondent packages?

    A. dnf list and dnf remove last

    B. dnf remove and dnf check

    C. dnf info and dnf upgrade

    D. dnf history and dnf history undo last

  • Question 249:

    A systems administrator is notified that the mysqld process stopped unexpectedly. The systems administrator issues the following command:

    sudo grep -i -r `out of memory' /var/log

    The output of the command shows the following:

    kernel: Out of memory: Kill process 9112 (mysqld) score 511 or sacrifice child.

    Which of the following commands should the systems administrator execute NEXT to troubleshoot this issue? (Select two).

    A. free -h

    B. nc -v 127.0.0.1 3306

    C. renice -15 $( pidof mysql )

    D. lsblk

    E. killall -15

    F. vmstat -a 1 4

  • Question 250:

    A Linux administrator has logged in to a server for the first time and needs to know which services are allowed through the firewall. Which of the following options will return the results for which the administrator is looking?

    A. firewall-cmd --get-services

    B. firewall-cmd --check-config

    C. firewall-cmd --list-services

    D. systemct1 status firewalld

Tips on How to Prepare for the Exams

Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only CompTIA exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your XK0-005 exam preparations and CompTIA certification application, do not hesitate to visit our Vcedump.com to find your solutions here.