XK0-005 Exam Details

  • Exam Code
    :XK0-005
  • Exam Name
    :CompTIA Linux+
  • Certification
    :CompTIA Certifications
  • Vendor
    :CompTIA
  • Total Questions
    :476 Q&As
  • Last Updated
    :Jul 13, 2026

CompTIA XK0-005 Online Questions & Answers

  • Question 101:

    A Linux engineer set up two local DNS servers (10.10.10.10 and 10.10.10.20) and was testing email connectivity to the local mail server using the mail command on a local machine when the following error appeared:

    The local machine DNS settings are:

    Which of the following commands could the engineer use to query the DNS server to get mail server information?

    A. dig @example.com 10.10.10.20 a
    B. dig @10.10.10.20 example.com mx
    C. dig @example.com 10.10.10.20 ptr
    D. dig @10.10.10.20 example.com ns

  • Question 102:

    An administrator is investigating why a Linux workstation is not resolving a website. The output of dig and nslookup shows that IPv4 resolution is working, but IPv6 resolution fails.

    The administrator executes: nslookup -querytype=AAAA www.comptia.org Can't find www.comptia.org: No answer The workstation has a static entry in /etc/hosts: CopyEdit

    104.18.99.101 www.comptia.org

    Which of the following is the most likely cause?

    A. The static entry needs to be removed from /etc/hosts.
    B. The remote website does not support IPv6, and the workstation requires it.
    C. The firewall needs to be modified to allow outbound HTTP and HTTPS.
    D. The nameserver in /etc/resolv.conf needs to be updated to 8.8.8.8.

  • Question 103:

    Which of the following tools is commonly used for creating CI/CD pipelines?

    A. Chef
    B. Puppet
    C. Jenkins
    D. Ansible

  • Question 104:

    An administrator runs ping comptia.org. The result of the command is:

    ping: comptia.org: Name or service not known

    Which of the following files should the administrator verify?

    A. /etc/ethers
    B. /etc/services
    C. /etc/resolv.conf
    D. /etc/sysctl.conf

  • Question 105:

    A Linux system is failing to boot. The following error is displayed in the serial console:

    [[1;33mDEPEND[Om] Dependency failed for /data.

    [[1;33mDEPEND[Om] Dependency failed for Local File Systems

    ...

    Welcome to emergency mode! After logging in, type "journalctl -xb" to viewsystem logs, "systemct1 reboot" to reboot, "systemct1 default" to try again to boot into default mode.

    Give root password for maintenance

    (or type Control-D to continue}

    Which of the following files will need to be modified for this server to be able to boot again?

    A. /etc/mtab
    B. /dev/sda
    C. /etc/fstab
    D. /ete/grub.conf

  • Question 106:

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

    A systems administrator is creating new user accounts on several Linux machines and wants to automate the process from a Linux system used for operations. In this operations system, the list of servers is located in the /home/user/

    serverslist file and the list of user accounts is located in the /home/user/userslist file.

    Which of the following scripts will help accomplish this task?

    A. bash for server in $(cat /home/user/serverslist) do for user in $(cat /home/user/userslist) do sudo useradd $user done done
    B. bash for server in $(cat /home/user/serverslist) do ssh -i user@$server "for user in $(cat /home/user/userslist) do sudo useradd $user done; exit" done
    C. bash for server in $(cat /home/user/serverslist) do scp /home/user/userslist user@$server:/tmp ssh -i user@$server "for user in $(cat /tmp/userslist) do sudo useradd $user done; exit" done
    D. bash ssh user@$(cat /home/user/serverslist) "sudo useradd $(cat /home/user/userslist); exit"

  • Question 108:

    A Linux administrator needs to redirect all HTTP traffic temporarily to the new proxy server 192.0.2.25 on port 3128. Which of the following commands will accomplish this task?

    A. iptables -t nat -D PREROUTING -p tcp --sport 80 -j DNAT - -to-destination 192.0.2.25:3128
    B. iptables -t nat -A PREROUTING -p top --dport 81 -j DNAT -to-destination 192.0.2.25:3129
    C. iptables -t nat -I PREROUTING -p top --sport 80 -j DNAT -to-destination 192.0.2.25:3129
    D. iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT -to-destination 192.0.2.25:3128

  • Question 109:

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

    A systems administrator is working on a security report from the Linux servers. Which of the following commands can the administrator use to display all the firewall rules applied to the Linux servers? (Select two).

    A. ufw limit
    B. iptables --F
    C. systemct1 status firewalld
    D. firewall--cmd ----1ist--a11
    E. ufw status
    F. iptables --A

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.