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

    Joe, a user, is unable to log in to the server and contracts the systems administrator to look into the issue. The administrator examines the /etc/passwd file and discovers the following entry:

    joe:x:505:505::/home/joe:/bin/false

    Which of the following commands should the administrator execute to resolve the problem?

    A. usermod -s /bin/bash joe

    B. passwd -u joe

    C. useradd -s /bin/bash joe

    D. chage -E -1 joe

  • Question 302:

    Which of the following configuration files should be modified to disable Ctrl+Alt+Del in Linux?

    A. /etc/inittab

    B. ~/.bash_profile

    C. /etc/securetty

    D. /etc/security/limits.conf

  • Question 303:

    In order to comply with new security policies, an administrator needs to prevent the SSH server from using insecure algorithms. Which of the following files should be edited to accomplish this?

    A. /etc/ssh/sshd_config

    B. /etc/ssh/ssh_config

    C. ~/.ssh/ssh_config

    D. /etc/ssh/known_hosts

  • Question 304:

    A systems administrator must clean up all application files in the directory /var/log/app. However, the company's security policy requires the files to be kept on the backup server for one year. The Linux server has only the tar and bzip2 packages installed.

    Which of the following commands will package and compress the files?

    A. tar -zcvf applicationfiles.tar.bz2 /var/log/app/*

    B. tar -jcvf applicationfiles.tar.bz2 /var/log/app/*

    C. tar -cvf applicationfiles.tar.bz2 /var/log/app/*

    D. tar -xvf applicationfiles.tar.bz2 /var/log/app/*

  • Question 305:

    A systems administrator has set up third-party log aggregation agents across several cloud instances. The systems administrator wants to create a dashboard of failed SSH attempts and the usernames used. Which of the following files should be watched by the agents?

    A. /var/log/audit/audit.log

    B. /var/log/kern.log

    C. /var/log/monitor

    D. /etc/rsyslog.conf

  • Question 306:

    Which of the following server roles would assign a host IP address?

    A. DHCP

    B. NTP

    C. DNS

    D. SSH

  • Question 307:

    Which of the following commands would show the default printer on a Linux system?

    A. lpr

    B. lpq

    C. lpstat

    D. lspci

  • Question 308:

    Given the output below:

    Which of the following commands can be used to remove MyPhoto.jpg from the current directory?

    A. unlink ./MyPhoto.jpg

    B. del Pictures/photo.jpg

    C. rm -rf ./Pictures

    D. rm -f MyPhoto.jpg

    E. ln -rm ./Pictures/photo.jpg

  • Question 309:

    A Linux administrator needs to take stock of USB devices attached to the system. Which of the following commands would be BEST to complete this task?

    A. lspci

    B. lsusb

    C. cat /proc/USB

    D. modprobe --usb

  • Question 310:

    Ann, a junior systems administrator, is required to add a line to the /etc/yum.conf file. However, she receives the following error message when she tries to add the line:

    Ann performs some diagnostics to attempt to find the root cause:

    Which of the following commands should Ann execute to write content to /etc/yum?

    A. chmod 755 /etc/yum.conf

    B. setfacl -m m:rw /etc/yum.conf

    C. chattr -i /etc/yum.conf

    D. setenforce 0

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.