Last Updated on July 17, 2021 by InfraExam

XK0-004 : CompTIA Linux+ : Part 13

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

    #ping -c 1 
    64 bytes from ( icmp_seq=1 ttl=64 time=0.061ms 
    #ping -c 16 
    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?

    • tcpdump
    • nmap
    • dig
    • traceroute
  2. A Linux user needs to connect to a remote email server named through the SMTP port.

    Which of the following commands will accomplish this task?

    • traceroute 25
    • netcat 25
    • traceroute 110
    • netcat 110
  3. 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.)

    • localectl
    • LC_ALL
    • date
    • time
    • hwclock
    • crontab
  4. 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:


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

    • sed ‘s|.50|.100|g’ serverlist.txt
    • sed -g ‘s|.50|.100|a’ serverlist.txt
    • sed -i ‘s|.50|.100|’ serverlist.txt
    • sed -i ‘s|.50|.100|g’ serverlist.txt
  5. Which of the following servers provides encrypted tunnel SOCKS services?

    • SNMP
    • VPN
    • CA
    • SSH
  6. The following represents a partial listing of a user’s .bashrc file:

    umask 2002

    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?

    • HISTSIZE=800
    • umask 2002
    • HISTCONTROL=ignoreboth
  7. Which of the following can be used to check the status of wireless devices that are connected to the system?

    • lsusb
    • iwconfig
    • netstat
    • ifconfig
  8. Joe, a user, creates a short shell script,, and saves it in his home directory with default permissions and paths. He then attempts to run the script by typing ./, but the command fails to execute.

    Which of the following commands would have allowed the script to run?

    • chmod u+x
    • source ./
    • chmod 155 ~/
    • chgrp Joe
  9. 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?

    • cat /etc/resolv.conf > /home/user/newfile
    • echo /etc/resolv.conf > /home/user/newfile
    • grep /etc/resolv.conf < /home/user/newfile
    • printf /etc/resolv.conf > /home/user/newfile
  10. An administrator notices a website hosted on an httpd web server is not loading. Upon further inspection, the administrator learns there are no httpd processes running. When starting the service, the site operates correctly for a few minutes before the process disappears again.

    Which of the following should the administrator consider as the MOST likely possibility before troubleshooting the issue?

    • The CPU has too much load, causing it to overheat, and the kernel is automatically killing the processes to keep the CPU cool.
    • An external database to which the web server connects is offline, causing httpd to die due to execution errors.
    • Shared libraries, which were recently updated, are causing compatibility issues and httpd to die due to version mismatch.
    • The out-of-memory killer was activated due to low available memory, causing the kernel to kill the processes automatically.
    • The server is intermittently losing access to the network, causing socket errors that trigger httpd to die.
  11. Which of the following Linux server roles should be installed to monitor and log local web traffic?

    • Proxy server
    • AAA server
    • SSH server
    • HTTP server
    • Name server
  12. An administrator is installing a new kernel but is getting an error indicating the filesystem is out of space. A disk usage check shows / has plenty of space.

    Which of the following BEST represents where the administrator should check next?

    • /var
    • /proc
    • /boot
    • /etc
  13. A Linux administrator needs to disable the Sendmail service on a Linux server and prevent it from being started manually and during boot.

    Which of the following is the BEST command to do this?

    • systemctl reset-failed sendmail
    • systemctl mask sendmail
    • systemctl stop sendmail
    • systemctl disable sendmail
  14. A user creates and installs a Linux VM on a local workstation. The VM can only connect to the local workstation.

    Which of the following BEST represents the default virtual network configuration in this instance?

    • Host-only
    • Bridged
    • NAT
    • Dual-homed
  15. A systems administrator is using a Linux laptop to troubleshoot network devices. The administrator runs the following command:

    # screen /dev/USB0

    Which of the following does this command MOST likely accomplish?

    • It copies the network traffic from the device connected to USB0 and screens out rejected traffic.
    • It logs all troubleshooting output from the monitor to external USB0 storage.
    • It monitors USB0 waiting for a network device to be connected to it as an Ethernet device.
    • It allows the administrator to interact with the character device connected to USB0.
  16. A new IO card has been added to the security server to log the opening and closing of the main entrance. A switch is attached, so the interface card returns a 1 when the door is opened and a 0 when the door is closed.

    Which of the following describes the Linux device to which this switch is attached?

    • /dev/tty0
    • /dev/port
    • /dev/gpio
    • /dev/sg0
  17. 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:


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

    • Restart the network services on both the remote server and the local machine.
    • Remove the entry for the web server from the known_hosts file on the local machine.
    • Update the /etc/hosts file on the remote server and local machine.
    • Add the administrator’s public key to the authorized_keys on the remote server.
  18. A server administrator notices that one of the servers cannot connect to its gateway, which has the IP

    Which of the following commands should the administrator execute to determine the default gateway of the server?

    • route -n
    • ip a default-gw
    • ifconfig
    • nslookup
  19. A Linux user uses a VPN to securely access the company’s systems from a laptop.

    Which of the following protocols are MOST likely used to secure the VPN connection? (Choose two.)

    • IPSec
    • HTTP
    • SFTP
    • VNC
    • SSL/TLS
    • SELinux
  20. 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.

    XK0-004 Part 13 Q20 063
    XK0-004 Part 13 Q20 063

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

    • The administrator can conclude Joe no longer has permissions to his data and needs to change the data ownership to Joe.
    • The administrator can conclude the data is gone from the system and needs to be restored from a backup.
    • The administrator can conclude Joe has been using the wrong folder and should be using /opt/data/user2.
    • The administrator can conclude the drive is not mounted properly and should be remounted.