XK0-004 : CompTIA Linux+ : Part 06

  1. An administrator needs to deploy 100 identical CentOS workstations via PXE boot. Which of the following should the administrator use to minimize the amount of interaction with the consoles needed?

    • Kickstart script
    • Ghost image on a distribution server
    • Hard disk duplicator
    • Hard disk duplicator
    • Ubiquity script
  2. A user, jsmith, needs access to database files located on a server. Which of the following will add jsmith to the “dba” group and preserve existing group memberships?

    • usermod –a –G dba jsmith
    • usermod –g dba jsmith
    • useradd –g dba jsmith
    • groupmod dba –u jsmith
  3. A Linux administrator installed a new network adapter and temporarily disabled the network service from starting on boot. The partial output of chkconfig is as follows:

    XK0-004 Part 06 Q03 026
    XK0-004 Part 06 Q03 026

    Which of the following commands BEST describes how the administrator should re-enable the network service?

    • chkconfig --level 0 network on
    • chkconfig --level 0-6 network on
    • chkconfig --level 6 network on
    • chkconfig --level 12 network on
    • chkconfig --level 345 network on
  4. An engineer is working on a production application deployment that requires changing a web application property file called server.property that is managed by the Git version control system. A cloned copy of the remote repository in which the server.property file exists is on the local desktop computer. The engineer makes appropriate changes to the files, saves it as server.property, and executes git commit –m “changed the property file” server.property. Which of the following commands did the engineer fail to perform?

    • git init server.property
    • git merge server.property
    • git add server.property
    • git push server.property
  5. A Linux administrator retrieved a repository of files from a Git server using git clone. The administrator wants to see if a configuration file was added to the repository. Which of the following Git arguments should be used to see the recent modifications?

    • fetch
    • log
    • init
    • pull
  6. A systems administrator is unable to reach other devices on the network and the Internet. The server is configured with the IP address 192.169.1.50/24 on eth0. The server’s router is 192.168.1.1. The administrator reviews the output of route –n:

    XK0-004 Part 06 Q06 027
    XK0-004 Part 06 Q06 027

    Which of the following commands should the administrator run to correct the issue?

    • route del default gw 192.168.2.1 eth0; route add default gw 192.168.1.1 eth0
    • route add –net 192.168.10.0 netmask 255.255.255.0 gw 192.168.2.1 eth0
    • route add 192.168.1.1 default 192.168.1.50 eth0
    • route host gw 192.168.1.1 eth0
  7. A junior Linux administrator needs to access production servers using a secure SSH protocol. Which of the following files should contain the public key to gain remote access to the server?

    • ~/ssh/authorized-keys
    • /etc/authorized_keys
    • /etc/sshd/ssh.conf
    • ~/.ssh/authorized_keys
  8. An administrator needs to see the type of CPU that a server is running. Which of the following files contains this information?

    • /proc/cpuinfo
    • /etc/devices/info.conf
    • /dev/proc/cpu
    • /sys/dev/cpuinfo
  9. A junior systems administrator is creating a cron job. The cron job requirements are as follows:
    Run the hello.sh script every hour (24 times in one day).
    Run it on Monday only.

    Given this scenario, which of the following crontab options should be configured to meet these requirements?

    • 0 *** 1 hello.sh
    • 0 24 ** Monday hello.sh
    • 24 *** Monday hello.sh
    • 1 *** 0 hello.sh
  10. A Linux systems administrator is setting up SSH access with PKI for several using their newly created RSA keys. Which of the following MOST securely achieves this task?

    • Use curl to copy each user’s public key file to the respective system
    • Use cp to copy each user’s public key file to the respective system
    • Use ssh-copy-id to copy each user’s public key file to the respective system
    • Use ssh-copy-id to copy each user’s private key file to the respective system
  11. The development team has automated their software build process so each time a change is submitted to the source code repository, a new software build is compiled. They are requesting that the Linux operations team look into automating the deployment of the software build into the test environment. Which of the following is the benefit to the development team for implementing deployment automation?

    • To ensure the build commits are also deployed to the test environment
    • To enable notifications when builds are deployed to the test environment
    • To ensure software builds in test are not accidentally deployed to production
    • To streamline the deployment process for deploying builds into test environments
  12. A Linux administrator needs to schedule a cron job to run at 1:15 p.m. every Friday to report the amount of free disk space on the system and to send the output to a file named “freespace”. Which of the following would meet this requirement?

    • 13 15 * * 5 df > /freespace
    • 15 13 * * 5 df > /freespace
    • 15 1 * * 6 df > /freespace
    • 15 13 6 * * df > /freespace
  13. A technician wants to secure a sensitive workstation by ensuring network traffic is kept within the local subnet. To accomplish this task, the technician executes the following command:

    echo 0 > /proc/sys/net/ipv4/ip_default_ttl

    Which of the following commands can the technician use to confirm the expected results? (Choose two.)

    • tcpdump
    • traceroute
    • route
    • iperf
    • ip
    • arp
  14. A junior Linux administrator needs to ensure a service will start on system boot. Which of the following commands should be used to accomplish this task?

    • chkconfig <service> on
    • systemctl <service> bootup
    • service <service> enable
    • crontab install <service>
  15. SIMULATIONFind the file named core and remove it from the system.INSTRUCTIONS

    Type “help” to display a list of available commands.

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

    Linux Shell

    XK0-004 Part 06 Q15 029
    XK0-004 Part 06 Q15 029

    Explanation:

    XK0-004 Part 06 Q15 030
    XK0-004 Part 06 Q15 030

    Reference: https://www.cyberciti.biz/faq/linux-unix-how-to-find-and-remove-files/

  16. DRAG DROP

    As a Systems Administrator, to reduce disk space, you were tasked to create a shell script that does the following:

    Add relevant content to /tmp/script.sh, so that it finds and compresses rotated files in /var/log without recursion.

    INSTRUCTIONS

    Fill the blanks to build a script that performs the actual compression of rotated log files.

    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 06 Q16 031
    XK0-004 Part 06 Q16 031

     

  17. HOTSPOT

    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 06 Q17 032
    XK0-004 Part 06 Q17 032
    XK0-004 Part 06 Q17 033
    XK0-004 Part 06 Q17 033

     

  18. A Linux administrator has installed a web application firewall in front of a web server running on HTTP port 8080 and successfully started the HTTP server. However, after opening the application URL in an Internet browser, the administrator discovered that the application does not work. The administrator performed the following diagnostic steps:

    Output of sysctl -a command:

    XK0-004 Part 06 Q18 034
    XK0-004 Part 06 Q18 034

    Output of iptables -L command:

    XK0-004 Part 06 Q18 035
    XK0-004 Part 06 Q18 035

    Output of netstat –nltop | grep “8080”:

    XK0-004 Part 06 Q18 036
    XK0-004 Part 06 Q18 036

    Which of the following is the NEXT step the administrator should perform to permanently fix the issue at the kernel level?

    • sysctl -w net.ipv4.ip_forward=1 then run sysctl -w /etc/sysctl.conf to enable the change
    • Edit /etc/sysctl.conf file and add net.ipv4.ip_forward = 1 then run sysctl -p /etc/sysctl.conf to enable the change
    • Add iptables rule iptables -A INPUT -m state –state NEW -p tcp –dport 8080 -j then restart httpd daemon
    • Add iptables rule iptables -A FORWARD-m state –state NEW -p tcp –dport 8080 –j ACCEPT then restart httpd daemon
  19. A member of the production group issues the following command:

    echo “Monday through Friday” > /production_docs/days

    The command fails to execute, so the user obtains the following output:

    drwxr–r– root production 0 Jun 16 2018 production
    -rw-r–r– production production 4096 Jun 14 2018 days

    Which of the following commands should the user execute to BEST fix the issue?

    • chmod g+w production to change the permissions on the days file
    • chgrp root production_docs/days to change the group ownership of the production_docs/days file
    • chmod g+S production to set the GUID on the production_docs directory
    • chown production to change the ownership of the production_docs directory
  20. A junior systems administrator created a new filesystem /dev/sda1 with mountpoint /data and added it to the /etc/fstab for auto-mounting.

    When the systems administrator tries to mount the file system, the system refuses. Given the output below:

    XK0-004 Part 06 Q20 037
    XK0-004 Part 06 Q20 037

    Which of the following steps is necessary?

    • Change the filesystem from /dev/sda1 to /dev/sda2 and reboot.
    • Change the options to auto,dev,sync,rw,nosuid and run the mount -a command.
    • Change the mount point to data and reboot.
    • Change the dump column to 1 and run the mount -a command.
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments