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

    A Linux administrator suspects unauthorized users are attempting to log in to the Linux server remotely. Which of the following should the administrator check FIRST?

    A. /var/log/messages

    B. /var/log/secure

    C. /var/log/dmesg

    D. /var/log/kern.log

  • Question 52:

    A junior systems administrator is diagnosing an issue with latency. The administrator issues the command mtr www.comptia.org at a terminal and receives the following output:

    Given this scenario and the output, which of the following should be reported to the network team for investigation? (Choose two.)

    A. Host 1 is set to filter ICMP reply packets.

    B. Host 1 is set to filter ICMP echo packets.

    C. Host 2 is experiencing high packet loss, indicating the link is overloaded.

    D. Host 2 is experiencing low bandwidth, indicating the ISP is blocking traffic.

    E. Host 3 is set to filter ICMP reply packets.

    F. Host 3 is set to filter ICMP echo packets.

  • Question 53:

    A user requested a USB serial device to be added to a desktop computer. The device has built-in kernel driver support. The administrator tested the device installation and access, but the user cannot access the serial port. Each time the user attempts to access the device, an error log is created that shows the user does not have permission to use the serial port. Which of the following will add a user to the group that has serial port capabilities?

    A. usermod -a -G serialport $USER

    B. usermod -a -G modem $USER

    C. usermod -a -G dialout $USER

    D. usermod -a -G root $USER

  • Question 54:

    A system ran out of storage space on a particular mount and will not allow anything to be written to disk. The df command shows there are 6GB free on the mount, and there is no inode exhaustion. This issue has happened before due to a known large log file that was not being rotated. The administrator remembers the file name but cannot remember the location of the log file or which process is writing to it. Which of the following would be the BEST solution to correct this issue while maintaining availability?

    A. Use the lsof command to find where the large log file is located and truncate it

    B. Use the locate command to find where the large log file is located and delete it

    C. Use the du command to find where the large log file is located and delete it

    D. Use the ps command to find which process is writing to the log file, and then kill and restart the process

  • Question 55:

    Which of the following boot methods can a Linux administrator use to boot a Linux server remotely via a network interface card instead of a local disk?

    A. NTP

    B. PXE

    C. NFS

    D. Kickstart

  • Question 56:

    Due to security policies, a restriction was implemented that forbids direct access to the database server. The junior administrator needs to connect using SSH tunneling. Which of the following commands allows the junior administrator to connect from a desktop?

    A. ssh -L dbserver.local:5432:localhost:95432 [email protected]

    B. ssh -L 5432:localhost dbserver.local:5432 postgres

    C. ssh -L 95432:localhost [email protected]

    D. ssh -L 9432:localhost:5432 [email protected]

  • Question 57:

    An organization wants to consolidate its entire user information in centralized storage using an X.500- based protocol. Which of the following protocols should be used for this implementation?

    A. RADIUS

    B. LDAP

    C. DNS

    D. DHCP

  • Question 58:

    An administrator needs to kill the oldest Bash shell running in the system. Which of the following commands should be issued to accomplish this task?

    A. ps axjf | grep bash to obtain PID kill -9 PID

    B. ps -eo pid,etime,cmd | grep bash (to obtain PID) kill -9 PID

    C. ps -eo pid,etime| grep bash (to obtain PID) killall -9 PID

    D. killall -15 -o bash

  • Question 59:

    Which of the following BEST describes build automation?

    A. Automating the creation of software and related processes

    B. Automatically categorizing servers in the infrastructure

    C. Managing and provisioning servers via automatic templates

    D. Bringing systems in line with the desired automated configuration

  • Question 60:

    A Linux administrator needs to configure a new firewall without an existing ACL to allow incoming web traffic. The firewall must log the allowed network traffic. Which of the following command sequences would accomplish this task when they are executed in order?

    A. iptables -A INPUT -p tcp --dport 80 -J LOG iptables -A INPUT -p tcp --dport 443 -J LOG iptables -I INPUT -p tcp --dport 80 -J ACCEPT iptables -I INPUT -p tcp --dport 443 -J ACCEPT

    B. iptables -I INPUT -m multiport -p tcp --dports 80,443 -J LOG iptables -I INPUT -m multiport -p tcp --dports 80,443 -J ACCEPT

    C. iptables -A INPUT -m multiport -p tcp --dports 80,443 -J LOG iptables -A INPUT -m multiport -p tcp --dports 80,443 -J ACCEPT

    D. iptables -A INPUT -p tcp --dport 80 -J ACCEPT iptables -A INPUT -p tcp --dport 443 -J ACCEPT iptables -A INPUT -p tcp --dport 80 -J LOG iptables -A INPUT -p tcp --dport 443 -J LOG

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.