Last Updated on July 17, 2021 by InfraExam

XK0-004 : CompTIA Linux+ : Part 09

  1. An administrator needs to create a file named hello in the home directory that contains the following text:

    it’s me!

    Which of the following commands would accomplish this goal?

    • mkdir ~/hello
      touch ~/”it’s me!”
    • touch ~/hello
      echo “it’s me!” > ~/hello
    • mv ~/hello
      cp “it’s me!” > ~/hello
    • type ~/hello
      print “it’s me!”
  2. Which of the following commands will let a Linux user know the PCI devices that are installed in the system?

    • cat /proc/devices/pci
    • lspci
    • lsdev
    • cat /proc/sys/dev
  3. A Linux administrator is updating iptables rules and is given the following tasks:

    Output a list of iptables rules.
    Remove all iptables rules.

    Which of the following actions should be performed from the terminal console to accomplish these tasks? (Choose two.)

    • iptables -F
    • iptables -L
    • iptables -I
    • iptables -C
    • iptables -A
    • iptables -N
  4. A junior Linux administrator is performing version control on a Git repository. The administrator is given a list of tasks to complete:

    List the currently installed Git release.
    Show the status reporting of the clone.

    Which of the following commands would allow the administrator to complete these tasks? (Choose two.)

    • git clone –progress
    • git clone –recursive
    • git –help
    • git clone –dissociate
    • git –version
    • git clone –shared
  5. A systems administrator needs to allow the Linux server to receive HTTP connections from Internet hosts. By default, the port for HTTP connections is blocked. Which of the following rules should be added in the firewall to allow this type of connection?

    • firewall-cmd –zone=public –add-port=443/tcp –permanent
    • firewall-cmd –zone=internal –add-port=80/tcp –permanent
    • firewall-cmd –zone=public –add-port=80/tcp –permanent
    • firewall-cmd –zone=internal –add-port=443/tcp –permanent
  6. A Linux administrator attempts to install the package newprogram.x86_64.rpm using a package manager. The administrator receives a warning indicating the command that was run was using a deprecated package manager. Which of the following commands should the administrator use to avoid the warning and install the newprogram.x86_64.rpm program?

    • # dnf install newprogram.x86_64.rpm
    • # rpm -e newprogram.x86_64.rpm
    • # dpkg -i newprogram.x86_64.rpm
    • # apt-get install newprogram.x86_64.rpm
  7. Which of the following would allow remote users to access a corporate server? (Choose two.)

    • VPN server
    • SMTP server
    • NTP server
    • SSH server
    • DHCP server
    • File server
  8. A junior administrator is configuring local name lookups for fully qualified domain names in an isolated environment. The administrator is given a checklist and must accomplish the following tasks:

    Add localhost with loopback address.
    Add 192.168.192.12/24 to resolve to database01.comptia.org

    Given this scenario, which of the following steps should the administrator perform to accomplish these tasks?

    • Open the /etc/nsswitch.conf file with a file editor and add the following lines:127.0.0.1 localhost
      192.168.192.12 database01.comptia.org
    • Open the /etc/dhcpd.conf file with a file editor and add the following lines:127.0.0.1 localhost
      192.168.192.12 database01.comptia.org
    • Open the /etc/hosts file with a file editor and add the following lines:127.0.0.1 localhost
      192.168.192.12 database01.comptia.org
    • Open the /etc/network file with a file editor and add the following lines:127.0.0.1 localhost
      192.168.192.12 database01.comptia.org
  9. An administrator is reviewing suspicious activity on a server and needs to determine which users logged into the system within the past 24 hours. Which of the following commands should the administrator run to determine this?

    • Last
    • Who
    • id
    • usermod
  10. During the final step of staging new Linux hardware, GRUB2 is installed to the system drive. Which of the following BEST describes the role of GRUB2 in a new Linux installation?

    • It provides a menu for creating administrator task shortcuts.
    • It provides a menu for running special shell scripts.
    • It provides a method to partition a hard drive.
    • It provides a method to pass parameters to the Linux kernel on startup.
  11. A site reliability engineer updated the latest configuration management scripts and committed them to a workstream called either test or patch. A Linux administrator wants to ensure these latest workstreams are able to be retrieved to the server. Which of the following is the BEST Git attribute to use?

    • branch
    • fetch
    • log
    • pull
  12. A systems administrator wants to disable the Linux Kernel WatchDog Timer Driver for security purposes. Which of the following will accomplish this task?

    • Add blacklist watchdog to the /etc/modprobe.d/blacklist file.
    • Rename the /etc/modprobe.d/watchdog file to watchdog.off instead.
    • Remove the watchdog=1 from the /usr/modules/watchdog.conf file.
    • Add watchdog=0 to the /etc/modprobe.conf file.
  13. In which of the following Linux GUI environments would the Konsole application MOST likely be found?

    • Gnome
    • KDE
    • Cinnamon
    • Unity
    • MATE
  14. A new user has been added to a Linux machine. Which of the following directories would contain the user’s default files?

    • /etc/login.defs
    • /etc/passwd
    • /etc/skel
    • /etc/inittab
  15. An issue was discovered on a testing branch of a Git repository. A file was inadvertently modified and needs to be reverted to the master branch version. Which of the following is the BEST option to resolve the issue?

    • git branch -b master file
    • git merge master testing
    • git stash branch master
    • git checkout master — file
  16. A junior systems administrator has generated a PKI certificate for SSH sessions. The administrator would like to configure authentication without passwords to remote systems. Which of the following should the administrator perform?

    • Add the content of id_rsa.pub file to the remote system ~/.ssh/authorized_keys location.
    • Add the content of id_rsa file to the remote system ~/.ssh/authorized_keys location.
    • Add the content of id_rsa file to the remote system ~/.ssh/known_hosts location.
    • Add the content of id_rsa.pub file to the remote system ~/.ssh/known_hosts location.
  17. A junior systems administrator is scanning archive.tar files with an antivirus scanner. The administrator is given the following tasks:

    List all files that are in the archive.tar files.
    Extract all files from the archive.tar files.

    Which of the following actions should be performed to meet these requirements? (Choose two.)

    • tar -tvf archive.tar
    • tar -xf archive.tar
    • tar -A archive.tar
    • tar -av archive.tar
    • tar -r archive.tar
    • tar -uvz archive.tar
  18. SIMULATION

    After installing a new web server, you are unable to browse to the default web page.

    INSTRUCTIONS

    Review all the command output and select the command needed to remediate the issue.

    If at any time you would like to bring back the initial state of the simulation, please click the Reset All button.

    XK0-004 Part 09 Q018 051
    XK0-004 Part 09 Q018 051
    XK0-004 Part 09 Q018 052
    XK0-004 Part 09 Q018 052
    XK0-004 Part 09 Q018 053
    XK0-004 Part 09 Q018 053
    XK0-004 Part 09 Q018 054
    XK0-004 Part 09 Q018 054
    XK0-004 Part 09 Q018 055
    XK0-004 Part 09 Q018 055
    XK0-004 Part 09 Q018 056
    XK0-004 Part 09 Q018 056

    • Systemctl restart nginx
  19. A corporate server security policy states, “Ensure password hashes are not readable by non-administrative users.” The administrator should check the permissions on which of the following files to ensure the server satisfies this policy?

    • /etc/shadow
    • /etc/passwd
    • /etc/group
    • /etc/security/limits.conf
  20. A Linux systems administrator is implementing Source Code Management for the web application server configuration files located in /etc/httpd/. Which of the following steps should the administrator perform FIRST?

    • Clone the remote repository using ‘git clone’
    • Create a new repository using ‘git init’
    • Retrieve the remote changes using ‘git commit’
    • Configure the directory for git using ‘git config’