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

    A Linux user needs to create a file named newfile in the home directory that mirrors the contents of the / etc/resolv.conf file.

    Which of the following commands would accomplish this task?

    A. cat /etc/resolv.conf > /home/user/newfile

    B. echo /etc/resolv.conf > /home/user/newfile

    C. grep /etc/resolv.conf < /home/user/newfile

    D. printf /etc/resolv.conf > /home/user/newfile

  • Question 22:

    Which of the following can be used to check the status of wireless devices that are connected to the system?

    A. lsusb

    B. iwconfig

    C. netstat

    D. ifconfig

  • Question 23:

    Which of the following servers provides encrypted tunnel SOCKS services?

    A. SNMP

    B. VPN

    C. CA

    D. SSH

  • Question 24:

    The following represents a partial listing of a user's .bashrc file:

    HISTSIZE=800 HISTFILESIZE=1000 umask 2002 HISTCONTROL=ignoreboth

    When the user opens a terminal, an error message appears:

    Octal number out of range

    Which of the following lines in the partial .bashrc should be modified to prevent the error from occurring?

    A. HISTSIZE=800

    B. HISTFILESIZE=1000

    C. umask 2002

    D. HISTCONTROL=ignoreboth

  • Question 25:

    A Linux user needs to connect to a remote email server named mail.foo.com through the SMTP port.

    Which of the following commands will accomplish this task?

    A. traceroute mail.foo.com 25

    B. netcat mail.foo.com 25

    C. traceroute mail.foo.com 110

    D. netcat mail.foo.com 110

  • Question 26:

    A company requires all servers to be configured with the BIOS on Coordinated Universal Time and the OS on Central Standard Time.

    Which of the following can be used to change the time according to these requirements? (Choose two.)

    A. localectl

    B. LC_ALL

    C. date

    D. time

    E. hwclock

    F. crontab

  • Question 27:

    A Linux administrator recently changed the IP addresses of all the web servers from 10.10.50.x to 10.10.100.x. The administrator needs to update the serverlist.txt file to reflect the change.

    The file contains the following:

    10:WebSvr01:10.10.50.21:Main 11:WebSvr02:10.10.50.22:Acconting 12:WebSvr03:10.10.50.23:Intranet 20:NFS01:10.10.20.21:FileServer 30:SMTP01:10.10.30.31:Email

    Which of the following commands will change the IP addresses and update the files in place?

    A. sed 's|.50|.100|g' serverlist.txt

    B. sed -g 's|.50|.100|a' serverlist.txt

    C. sed -i 's|.50|.100|' serverlist.txt

    D. sed -i 's|.50|.100|g' serverlist.txt

  • Question 28:

    A technician suspects a company's border firewall is down, thus blocking Internet access. The technician executes the following commands:

    #ping -c 1 firewall.company.com 64 bytes from firewall.company.com (192.168.1.1): icmp_seq=1 ttl=64 time=0.061ms #ping -c 16 www.comptia.com 16 packets transmitted, 0 received, 100% packet loss, time 14999ms

    Which of the following commands should the technician use to BEST determine the source of this outage?

    A. tcpdump

    B. nmap

    C. dig

    D. traceroute

  • Question 29:

    A new video card was added to a customer workstation. To get the new video card to work correctly, a systems administrator needs to remove support for the nouveau video driver on the Linux workstation.

    Which of the following will accomplish this task?

    A. Use rmmod -f nouveau.

    B. Use modprobe -R nouveau.

    C. Add blacklist nouveau to /etc/modprobe.d/blacklist.conf.

    D. Add blacklist nouveau to /etc/modprobe.conf.

  • Question 30:

    A systems administrator documents the instructions on the internal wiki regarding how to turn the company's code into Debian packages. The instructions include the commands used to compile, what tests need to be run, the commands to convert the raw code into a package that apt or dpkg can manage, as well as an explanation of each command.

    Which of the following is this an example of?

    A. Infrastructure as code

    B. Attributes

    C. Procedures

    D. Configuration management

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.