Last Updated on July 11, 2021 by InfraExam

XK0-004 : CompTIA Linux+ : Part 03

  1. A systems administrator has finished building a new feature for the monitoring software in a separate Git branch.

    Which of the following is the BEST method for adding the new feature to the software’s master branch?

    • Merge the changes from the feature branch to the master branch.
    • Save the changes to the master branch automatically with each Git commit.
    • Clone the feature branch into the master branch.
    • Pull the changes from the feature branch into the master branch.
  2. Which of the following will provide a list of all flash, external, internal, and SSD drives?

    • lspci
    • lsmod
    • lsblk
    • lsusb
  3. Which of the following configuration management tools is considered agentless?

    • Puppet
    • Salt
    • Ansible
    • Chef
  4. An administrator reviews the following configuration file provided by a DevOps engineer:

    XK0-004 Part 03 Q04 016
    XK0-004 Part 03 Q04 016

    Which of the following would the application parsing this file MOST likely have to support?

    • YAML
    • AJAX
    • JSON
    • SOAP
  5. Which of the following is a difference between YAML and JSON?

    • Users can comment in YAML but not in JSON
    • JSON only uses curly brackets, while YAML only uses square brackets
    • JSON is used in web development, while YAML is used solely in back-end systems.
    • YAML has been deprecated for JSON.
  6. A junior administrator of a physical server receives log messages indicating the out-of-memory killer has been active. All memory slots are in use on the motherboard, but additional disk space is available. Space has been allocated for a swap file.

    Which of the following should the administrator use to reduce the output of memory messages?

    • free : swapoff / swapfile ; swapon -a
    • mkswap /swapfile; swapon –a
    • fallocate –l 2G /swapfile && swapon –a
    • echo “1” > /proc/meninfo ; swapon / swapfile
  7. A junior Linux administrator is optimizing a system in which an application needs to take priority 0 when running the process. The administrator runs the ps command and receives the following output:

    XK0-004 Part 03 Q07 017
    XK0-004 Part 03 Q07 017

    Given this scenario, which of the following steps will address this issue?

    • Issue the command renice –n 0 –p 8481
    • Issue the command renice –p 8481
    • Issue the command renice –p 0 -n 8481
    • Issue the command renice –n 8481
  8. An administrator needs to mount the shared NFS file system testhost:/testvolume to mount point /mnt/testvol and make the mount persistent after reboot.

    Which of the following BEST demonstrates the commands necessary to accomplish this task?

    • XK0-004 Part 03 Q08 018
      XK0-004 Part 03 Q08 018
    • XK0-004 Part 03 Q08 019
      XK0-004 Part 03 Q08 019
    • XK0-004 Part 03 Q08 020
      XK0-004 Part 03 Q08 020
    • XK0-004 Part 03 Q08 021
      XK0-004 Part 03 Q08 021
  9. A systems administrator has deployed a Linux server based on an Anaconda process with all packages and custom configurations necessary to install a web server role.

    Which of the following could be used to install more Linux servers with the same characteristics?

    • /etc/sysconfig/anaconda.cfg
    • /root/anaconda.auto
    • /root/anaconda-ks.cfg
    • /etc/sysconfig/installation.cfg
  10. A Linux administrator is using a Linux system as a router. During the tests, the administrator discovers that IP packets are not being sent between the configured interfaces.

    Which of the following commands enables this feature for IPv4 networks?

    • cat /proc/sys/net/ipv4/ip_route > 1
    • echo “1” > /proc/sys/net/ipv4/ip_forward
    • echo “1” > /proc/sys/net/ipv4/ip_route
    • echo “1” > /proc/sys/net/ipv4/ip_net
  11. A systems administrator wants to know the current status of a series of dd jobs that were started in the background three hours ago.

    Which of the following commands will achieve this task?

    • sudo killall –HUP dd
    • sudo killall dd
    • sudo killall –TERM dd
    • sudo killall -USR1 dd
  12. A Linux administrator needs the “tech” account to have the option to run elevated commands as root.

    Which of the following commands would BEST meet this goal?

    • $ su – tech –c “/bin/bash”
    • # usermod –aG wheel tech
    • # sudo –i tech
    • # groupadd –u tech –g root
  13. Which of the following is the purpose of the vmlinux file on a Linux system?

    • To prevent a Linux kernel panic
    • To start a Linux virtual machine
    • To provide the executable kernel for the system
    • To enable resource access to the network
  14. Ann, a junior systems administrator, is required to add a line to the /etc/yum.conf file. However, she receives the following error message when she tries to add the line:
    XK0-004 Part 03 Q08 021
    XK0-004 Part 03 Q08 021

    Ann performs some diagnostics to attempt to find the root cause:

    XK0-004 Part 03 Q14 023
    XK0-004 Part 03 Q14 023

    Which of the following commands should Ann execute to write content to /etc/yum?

    • chmod 755 /etc/yum.conf
    • setfacl –m m:rw /etc/yum.conf
    • chattr –i /etc/yum.conf
    • setenforce 0
  15. A Linux administrator needs to take stock of USB devices attached to the system.

    Which of the following commands would be BEST to complete this task?

    • lspci
    • lsusb
    • cat /proc/USB
    • modprobe -–usb
  16. Given the output below:

    XK0-004 Part 03 Q16 024
    XK0-004 Part 03 Q16 024

    Which of the following commands can be used to remove MyPhoto.jpg from the current directory?

    • unlink ./MyPhoto.jpg
    • del Pictures/photo.jpg
    • rm –rf ./Pictures
    • rm –f MyPhoto.jpg
    • ln –rm ./Pictures/photo.jpg
  17. Which of the following server roles would assign a host IP address?

    • DHCP
    • NTP
    • DNS
    • SSH
  18. Which of the following commands would show the default printer on a Linux system?

    • lpr
    • lpq
    • lpstat
    • lspci
  19. A systems administrator has set up third-party log aggregation agents across several cloud instances. The systems administrator wants to create a dashboard of failed SSH attempts and the usernames used.

    Which of the following files should be watched by the agents?

    • /var/log/audit/audit.log
    • /var/log/kern.log
    • /var/log/monitor
    • /etc/rsyslog.conf
  20. A systems administrator must clean up all application files in the directory /var/log/app. However, the company’s security policy requires the files to be kept on the backup server for one year. The Linux server has only the tar and bzip2 packages installed.

    Which of the following commands will package and compress the files?

    • tar –zcvf applicationfiles.tar.bz2 /var/log/app/*
    • tar –jcvf applicationfiles.tar.bz2 /var/log/app/*
    • tar –cvf applicationfiles.tar.bz2 /var/log/app/*
    • tar –xvf applicationfiles.tar.bz2 /var/log/app/*