[Apr 25, 2023] Latest CompTIA XK0-005 Exam Practice Test To Gain Brilliante Result [Q47-Q72]

Share

Latest [Apr 25, 2023] CompTIA XK0-005 Exam Practice Test To Gain Brilliante Result

Take a Leap Forward in Your Career by Earning CompTIA XK0-005


The CompTIA XK0-005 (CompTIA Linux+ Certification) certification exam is an excellent opportunity for IT professionals to showcase their knowledge and skills in Linux systems administration. The certification exam is vendor-neutral and covers a wide range of topics that are essential for managing Linux systems. By passing this certification exam, candidates can enhance their career prospects in the IT industry and demonstrate their proficiency in Linux systems administration.

 

NEW QUESTION # 47
A Linux engineer needs to create a custom script, cleanup.sh, to run at boot as part of the system services. Which of the following processes would accomplish this task?

  • A. Create a unit file in the /etc/systemd/system/ directory.
    systemctl enable cleanup
    systemctl is-enabled cleanup
  • B. Create a unit file in the /etc/sysctl.d/ directory.
    systemctl enable cleanup
    systemctl is-enabled cleanup
  • C. Create a unit file in the /etc/default/ directory.
    systemctl enable cleanup
    systemctl is-enabled cleanup
  • D. Create a unit file in the /etc/ske1/ directory.
    systemctl enable cleanup
    systemctl is-enabled cleanup

Answer: A


NEW QUESTION # 48
Which of the following technologies provides load balancing, encryption, and observability in containerized environments?

  • A. Sidecar pod
  • B. Virtual private network
  • C. Overlay network
  • D. Service mesh

Answer: D


NEW QUESTION # 49
A Linux administrator has set up a new DNS forwarder and is configuring all internal servers to use the new forwarder to look up external DNS requests. The administrator needs to modify the firewall on the server for the DNS forwarder to allow the internal servers to communicate to it and make the changes persistent between server reboots. Which of the following commands should be run on the DNS forwarder server to accomplish this task?

  • A. iptables -A OUTPUT -p udp -ra udp -dport 53 -j ACCEPT
  • B. ufw allow out dns
  • C. flrewall-cmd --zone-public --add-port-53/udp --permanent
  • D. systemctl reload firewalld

Answer: C


NEW QUESTION # 50
An administrator recently updated the BIND software package and would like to review the default configuration that shipped with this version. Which of the following files should the administrator review?

  • A. /etc/named.conf
  • B. /etc/named.conf.rpmsave
  • C. /etc/named.conf.rpmnew
  • D. /etc/bind/bind.conf

Answer: A


NEW QUESTION # 51
A Linux administrator needs to obtain a list of all volumes that are part of a volume group. Which of the following commands should the administrator use to accomplish this task?

  • A. pvs
  • B. vgs
  • C. lvs
  • D. fdisk -1

Answer: C


NEW QUESTION # 52
User1 is a member of the accounting group. Members of this group need to be able to execute but not make changes to a script maintained by User2. The script should not be accessible to other users or groups. Which of the following will give proper access to the script?

  • A. chown accounting:user1 script.sh
    chmod 057 script.sh
  • B. chown user2:accounting script.sh
    chmod u+x script.sh
  • C. chown user2:accounting script.sh
    chmod 750 script.sh
  • D. chown user1:accounting script.sh
    chmod 777 script.sh

Answer: A


NEW QUESTION # 53
A Linux administrator needs to create an image named sda.img from the sda disk and store it in the /tmp directory. Which of the following commands should be used to accomplish this task?

  • A. dd --of=/dev/sda --if=/tmp/sda.img
  • B. dd --if=/dev/sda --of=/tmp/sda.img
  • C. dd if=/dev/sda of=/tmp/sda.img
  • D. dd of=/dev/sda if=/tmp/sda.img

Answer: C


NEW QUESTION # 54
A systems administrator is tasked with creating an Ansible playbook to automate the installation of patches on several Linux systems. In which of the following languages should the playbook be written?

  • A. JSON
  • B. SQL
  • C. HTML
  • D. YAML

Answer: D


NEW QUESTION # 55
A Linux administrator created the directory /project/access2all. By creating this directory, the administrator is trying to avoid the deletion or modification of files from non-owners. Which of the following will accomplish this goal?

  • A. chmod ugo+rwx /project/access2all
  • B. chmod +rws /project/access2all
  • C. chmod 2770 /project/access2all
  • D. chmod +t /project/access2all

Answer: D


NEW QUESTION # 56
Using AD Query, the security gateway connections to the Active Directory Domain Controllers using what protocol?

  • A. Remote Desktop Protocol (RDP)
  • B. Windows Management Instrumentation (WMI)
  • C. Lightweight Directory Access Protocol (LDAP)
  • D. Hypertext Transfer Protocol Secure (HTTPS)

Answer: B


NEW QUESTION # 57
A cloud engineer needs to check the link status of a network interface named eth1 in a Linux server. Which of the following commands can help to achieve the goal?

  • A. ip link show eth1
  • B. netstat -r eth1
  • C. ifconfig hw eth1
  • D. ss -ti eth1

Answer: A


NEW QUESTION # 58
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.

Answer:

Explanation:


NEW QUESTION # 59
A Linux administrator was asked to run a container with the httpd server inside. This container should be exposed at port 443 of a Linux host machine while it internally listens on port 8443. Which of the following commands will accomplish this task?

  • A. podman run -d -p 443:8443 httpd
  • B. podman run -d -p 8443:443 httpd
  • C. podman exec -p 8443:443 httpd
  • D. podman run -d -e 443:8443 httpd

Answer: A


