Exam Details

  • Exam Code
    :XK0-004
  • Exam Name
    :CompTIA Linux+ Certification
  • Certification
    :CompTIA Certifications
  • Vendor
    :CompTIA
  • Total Questions
    :516 Q&As
  • Last Updated
    :Aug 23, 2023

CompTIA CompTIA Certifications XK0-004 Questions & Answers

  • Question 61:

    A user issues the following command: ls -l /var/log | egrep -e `^d[rwx]{3}.*[rw-]{3}.*' The list of files in the system is shown below:

    Which of the following results matches the command issued?

    A. drwxr-x--- 2 root adm 4096 Apr 25 14:41 unattended-upgrades drwxr-x--- 2 root adm 4096 Apr 25 15:41 attended-upgrades

    B. drwxr-xr-x 2 root root 4096 Apr 24 08:36 apt drwxr-xr-x 2 root root 4096 Apr 9 14:25 dist-upgrade drwxr-x--- 2 root adm 4096 Apr 25 14:41 unattended-upgrades

    C. drwxr-xr-x 2 root root 4096 Apr 24 08:36 apt drwxr-xr-x 2 root root 4096 Apr 9 14:25 dist-upgrade drwxr-x--- 2 root adm 4096 Apr 25 15:41 attended-upgrades

    D. -rw-r--r-- 1 root root 2877 Apr 24 14:14 alternatives.log -rw-r--r-- 1 syslog adm 246139 Jun 12 15:21 cloud-init.log -rw-r--r-- 1 root root 8872 Jun 12 15:21 cloud-init-output.log

  • Question 62:

    An administrator needs to change the DNS domain search order of a single Linux host to localize it better. Which of the following files should the administrator edit?

    A. /etc/resolv.conf

    B. /etc/hosts

    C. /etc/nsswitch.conf

    D. /etc/dhcpd.conf

  • Question 63:

    A junior Linux administrator needs to create 16 empty files quickly that will contain sales information for each quarter for the past four years. Which of the following commands will meet this requirement?

    A. touch {2015,2016,2017,2018}.{q1,q2,q3,q4}

    B. touch [2015,2016,2017,2018].[q1,q2,q3,q4]

    C. touch `2015,2016,2017,2018`.`q1,q2,q3,q4`

    D. touch {2015.2016.2017.2018}.{q1.q2.q3.q4}

  • Question 64:

    An administrator needs a bootable USB for installing a new Linux machine. The administrator downloaded the image file and named it as Linux_OS.iso in the /tmp directory. Which of the following commands will accomplish that task?

    A. dd input=/tmp/Linux_OS.iso of=/dev/sda bs=512

    B. dd in=/tmp/Linux_OS.iso out=/dev/sdb bs=512

    C. dd if=/tmp/Linux_OS.iso of=/dev/sda bs=512

    D. dd if=/tmp/Linux_OS.iso out=/dev/sdb1 bs=512

  • Question 65:

    A Linux administrator needs to remove a USB drive from a system. The unmount command fails, stating the device is busy. Which of the following commands will show the reason for this error?

    A. lsusb | grep /mnt/usb

    B. mount | grep /mnt/usb

    C. ps aux | grep /mnt/usb

    D. lsof | grep /mnt/usb

  • Question 66:

    A Linux systems administrator is troubleshooting an issue with the /home directory running out of space. The administrator needs to determine which /home directories are using the most space. Which of the following commands should be used?

    A. du

    B. lvs

    C. df

    D. fsck

  • Question 67:

    A Linux user wants to give read-only permissions to a directory and its contents. Which of the following commands will allow the user to accomplish this task?

    A. chmod -R 400 /new_directory/

    B. chmod -R 600 /new_directory/

    C. chmod 400 /new_directory/

    D. chmod 600 /new_directory/

  • Question 68:

    In which of the following directories is the vmlinuz file located?

    A. /boot

    B. /etc

    C. /bin

    D. /proc

  • Question 69:

    A systems administrator is implementing disk quotas on /home. During the process, the administrator receives the following error:

    Cannot find filesystem to check or filesystem not mounted with user quota option.

    Which of the following is the correct order of steps the administrator should follow to resolve this error?

    A. 1. Verify if /home has quotas enabled in /etc/fstab and, if not, enable it.

    2.

    Remount /home.

    3.

    Create the quota database files and generate the disk usage table.

    4.

    Assign user quota policies.

    B. 1. Create the quota database files and generate the disk usage table.

    2.

    Verify if /home has quotas enabled in /etc/fstab and, if not, enable it.

    3.

    Remount /home.

    4.

    Assign user quota policies.

    C. 1. Verify if /home has quotas enabled in /etc/fstab and, if not, enable it.

    2.

    Create the quota database files and generate the disk usage table.

    3.

    Remount /home.

    4.

    Assign user quota policies.

    D. 1. Assign user quota policies.

    2.

    Verify if /home has quotas enabled in /etc/fstab and, if not, enable it.

    3.

    Create the quota database files and generate the disk usage table.

    4.

    Remount /home.

  • Question 70:

    A server, which is used to collect data about the network and datacenter environment via SNMP, is running out of space. Which of the following should the server administrator implement to reduce disk utilization?

    A. journald

    B. Snapshots

    C. logrotate

    D. tar -cvf

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-004 exam preparations and CompTIA certification application, do not hesitate to visit our Vcedump.com to find your solutions here.