Exam Details

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

CompTIA CompTIA Linux+ XK0-004 Questions & Answers

  • Question 1:

    A systems administrator clones copies of a Linux VM every time a new Linux server is needed. The administrator notices the command prompt always states localhost.localdomain. Which of the following should the administrator run to have the command prompt consistently labeled as Server1 rather than localhost.localdomain?

    A. host Server1

    B. echo "127.0.0.1 Server1 Server1.localdomain" >> /etc/hosts

    C. hostnamectl set-hostname "Server1" --pretty

    D. hostnamectl set-hostname Server1 --transient

    E. hostnamectl set-hostname Server1.localdomain --static

  • Question 2:

    A systems administrator uses a remote execution engine to iterate through each IP address in a network and run a script on remote hosts. The script captures the remote system's hostname, IP address, OS distribution, and system uptime. The output of the script gets saved to the administrator's local workstation for future processing.

    Which of the following is this an example of?

    A. Performance monitoring

    B. Inventory

    C. Agentless

    D. Infrastructure as code

    E. Build automation

  • Question 3:

    A junior systems administrator needs to schedule a backup script named /scripts/backup.sh and make the correct changes to the crontab. Which of the following crontab entries would run the script every Monday at 2:05 a.m.?

    A. 1 * * 5 2 /scripts/backup.sh

    B. 2 5 * * 1 /scripts/backup.sh /scripts/backup.sh

    C. 5 2 * * 1

    D. 1 * * 2 5 /scripts/backup.sh

    E. 5 2 * * 0 /scripts/backup.sh

  • Question 4:

    A user is unable to write data to an NFS datastore at /mnt/storage. A df command indicates 50% free inodes. Which of the following commands should the user attempt NEXT to diagnose the situation?

    A. df -h /mnt/storage

    B. du -sh /mnt

    C. fdisk -l /mnt/storage

    D. df -i /mnt/storage

  • Question 5:

    A systems administrator manually added a new library to the server. The administrator wants to rebuild the library cache for immediate use. Which of the following commands should the systems administrator run to achieve this goal?

    A. make install

    B. ldconfig

    C. make

    D. ldd

  • Question 6:

    An administrator is troubleshooting to determine why backups are failing on a particular server. The administrator runs the ps command and analyzes the following output.

    The administrator runs kill -9 10112 yet the process remains. Which of the following BEST describes the issue and how to fix it?

    A. The backup process is still running and needs to be killed with kill -9 --force 10112.

    B. The backup process is a zombie process, and the system needs to be rebooted.

    C. The backup process is out of memory, and more memory needs to be added to the system.

    D. The backup process is using 100% of system resources and needs to be rescheduled with renice.

  • Question 7:

    A Linux administrator needs to prevent the Postfix mail transfer agent from starting on boot. Which of the following commands will accomplish this task?

    A. systemctl stop postfix.service

    B. /etc/init.d/postfix stop

    C. systemctl disable postfix.service

    D. /etc/init.d/postfix disable

  • Question 8:

    A systems administrator notices several intensive tasks executing from users Joe and Ann. These processes are impacting server operations but must be allowed to continue running. Which of the following commands should the systems administrator run to reduce the impact on the server?

    A. pkill -u joe ann

    B. renice 11 -u joe ann

    C. nohup -u joe ann

    D. strace -u joe ann

  • Question 9:

    Joe, a user, reports there is data missing after a reboot of the system he is using. The data he was working on was located in /opt/data/user1. A Linux administrator runs the following commands and receives the resulting output.

    Which of the following should the administrator perform to resolve the issue?

    A. The administrator can conclude Joe no longer has permissions to his data and needs to change the data ownership to Joe.

    B. The administrator can conclude the data is gone from the system and needs to be restored from a backup.

    C. The administrator can conclude Joe has been using the wrong folder and should be using /opt/ data/user2.

    D. The administrator can conclude the drive is not mounted properly and should be remounted.

  • Question 10:

    A Linux administrator recently reprovisioned a new corporate web server to replace a legacy one. To minimize the impact on the company's users, the administrator modified the network and DNS settings of the new server to be the same as the legacy server.

    When attempting to log in to the new server remotely over SSH, the following error message is displayed:

    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! Which of the following should the administrator do to resolve the issue?

    A. Restart the network services on both the remote server and the local machine.

    B. Remove the entry for the web server from the known_hosts file on the local machine.

    C. Update the /etc/hosts file on the remote server and local machine.

    D. Add the administrator's public key to the authorized_keys on the remote server.

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.