NEW QUESTION # 60
A Linux administrator would like to use systemd to schedule a job to run every two hours. The administrator creates timer and service definitions and restarts the server to load these new configurations. After the restart, the administrator checks the log file and notices that the job is only running daily. Which of the following is MOST likely causing the issue?

  • A. The OnCalendar schedule is incorrect in the timer definition.
  • B. The checkdiskspace.service needs to be enabled.
  • C. The system-daemon services need to be reloaded.
  • D. The checkdiskspace.service is not running.

Answer: C


NEW QUESTION # 61
A Linux administrator booted up the server and was presented with a non-GUI terminal. The administrator ran the command systemctl isolate graphical.target and rebooted the system by running systemctl reboot, which fixed the issue. However, the next day the administrator was presented again with a non-GUI terminal. Which of the following is the issue?

  • A. The administrator did not shut down the server properly.
  • B. The administrator did not reboot the server properly.
  • C. The administrator did not set the default target to basic.target.
  • D. The administrator did not set the default target to graphical.target.

Answer: D


NEW QUESTION # 62
A developer has been unable to remove a particular data folder that a team no longer uses. The developer escalated the issue to the systems administrator. The following output was received:

Which of the following commands can be used to resolve this issue?

  • A. chown -R data/
  • B. chattr -R -i data/
  • C. chgrp -R 755 data/
  • D. chmod -R 777 data/

Answer: B


NEW QUESTION # 63
A systems administrator is receiving tickets from users who cannot reach the application app that should be listening on port 9443/tcp on a Linux server.
To troubleshoot the issue, the systems administrator runs netstat and receives the following output:

Based on the information above, which of the following is causing the issue?

  • A. The IP address 0.0.0.0 is not valid.
  • B. The application is listening on port 1234.
  • C. The application is listening on the loopback interface.
  • D. The application is not running.

Answer: C


NEW QUESTION # 64
A systems administrator is deploying three identical, cloud-based servers. The administrator is using the following code to complete the task:

Which of the following technologies is the administrator using?

  • A. Ansible
  • B. Terraform
  • C. Puppet
  • D. Chef

Answer: B


NEW QUESTION # 65
While inspecting a recently compromised Linux system, the administrator identified a number of processes that should not have been running:

Which of the following commands should the administrator use to terminate all of the identified processes?

  • A. killall -9 -upload*.sh"
  • B. pkill -9 -f "upload*.sh"
  • C. kill -9 "upload*.sh"
  • D. skill -9 "upload*.sh"

Answer: A


NEW QUESTION # 66
The security team has identified a web service that is running with elevated privileges A Linux administrator is working to change the systemd service file to meet security compliance standards. Given the following output:

Which of the following remediation steps will prevent the web service from running as a privileged user?

  • A. Adding the User-webservice to the [Service] section of the service file
  • B. Updating the Environment File line in the [Service] section to/home/webservice/config
  • C. Changing the:nulti-user.target in the [Install] section to basic.target
  • D. Removing the ExecStarWusr/sbin/webserver -D SOPTIONS from the service file

Answer: D


NEW QUESTION # 67
A Linux administrator has logged in to a server for the first time and needs to know which services are allowed through the firewall. Which of the following options will return the results for which the administrator is looking?

  • A. firewall-cmd -list-services
  • B. systemctl status firewalld
  • C. firewall-cmd -check-config
  • D. firewall-cmd -get-services

Answer: A


NEW QUESTION # 68
A Linux administrator found many containers in an exited state. Which of the following commands will allow the administrator to clean up the containers in an exited state?

  • A. docker rm $(docker ps -aq)
  • B. docker rm --all
  • C. docker images prune *
  • D. docker rm --state exited

Answer: D


NEW QUESTION # 69
A systems administrator is implementing a new service task with systems at startup and needs to execute a script entitled test.sh with the following content:

The administrator tries to run the script after making it executable with chmod +x; however, the script will not run. Which of the following should the administrator do to address this issue? (Choose two.)

  • A. Restart the computer to enable the new service.
  • B. Add #!//bin/bash to the top of the script.
  • C. Add #!/bin/bash to the bottom of the script.
  • D. Shut down the computer to enable the new service.
  • E. Create a unit file for the new service in /etc/init.d with the name helpme.service in the location.
  • F. Create a unit file for the new service in /etc/systemd/system/ with the name helpme.service in the location.

Answer: B,F


NEW QUESTION # 70
To harden one of the servers, an administrator needs to remove the possibility of remote administrative login via the SSH service. Which of the following should the administrator do?

  • A. Add the line DenyUsers root to the /etc/hosts.deny file.
  • B. Set PermitRootLogin to no in the /etc/ssh/sshd_config file.
  • C. Add the line account required pam_nologin. so to the /etc/pam.d/sshd file.
  • D. Set PubKeyAuthentication to no in the /etc/ssh/ssh_config file.

Answer: B


NEW QUESTION # 71
A Linux administrator has installed a web server, a database server, and a web application on a server. The web application should be active in order to render the web pages. After the administrator restarts the server, the website displays the following message in the browser: Error establishing a database connection. The Linux administrator reviews the following relevant output from the systemd init files:

The administrator needs to ensure that the database is available before the web application is started. Which of the following should the administrator add to the HTTP server .service file to accomplish this task?

  • A. WANTEDBY=mariadb.service
  • B. ONFAILURE=mariadb.service
  • C. TRIGGERS=mariadb.service
  • D. REQUIRES=mariadb.service

Answer: D


NEW QUESTION # 72
......

Authentic Best resources for XK0-005 Online Practice Exam: https://www.easy4engine.com/XK0-005-test-engine.html

Updates Up to 365 days On Developing XK0-005 Braindumps: https://drive.google.com/open?id=1pm_yoWMx26cPPncJ9n-OpnAmeUa308BH