Exam Details

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

CompTIA CompTIA Certifications XK0-005 Questions & Answers

  • Question 201:

    The security team has identified a web service that is running with elevated privileges A Linux administrator is working to change the systemd service file to meet security compliance standards. Given the following output: Which of the following remediation steps will prevent the web service from running as a privileged user?

    A. Removing the ExecStarWusr/sbin/webserver -D SOPTIONS from the service file

    B. Updating the Environment File line in the [Service] section to/home/webservice/config

    C. Adding the User-webservice to the [Service] section of the service file

    D. Changing the:nulti-user.target in the [Install] section to basic.target

  • Question 202:

    A Linux administrator needs to resolve a service that has failed to start. The administrator runs the following command:

    The following output is returned

    Which of the following is MOST likely the issue?

    A. The service does not have permissions to read write the startupfile.

    B. The service startupfile size cannot be 81k.

    C. The service startupfile cannot be owned by root.

    D. The service startupfile should not be owned by the root group.

  • Question 203:

    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

  • Question 204:

    A systems administrator intends to use a UI-JID to mount a new partition per-manently on a Linux system. Which of the following commands can the adminis-trator run to obtain information about the UUlDs of all disks attached to a Linux system?

    A. fcstat

    B. blkid

    C. dmsetup

    D. Isscsi

  • Question 205:

    A Linux administrator modified the SSH configuration file. Which of the following commands should be used to apply the configuration changes?

    A. systemct1 stop sshd

    B. systemct1 mask sshd

    C. systemct1 reload sshd

    D. systemct1 start sshd

  • Question 206:

    Several users reported that they were unable to write data to the /oracle1 directory. The following output has been provided:

    Which of the following commands should the administrator use to diagnose the issue?

    A. df -i /oracle1

    B. fdisk -1 /dev/sdb1

    C. lsblk /dev/sdb1

    D. du -sh /oracle1

  • Question 207:

    An application developer received a file with the following content:

    ##This is a sample Image ##

    FROM ubuntu:18.04

    MAINTAINER [email protected]

    COPY . /app

    RUN make /app CMD python /app/app.py

    RUN apt-get update

    RUN apt-get install -y nginx

    CMD ["echo","Image created"]

    The developer must use this information to create a test bed environment and identify the image (myimage) as the first version for testing a new

    application before moving it to production. Which of the following commands will accomplish this task?

    A. docker build -t myimage:1.0 .

    B. docker build -t myimage: .

    C. docker build -t myimage-1.0 .

    D. docker build -i myimage:1.0 .

  • Question 208:

    A cloud engineer needs to remove all dangling images and delete all the images that do not have an associated container. Which of the following commands will help to accomplish this task?

    A. docker images prune -a

    B. docker push images -a

    C. docker rmi -a images

    D. docker images rmi --all

  • Question 209:

    A Linux administrator needs to create a symlink for /usr/local/bin/app-a, which was installed in /usr/local/share/app-a. Which of the following commands should the administrator use?

    A. In -s /usr/local/bin/app-a /usr/local/share/app-a

    B. mv -f /usr/local/share/app-a /usr/local/bin/app-a

    C. cp -f /usr/local/share/app-a /usr/local/bin/app-a

    D. rsync -a /usr/local/share/app-a /usr/local/bin/app-a

  • Question 210:

    A new disk was presented to a server as /dev/ sdd. The systems administrator needs to check if a partition table is on that disk. Which of the following commands can show this information?

    A. Isscsi

    B. fdisk

    C. blkid

    D. partprobe

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.