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

    Which of the following will prevent non-root SSH access to a Linux server?

    A. Creating the /etc/nologin file
    B. Creating the /etc/nologin.allow file containing only a single line root
    C. Creating the /etc/nologin/login.deny file containing a single line +all
    D. Ensuring that /etc/pam.d/sshd includes account sufficient pam_nologin.so

  • Question 242:

    A Linux administrator found many containers in an exited state. Which of the following commands will allow the administrator to clean up the containers in an exited state?

    A. docker rm --all
    B. docker rm $(docker ps -aq)
    C. docker images prune *
    D. docker rm --state exited

  • Question 243:

    Due to low disk space, a Linux administrator finding and removing all log files that were modified more than 180 days ago. Which of the following commands will accomplish this task?

    A. find /var/log -type d -mtime +180 -print -exec rm {} \;
    B. find /var/log -type f -modified +180 -rm
    C. find /var/log -type f -mtime +180 -exec rm {} \
    D. find /var/log -type c -atime +180 -remove

  • Question 244:

    A systems administrator pressed Ctrl+Z after starting a program using the command line, and the shell prompt was presented. In order to go back to the program, which of the following commands can the administrator use?

    A. fg
    B. su
    C. bg
    D. ed

  • Question 245:

    A systems administrator is tasked with creating a cloud-based server with a public IP address.

    Which of the following technologies did the systems administrator use to complete this task?

    A. Puppet
    B. Git
    C. Ansible
    D. Terraform

  • Question 246:

    Which of the following characteristics of YAML and JSON are the most accurate?

    A. JSON uses indentation and substantial white space, while YAML relies on curly braces and semicolons for data structuring.
    B. Due to its ease of use and broad compatibility, JSON is frequently used for configuration files and web APIs, whereas YAML is renowned for its support and human-readable, concise syntax.
    C. JSON is a data interchange format used for configuration files and APIs, whereas YAML is a lightweight markup language frequently used for HTML and XML documents.
    D. YAML is preferred for its rigorous data type and significant support for complex data structures, while JSON is typically used for simple data structures and web APIs.

  • Question 247:

    A Linux administrator needs to determine whether a hostname is in the DNS. Which of the following would supply the information that is needed?

    A. nslookup
    B. rsyn
    C. netstat
    D. host

  • Question 248:

    A systems administrator wants to list all local account names and their respective UIDs. Which of the following commands will provide output containing this information?

    A. cut -c: -f3,1 /etc/passwd
    B. cut -d: -s2,3 /etc/passwd
    C. cut -d: -f1,3 /etc/passwd
    D. cut -n: -f1,2 /etc/passwd

  • Question 249:

    A Linux system is failing to start due to issues with several critical system processes. Which of the following options can be used to boot the system into the single user mode? (Choose two.)

    A. Execute the following command from the GRUB rescue shell: mount -o remount, ro/sysroot.
    B. Interrupt the boot process in the GRUB menu and add systemd.unit=single in the kernel line.
    C. Interrupt the boot process in the GRUB menu and add systemd.unit=rescue.target in the kernel line.
    D. Interrupt the boot process in the GRUB menu and add single=user in the kernel line.
    E. Interrupt the boot process in the GRUB menu and add init=/bin/bash in the kernel line.
    F. Interrupt the boot process in the GRUB menu and add systemd.unit=single.target in the kernel line.

  • Question 250:

    A Linux administrator is alerted to a storage capacity issue on a server without a specific mount point or directory. Which of the following commands would be MOST helpful for troubleshooting? (Choose two.)

    A. parted
    B. df
    C. mount
    D. du
    E. fdisk
    F. dd
    G. ls

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.