XK0-004 : CompTIA Linux+ : Part 05

  1. A company wants to ensure that all newly created files can be modified only by their owners and that all new directory content can be changed only by the creator of the directory. Which of the following commands will help achieve this task?

    • umask 0022
    • umask 0012
    • chmod –R 0644 /
    • chmod –R 0755 /
  2. A Linux administrator needs to back up the folder /usr/domain, and the output must be a gzip compressed tar. Which of the following commands should be used?

    • tar –cv domain.tar.gz /usr/domain
    • tar –cvf /usr/domain domain.tar.gz
    • tar –czvf domain.tar.gz /usr/domain
    • tar –cxzv /usr/domain domain.tar.gz
  3. A Linux administrator needs every new file created on a directory to maintain the group permissions of the same directory. Which of the following commands would satisfy this requirement?

    • chmod o+s <directory>
    • chmod u+s <directory>
    • chmod +s <directory>
    • chmod g+s <directory>
  4. Which of the following statements BEST represents what the term “agentless” means regarding orchestration?

    • Installation of a tool is not required on the remote system to perform orchestration tasks
    • It facilitates version control when using infrastructure as code during orchestration
    • It automatically removes malware from the remote system during orchestration
    • A tool can only be accessed remotely to perform orchestration tasks
  5. Given that a company’s policy states that users cannot install third-party tools on Window servers, which of the following protocols will allow a Linux GUI to connect to a Windows server?

    • VNC
    • NX
    • RDP
    • X11
  6. Ann, a junior Linux administrator, needs to copy software from her local machine to assist in developing a software application on a remote machine with the IP address The file needs to be placed on the /tmp directory. After downloading the RPM to the local machine, which of the following commands would be BEST to use to copy the software?

  7. An administrator is tasked with increasing the size of the volume /dev/vg/lv to 20GB. Which of the following BEST illustrates the steps the administrator should take?

    • vgextend –L20G /dev/vg/lv; resizelv /dev/vg/lv
    • parted –L20G /dev/vg/lv; remount /dev/vg/lv
    • mkfs –L20G /dev/vg/lv; tune2fs /dev/vg/lv
    • lvextend –L20G /dev/vg/lv; resize2fs /dev/vg/lv
  8. A systems administrator observes high latency values when reaching a remote web server. Which of the following commands will help determine and isolate issues on the network side?

    • mtr
    • dig
    • netstat
    • route
  9. A Linux administrator wants to obtain a list of files and subdirectories in the /etc directory that contain the word “services”. Once the files and subdirectories are discovered, they should be listed alphabetically in the /var/tmp/foundservices file. Which of the following shell scripts will accomplish this task?

    • #/bin/bash
      find /etc –name services | sort > /var/tmp/foundservices
    • #/bin/bash
      locate /etc –sort –name services > /var/tmp/foundservices
    • #/bin/bash
      find –name services –sort </var/tmp/foundservices
    • #/bin/bash
      find /etc –name services –sort > /var/tmp/foundservices
  10. A systems administrator is enabling quotas on the /home directory of a Linux server. The administrator makes the appropriate edits to the /etc/fstab file and attempts to issue the commands to enable quotas on the desired directory. However, the administrator receives an error message stating the filesystem does not support quotas. Which of the following commands should the administrator perform to proceed?

    • mount –o remount /home
    • quotacheck -cg
    • edquota /home
    • quotaon /home
  11. A systems administrator needs to install a new piece of hardware that requires a new driver. The driver should be manually installed. Which of the following describes the order of commands required to obtain module information, install the module, and check the log for any errors during module installation?

    • lsmod, modprobe, modinfo
    • modinfo, insmod, modprobe
    • modinfo, insmod, dmesg
    • lsmod, insmod, dmesg
  12. A new HTTPS web service is being deployed on a server. Which of the following commands should the Linux administrator use to ensure traffic is able to flow through the system firewall to the new service?

    • iptables –I OUTPUT –p tcp –sport 443 –j ACCEPT
    • iptables –A INPUT –p tcp –dport 443 –j ACCEPT
    • iptables –I INPUT –dport 443 –j ACCEPT
    • iptables –A OUTPUT –p tcp –dport 443 –j ACCEPT
  13. An administrator has modified the configuration file for a service. The service is still running but is not using the new configured values. Which of the following will BEST remediate this issue?

    • kill -HUP
    • init 0
    • service start
    • renice -10
  14. An administrator needs to see a list of the system user’s encrypted passwords. Which of the following Linux files does the administrator need to read?

    • /etc/shadow
    • /etc/skel
    • /etc/passwd
    • /etc/pw
  15. A Linux administrator is setting up a testing environment and needs to connect to a separate testing server using the production server name. The administrator needs to override the hostname that the DNS is returning in order to use the test environment. Which of the following commands should be run on each of the testing systems to BEST meet this goal?

    • # hostnamectl set-hostname “ production.company.com”
    • # grep –i IP “${ip addr show} production.company.com” > /etc/resolv.conf
    • # ip addr add dev eth0 && rndc reload production.company.com
    • # echo “ production.company.com” >> /etc/hosts
  16. A Linux administrator opens a ticket to have an external hard drive mounted. As a security policy, external storage kernel modules are disabled.

    Which of the following is the BEST command for adding the proper kernel module to enable external storage modules?

    • rmmod /lib/modules/3.6.12-100-generic/kernel/drivers/usb/storage/usb-storage.ko
    • modinfo /lib/modules/3.6.12-100-generic/kernel/drivers/usb/storage/usb-storage.ko
    • depmod /lib/modules/3.6.12-100-generic/kernel/drivers/usb/storage/usb-storage.ko
    • insmod /lib/modules/3.6.12-100-generic/kernel/drivers/usb/storage/usb-storage.ko
  17. Which of the following are Linux desktop managers? (Choose two.)

    • KDE
    • GNOME
    • GUI
    • VNC
    • X11
    • SPICE
  18. A systems administrator is configuring options on a newly installed Linux VM that will be deployed to the Pacific time zone. Which of the following sets of commands should the administrator execute to accurately configure the correct time settings?

    • cd /etc
      ln –s /usr/share/zoneinfo/US/Pacific localtime
    • cd /usr/local
      ln –s /usr/share/zoneinfo/US/Pacific zoneinfo
    • cd /etc/local
      ln –s /usr/share/zoneinfo/US/Pacific localtime
    • cd /usr/share/local
      ln –s /usr/share/zoneinfo/US/Pacific localectl
  19. A user has connected a Bluetooth mouse to a computer, but it is not working properly. Which of the following commands should the systems administrator use to fix the issue?

    • lsmod –i bluetooth
    • insmod bluetooth
    • modprobe –r bluetooth
    • depmod –i bluetooth
  20. An administrator notices that a long-running script, /home/user/script.sh, is taking up a large number of system resources. The administrator does not know the script’s function. Which of the following commands should the administrator use to minimize the script’s impact on system resources?

    • renice
    • Kill
    • bg
    • nohup