XK0-005 Practice Test Questions

361 Questions


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.

Add #!/bin/bash to the bottom of the script.


B.

Create a unit file for the new service in /etc/systemd/system/ with the name helpme.service in the location.


C.

Add #!//bin/bash to the top of the script.


D.

Restart 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.

Shut down the computer to enable the new service.





B.
  

Create a unit file for the new service in /etc/systemd/system/ with the name helpme.service in the location.



C.
  

Add #!//bin/bash to the top of the script.



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.

Puppet


C.

Chef


D.

Terraform





D.
  

Terraform



A Linux user reported the following error after trying to connect to the system remotely:
ssh: connect to host 10.0.1.10 port 22: Resource temporarily unavailable.
The Linux systems administrator executed the following commands in the Linux system while trying to diagnose this issue:

Which of the following commands will resolve this issue?


A.

firewall-cmd --zone=public --permanent --add-service=22


B.

systemctl enable firewalld; systemctl restart firewalld


C.

firewall-cmd --zone=public --permanent --add-service=ssh


D.

firewall-cmd --zone=public --permanent --add-port=22/udp





C.
  

firewall-cmd --zone=public --permanent --add-service=ssh



A systems administrator made some unapproved changes prior to leaving the company. The newly hired administrator has been tasked with revealing the system to a compliant state. Which of the following commands will list and remove the correspondent packages?


A.

dnf list and dnf remove last


B.

dnf remove and dnf check


C.

dnf info and dnf upgrade


D.

dnf history and dnf history undo last





D.
  

dnf history and dnf history undo last



A Linux administrator is troubleshooting the root cause of a high CPU load and average.

Which of the following commands will permanently resolve the issue?


A.

renice -n -20 6295


B.

pstree -p 6295


C.

iostat -cy 1 5


D.

kill -9 6295





A.
  

renice -n -20 6295



Which of the following technologies can be used as a central repository of Linux users and groups?


A.

LDAP


B.

MFA


C.

SSO


D.

PAM





A.
  

LDAP



A systems administrator is encountering performance issues. The administrator runs 3 commands with the following output

The Linux server has the following system properties
CPU: 4 vCPU
Memory: 50GB
Which of the following accurately describes this situation?


A.

The system is under CPU pressure and will require additional vCPUs


B.

The system has been running for over a year and requires a reboot.


C.

Too many users are currently logged in to the system


D.

The system requires more memory





B.
  

The system has been running for over a year and requires a reboot.



A systems administrator created a web server for the company and is required to add a tag for the API so end users can connect. Which of the following would the administrator do to complete this requirement?


A.

hostnamectl status --no-ask-password


B.

hostnamectl set-hostname "$(perl -le "print" "A" x 86)"


C.

hostnamectl set-hostname Comptia-WebNode -H root@192.168.2.14


D.

hostnamectl set-hostname Comptia-WebNode --transient





C.
  

hostnamectl set-hostname Comptia-WebNode -H root@192.168.2.14



A Linux engineer set up two local DNS servers (10.10.10.10 and 10.10.10.20) and was testing email connectivity to the local mail server using the mail command on a localmachine when the following error appeared:

Which of the following commands could the engineer use to query the DNS server to get mail server information?


A.

dig @example.com 10.10.10.20 a


B.

dig @10.10.10.20 example.com mx


C.

dig @example.com 10.10.10.20 ptr


D.

dig @10.10.10.20 example.com ns





B.
  

dig @10.10.10.20 example.com mx



Which of the following data structures is written in JSON?

 


A.

Option A


B.

Option B


C.

Option C


D.

Option D





D.
  

Option D



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 user2:accounting script.sh
chmod 750 script.sh


B.

chown user1:accounting script.sh
chmod 777 script.sh


C.

chown accounting:user1 script.sh
chmod 057 script.sh


D.

chown user2:accounting script.sh
chmod u+x script.sh





C.
  

chown accounting:user1 script.sh
chmod 057 script.sh



A systems administrator needs to reconfigure a Linux server to allow persistent IPv4 packet forwarding. Which of the following commands is the correct way to accomplish this task?


A.

echo 1 > /proc/sys/net/ipv4/ipv_forward


B.

sysctl -w net.ipv4.ip_forward=1


C.

firewall-cmd --enable ipv4_forwarding


D.

systemctl start ipv4_forwarding





B.
  

sysctl -w net.ipv4.ip_forward=1




Page 11 out of 31 Pages
Previous