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 191:

    A systems administrator needs to verify whether the built container has the app.go file in its root directory. Which of the following can the administrator use to verify the root directory has this file?

    A. docker image inspect

    B. docker container inspect

    C. docker exec ls

    D. docker ps

  • Question 192:

    The applications team is reporting issues when trying to access the web service hosted in a Linux system. The Linux systems administrator is reviewing the following outputs:

    Output 1:

    * httpd.service = The Apache HTTPD Server

    Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)

    Active: inactive (dead)

    Docs: man:httpd(8) man:apachectl(8)

    Output 2:

    16:51:16 up 28 min, 1 user, load average: 0.00, 0.00, 0.07

    Which of the following statements best describe the root cause? (Select two).

    A. The httpd service is currently started.

    B. The httpd service is enabled to auto start at boot time, but it failed to start.

    C. The httpd service was manually stopped.

    D. The httpd service is not enabled to auto start at boot time.

    E. The httpd service runs without problems.

    F. The httpd service did not start during the last server reboot.

  • Question 193:

    A Linux administrator needs to ensure that Java 7 and Java 8 are both locally available for developers to use when deploying containers. Currently only Java 8 is available. Which of the following commands should the administrator run to ensure both versions are available?

    A. docker image load java:7

    B. docker image pull java:7

    C. docker image import java:7

    D. docker image build java:7

  • Question 194:

    A Linux administrator rebooted a server. Users then reported some of their files were missing. After doing some troubleshooting, the administrator found one of the filesystems was missing. The filesystem was not listed in /etc/f stab and might have been mounted manually by someone prior to reboot. Which of the following would prevent this issue from reoccurring in the future?

    A. Sync the mount units.

    B. Mount the filesystem manually.

    C. Create a mount unit and enable it to be started at boot.

    D. Remount all the missing filesystems

  • Question 195:

    A systems administrator is tasked with creating an Ansible playbook to automate the installation of patches on several Linux systems. In which of the following languages should the playbook be written?

    A. SQL

    B. YAML

    C. HTML

    D. JSON

  • Question 196:

    A systems administrator has been tasked with disabling the nginx service from the environment to prevent it from being automatically and manually started. Which of the following commands will accomplish this task?

    A. systemct1 cancel nginx

    B. systemct1 disable nginx

    C. systemct1 mask nginx

    D. systemct1 stop nginx

  • Question 197:

    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. iptables is conflicting with firewalld.

    B. The wrong system target is activated.

    C. FIREWALL_ARGS has no value assigned.

    D. The firewalld service is not enabled.

  • Question 198:

    A systems administrator is configuring a Linux system so the network traffic from the internal network 172.17.0.0/16 going out through the eth0 interface would appear as if it was sent directly from this interface. Which of the following commands will accomplish this task?

    A. iptables -A POSTROUTING -s 172.17.0.0/16 -o eth0 -j MASQUERADE

    B. firewalld -A OUTPUT -s 172.17.0.0/16 -o eth0 -j DIRECT

    C. nmcli masq-traffic eth0 -s 172.17.0.0/16 -j MASQUERADE

    D. ifconfig -- nat eth0 -s 172.17.0.0/16 -j DIRECT

  • Question 199:

    A Linux engineer receives reports that files created within a certain group are being modified by users who are not group members. The engineer wants to reconfigure the server so that only file owners and group members can modify new files by default. Which of the following commands would accomplish this task?

    A. chmod 775

    B. umask. 002

    C. chactr -Rv

    D. chown -cf

  • Question 200:

    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. usermod -s /bin/bash joe

    B. pam_tally2 -u joe -r

    C. passwd -u joe

    D. chage -E 90 joe

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.