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

    A raw VM image is being compressed with bzip2 and copied to a flash drive at /dev/hdb for off-site use by the marketing department. Which of the following command lines accomplishes this task?

    A. mv /vm/mkgt.img | bzip2 /dev/hdb/mkgt.img.bz2

    B. bzip2 -c /vm/mktg.img | dd of=/dev/hdb

    C. cp /vm/mktg.img | bzip2 /dev/hdb/mktg.img.bz2

    D. cp -a -r /vm/mktg.img bzip2 /dev/hdb/mktg.img.zip

  • Question 72:

    A systems administrator wants to install a new application that requires the newmod kernel module. Which of the following commands should the systems administrator use?

    A. lsof newmod

    B. modinfo newmod

    C. lsmod newmod

    D. modprobe newmod

  • Question 73:

    An administrator is installing a Linux VM on a personal hypervisor. The administrator wants to have the VM's IP address on the same network as the hypervisor host so the VM has the same network properties as the physical interface of the host. To which of the following should the administrator set the network properties?

    A. Host-only network

    B. NAT network

    C. Bridge network

    D. Overlay network

  • Question 74:

    An administrator has a CSV file named hosts.csv. The contents of hosts.csv include the following:

    192.168.2.57,lnx1prd.example.com,Linux,Production 192.168.2.58,lnx2prd.example.com,Linux,Production 192.168.1.4,server15.example.com,Windows,Development

    The administrator needs to create a second comma-separated list of only the Linux server IP addresses. Which of the following commands would achieve this need?

    A. for ip in $(grep "Linux" hosts.csv | cut -d"," -f1); do echo -n "$ip,"; done

    B. for ip in $( cut -d"," -f1 hosts.csv | grep "Linux"); do echo -n "$ip,"; done

    C. for ip in $(grep "Linux" hosts.csv | sed "/$1//'); do echo -n "$ip,"; done

    D. for ip in $(awk -F, `{print $1}' hosts.csv | grep "Linux"); do echo -n "$ip,"; done

  • Question 75:

    A Linux administrator is restoring the SELinux contexts on an entire system. Which of the following commands is the BEST option to complete this task?

    A. setenforce 0 andand reboot

    B. setfacl -bR / andand reboot

    C. touch /.autorelabel andand reboot

    D. restorecon / andand reboot

  • Question 76:

    Users are unable to connect to a server using HTTPS. The administrator runs the following command on the remote system:

    Then, the administrator runs the following command from a local workstation:

    Which of the following steps should the administrator take to address the issue?

    A. Start the application to run on port 443

    B. Configure the application to run on an active port

    C. Allow port 443 through the firewall

    D. Update the self-signed certificate

  • Question 77:

    A Linux administrator tries to ping a hostname in a network but receives the message: hostname not found. The administrator is sure the name exists on the network and wants to verify if the DNS server is correctly configured on the client. Which of the following files should the administrator use to verify this information?

    A. /etc/named.conf

    B. /etc/resolv.conf

    C. /etc/nsswitch.conf

    D. /etc/network

  • Question 78:

    A systems administrator downloads an application's source files, compiles the application, and installs it per the application's installation instructions. When trying to run the application, the system states:

    $ occmd

    bash: occmd: command not found...

    Running the locate command shows it does exist in the following location:

    /opt/occmd/bin/occmd

    Which of the following should the administrator do to allow the command to run properly? (Choose two.)

    A. sudo ln -s /opt/occmd/bin/occmd /usr/local/bin/occmd

    B. echo "export PATH=$PATH:/opt/occmd/bin" >> ~/.bashrc

    C. mv /opt/occmd ~/ andand ln -s ~/occmd/bin/occmd ./occmd

    D. echo "#!/bin/bash \n ${which occmd}" > /usr/bin/occmd.sh

    E. sudo mv /opt/occmd/bin/occmd /etc/bin/

    F. cd /opt/occmd/bin andand chmod +x ./occmd andand restorecon -rv *

  • Question 79:

    Users in the payroll department are not configured to use DNS due to security concerns. The users ask the junior Linux administrator to configure their workstations to access the payroll server at 192.168.204.11 by the name "Payroll". Which of the following commands should the administrator issue to meet this request?

    A. echo "nameserver 192.168.204.11 #Payroll" >> /etc/resolv.conf

    B. echo "net.ipv4.ip_dynaddr=192.168.204.11 Payroll" >> /etc/sysctl.conf

    C. echo "192.168.204.11 Payroll" >> /etc/hosts

    D. echo `IPADDR="192.168.204.11" #Payroll' >> /etc/network/interface

  • Question 80:

    A systems administrator received a request to change the hostname to a new name. Which of the following file configurations should be changed to fix the hostname in the server?

    A. /etc/sysconfig/network

    B. /etc/hosts

    C. /etc/resolv.conf

    D. /etc/sysconfig/nsswitch.conf

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.