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

    A Linux administrator receives a ticket stating that end users are unable to access the company's internal cloud server. The administrator executes the following command:

    ping usl.com

    Result:

    ping: cannot resolve usl.com: Unknown Host

    Which of the following files needs to be modified to allow end users to access usl.com?

    A. /etc/resolv.conf
    B. /etc/interfaces
    C. /etc/hosts.allow
    D. /etc/hostname

  • Question 262:

    To harden one of the servers, an administrator needs to remove the possibility of remote administrative login via the SSH service. Which of the following should the administrator do?

    A. Add the line DenyUsers root to the /etc/hosts.deny file.
    B. Set PermitRootLogin to no in the /etc/ssh/sshd_config file.
    C. Add the line account required pam_nologin. so to the /etc/pam.d/sshd file.
    D. Set PubKeyAuthentication to no in the /etc/ssh/ssh_config file.

  • Question 263:

    An administrator logs in to a Linux server and notices the clock is 37 minutes fast. Which of the following commands will fix the issue?

    A. hwclock
    B. ntpdate
    C. timedatectl
    D. ntpd -q

  • Question 264:

    A systems administrator receives the following errors via email from the system log: go XFS (loop0): Metadata CRC error detected at xfs_agi_read_verify+0xcb/0xfe XFS (loop0): First 128 bytes of corrupted metadata buffer XFS (loop0): metadata I/O error in "xfs_trans_read_buf_map" at daddr 0x2 len 1 error 74 A few minutes later, the administrator starts receiving reports that some of the images in the company's website are not loading properly. The systems administrator runs some commands and receives the following outputs: css

    Output 1

    NAME FSTYPE UUID MOUNTPOINT

    sda ext4 02ae47-fe457-45bc /

    sdb xfs 347c7056 /var/www/html

    Output 2

    DocumentRoot "/var/www/html"

    Output 3

    httpd.service - The Apache HTTP Server

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

    Active: active (running) since Sun 1991-05-24 16:12:43 UTC; 30y ago

    Main PID: 252 (httpd)

    Which of the following would be the appropriate steps to take to solve this issue?

    A. systemctl stop httpd umount /dev/sdb1 xfs_repair /dev/sdb1 mount /dev/sdb1 /var/www/html systemctl start httpd
    B. umount /dev/sdb1 xfs_repair /dev/sdb1 xfs_metadump /dev/sdb1 mount /dev/sdb1 /var/www/html systemctl restart httpd
    C. umount /dev/sdb1 systemctl stop httpd xfs_metadump /dev/sdb1 mount /dev/sdb1 /var/www/html systemctl start httpd
    D. systemctl stop httpd xfs_check -L /dev/sdb umount /var/www/html systemctl start httpd

  • Question 265:

    A systems administrator is customizing a new Linux server. Which of the following settings for umask would ensure that new files have the default permissions of -rw-r--r--?

    A. 0017
    B. 0027
    C. 0038
    D. 0640

  • Question 266:

    The development team wants to prevent a file from being modified by all users in a Linux system, including the root account. Which of the following commands can be used to accomplish this objective?

    A. chmod / app/conf/file
    B. setenforce / app/ conf/ file
    C. chattr +i /app/conf/file
    D. chmod 0000 /app/conf/file

  • Question 267:

    A Linux administrator needs to deploy an Apache web server in a container. In addition, the container needs to run in the background, and the web server needs to be exposed on port 8080 of the host machine. Which of the following commands will satisfy these requirements?

    A. sudo docker run -b -t -p 8080:80 --name mywebserver httpd
    B. sudo docker run -d -t -p 8080:80 --name myweb httpd
    C. sudo docker run -d -t -p 80:8080 --name myweb httpd
    D. sudo docker run -b -t -p 80:8080 --name mywebserver httpd

  • Question 268:

    A Linux system is failing to boot with the following error:

    Which of the following actions will resolve this issue? (Choose two.)

    A. Execute grub-install --root-directory=/mnt and reboot.
    B. Execute grub-install /dev/sdX and reboot.
    C. Interrupt the boot process in the GRUB menu and add rescue to the kernel line.
    D. Fix the partition modifying /etc/default/grub and reboot.
    E. Interrupt the boot process in the GRUB menu and add single to the kernel line.
    F. Boot the system on a LiveCD/ISO.

  • Question 269:

    A Linux administrator needs to obtain a list of all volumes that are part of a volume group. Which of the following commands should the administrator use to accomplish this task?

    A. vgs
    B. lvs
    C. fdisk -1
    D. pvs

  • Question 270:

    A systems administrator needs to know the mail exchange (MX) record for the foo.com domain. Which of the following commands will accomplish this task?

    A. telnet mx foo.com
    B. dig mx foo.com
    C. nslookup mx foo.com
    D. host mx foo.com

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.