XK0-005 Exam Details

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

CompTIA XK0-005 Online Questions & Answers

  • Question 121:

    A systems administrator created a user cron to run a scheduled database backup cronjob on the server at 1 a.m. every day. The following is the cronjob syntax:

    0 1 * * * /bin/sh backup.sh

    The backups, however, are not being created. When checking the crontab file, the administrator sees the following error:

    /var/spool/cron/crontab/cron: Permission denied Which of the following will permit the cronjob to execute?

    A. Creating the file cron.allow and adding user cron to it
    B. Giving cron ownership of the file /usr/bin/crontab
    C. Running sudo cron restart to activate the cronjob
    D. Running sudo crontab -u cron -e to edit the file with sudo

  • Question 122:

    Which of the following enables administrators to configure and enforce MFA on a Linux system?

    A. Kerberos
    B. SELinux
    C. PAM
    D. PKI

  • Question 123:

    A Linux engineer wants to give read-write-execute permissions for the cloud_users directory to user Oliver. Which of the following commands should the engineer use?

    A. setfacl -L Oliver /cloud_users
    B. setfacl -x rwx /cloud_users
    C. setfacl -P rwx /cloud_users
    D. setfacl -m u:Oliver /cloud_users

  • Question 124:

    A systems administrator is tasked with preventing logins from accounts other than root, while the file /etc/nologin exists. Which of the following PAM modules will accomplish this task?

    A. pam_login.so
    B. pam_access.so
    C. pam_logindef.so
    D. pam_nologin.so

  • Question 125:

    A user is unable to remotely log on to a server using the server name server1 and port 22. The Linux engineer troubleshoots the issue and gathers the following information: Which of the following is most likely causing the issue?

    A. server 1 is not in the DNS.
    B. sshd is running on a non-standard port.
    C. sshd is not an active service.
    D. serverl is using an incorrect IP address.

  • Question 126:

    An administrator changed the default port of an SSH server to 2222 on myhost, and clients are not able to connect. The administrator runs some commands and receives the following output:

    vbnet

    Copy code

    $ ssh -p 2222 myhost

    ssh:connect to host myhost on port 2222: No route to host

    Which of the following commands should be run on myhost?

    A. firewall-cmd --zone=public --add-service=ssh
    B. firewall-cmd --zone=public --add-port=2222
    C. iptables --zone=public --add-service=ssh
    D. iptables --zone=public --add-port=2222

  • Question 127:

    A Linux administrator needs to connect securely to a remote server in order to install application software. Which of the following commands would allow this connection?

    A. scp "ABC-key.pem" [email protected]
    B. sftp rooteiO.0.0.1
    C. telnet 10.0.0.1 80
    D. ssh -i "ABC-key.pem" [email protected]
    E. sftp "ABC-key.pem" [email protected]

  • Question 128:

    A Linux systems administrator is trying to execute a particular shell script on a server. The administrator reviews the following outputs: shell $ ./startup.sh bash: ./startup.sh: Permission denied $ ls -l startup.sh -rw-rw-r-- 1 companyabc companyabc 18 October 15:35 startup.sh Which of the following commands should the administrator use to allow the script to run?

    A. chown root startup.sh
    B. chmod 750 startup.sh
    C. chmod -x startup.sh
    D. chmod 400 startup.sh

  • Question 129:

    Which of the following is a benefit of a service mesh?

    A. Encrypted communication between two services in a Kubernetes environment
    B. Direct access to the Kubernetes API services through the use of tokens
    C. Elevated privileges in a Kubernetes pod to allow root access in a hardened cluster
    D. Creating PVCs in a Kubernetes cluster to store and manage persistent data

  • Question 130:

    A Linux administrator needs to create a new user named user02. However, user02 must be in a different home directory, which is under /comptia/projects. Which of the following commands will accomplish this task?

    A. useradd -d /comptia/projects user02
    B. useradd -m /comptia/projects user02
    C. useradd -b /comptia/projects user02
    D. useradd -s /comptia/projects user02

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.