πŸ”

XK0-005 β€” questions

Page 13 of 14 Β· 263 total questions.

Topic 1 Β· Question 244 Β· Select all that apply

A Linux administrator is trying to start the database service on a Linux server but is not able to run it. The administrator executes a few commands and receives the following output: Which of the following should the administrator run to resolve this issue? (Choose two.)

Exhibit 1 for question 244
  • Asystemctl unmask mariadb (correct answer)
  • Bjournalctl -g mariadb
  • Cdnf reinstall mariadb
  • Dsystemctl start mariadb (correct answer)
  • Echkconfig mariadb on
  • Fservice mariadb reload
Reveal answer & explanation
Correct answer: A, D

The correct answer is A, D. Option A: systemctl unmask mariadb Option D: systemctl start mariadb

Topic 1 Β· Question 245

An administrator would like to list all current containers, regardless of their running state. Which of the following commands would allow the administrator to accomplish this task?

  • Adocker ps -a (correct answer)
  • Bdocker list
  • Cdocker image ls
  • Ddocker inspect image
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: docker ps -a

Topic 1 Β· Question 246

Which of the following should be used to verify the integrity of a file?

  • Asha256sum (correct answer)
  • Bfsck
  • Cgpg -d
  • Dhashcat
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: sha256sum

Topic 1 Β· Question 247

An administrator runs ping comptia. org. The result of the command is: ping: comptia.org: Name or service not known Which of the following files should the administrator verify?

  • A/etc/ethers
  • B/etc/services
  • C/etc/resolv.conf (correct answer)
  • D/etc/sysctl.conf
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: /etc/resolv.conf

Topic 1 Β· Question 248

A new application container was built with an incorrect version number. Which of the following commands should be used to rename the image to match the correct version 2.1.2?

  • Adocker tag comptia/app:2.1.1 comptia/app:2.1.2 (correct answer)
  • Bdocker push comptia/app:2.1.1 comptia/app:2.1.2
  • Cdocker rmi comptia/app:2.1.1 comptia/app:2.1.2
  • Ddocker update comptia/app:2.1.1 comptia/app:2.1.2
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: docker tag comptia/app:2.1.1 comptia/app:2.1.2

Topic 1 Β· Question 249

Which of the following is the best tool for dynamic tuning of kernel parameters?

  • Atuned (correct answer)
  • Btune2fs
  • Ctuned-adm
  • Dturbostat
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: tuned

Topic 1 Β· Question 250

A network administrator issues the dig www.comptia.org command and receives an NXDOMAIN response. Which of the following files should the administrator check first?

  • A/etc/resolv.conf (correct answer)
  • B/etc/hosts
  • C/etc/sysconfig/network-scripts
  • D/etc/nsswitch.conf
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: /etc/resolv.conf

Topic 1 Β· Question 251

An administrator attempts to connect to a remote server by running the following command: Which of the following can be said about the remote server?

Exhibit 1 for question 251
  • AA firewall is blocking access to the SSH server. (correct answer)
  • BThe SSH server is not running on the remote server.
  • CThe remote SSH server is using SSH protocol version 1.
  • DThe SSH host key on the remote server has expired.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: A firewall is blocking access to the SSH server.

Explanation

A firewall enforces traffic policy by permitting or blocking connections based on configured rules.

Topic 1 Β· Question 252

A Linux administrator would like to run the cleanup script /home/admin/script.sh at 9:00 p.m. on March 31. Which of the following commands should the administrator use to accomplish this task?

  • Aat –f /home/admin/script.sh 9pm March 31 (correct answer)
  • Becho < /home/admin/script.sh | at 9pm March 31
  • Cat 9pm March 31 | echo > /home/admin/script.sh
  • Dat 9pm March 31 –f /home/admin/script.sh
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: at –f /home/admin/script.sh 9pm March 31

Topic 1 Β· Question 253

Which of the following will prevent non-root SSH access to a Linux server?

  • ACreating the /etc/nologin file
  • BCreating the /etc/nologin.allow file containing only a single line root
  • CCreating the /etc/nologin/login.deny file containing a single line +all
  • DEnsuring that /etc/pam.d/sshd includes account sufficient pam_nologin.so (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Ensuring that /etc/pam.d/sshd includes account sufficient pam_nologin.so

Topic 1 Β· Question 254

A Linux administrator needs to determine if prerequisites are met. One of the application requirements is to install Perl on a system. Which of the following commands would accomplish this task?

  • Arpm –Uf perl
  • Brpm –iv perl (correct answer)
  • Crpm –qa perl
  • Drpm –eh perl
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: rpm –iv perl

Topic 1 Β· Question 255

After connecting to a remote host via SSH, an administrator attempts to run an application but receives the following error: [user@worksration ~]$ ssh admin@srv1 Last login: Tue Mar 29 18:03:34 2022 [admin@srv1 ~] $ /usr/local/bin/config_manager Error: cannot open display: [admin@srv1 ~] $ Which of the following should the administrator do to resolve this error?

  • ADisconnect from the SSH session and reconnect using the ssh -x command.
  • BAdd Options X11 to the /home/admin/ .ssh/authorized_keys file.
  • COpen port 6000 on the workstation and restart the firewalld service.
  • DEnable X11 forwarding in /etc/ssh/ssh_config and restart the server. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Enable X11 forwarding in /etc/ssh/ssh_config and restart the server.

Topic 1 Β· Question 256

A systems administrator created a new directory with specific permissions. Given the following output: # file: comptia # owner: root * group: root user::rwx group::r-x other::--- default:user::rwx default:group::r-x default:group:wheel:rwx default:mask::rwx default:other::--- Which of the following permissions are enforced on /comptia?

  • AMembers of the wheel group can read files in /comptia. (correct answer)
  • BNewly created files in /comptia will have the sticky bit set.
  • COther users can create files in /comptia.
  • DOnly root can create flies in /comptia.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Members of the wheel group can read files in /comptia.

Topic 1 Β· Question 257

A systems administrator is customizing a new Linux server. Which of the following settings for umask would ensure that new files have the default permissions: -rw-r-----?

  • A0017
  • B0027 (correct answer)
  • C0038
  • D0640
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: 0027

Topic 1 Β· Question 258 Β· Select all that apply

A Linux administrator is implementing a stateful firewall on the Linux server. Which of the following iptables options will be required to build the stateful rules? (Choose two.)

  • A--name ESTABLISHED
  • B-m recent
  • C-m conntrack (correct answer)
  • D--cstate
  • E--remove
  • F-j DROP (correct answer)
Reveal answer & explanation
Correct answer: C, F

The correct answer is C, F. Option C: -m conntrack Option F: -j DROP

Topic 1 Β· Question 259

A systems administrator receives the following errors via email from the system log: XFS (lcop0): Metadata CRC error detected at xfs_agi_read_verify+0xcb/Oxfe XFS (loop0): First 12@ bytes of corrupted metadata buffer XFS (loop0): metadata I/O error in "xfs_trans_read_buf_map" at daddr 0x2 len 1 error 74 A few minutes later, the administrator starts receiving reports that some of the images in the company’s website are not loading properly. The systems administrator runs some commands and receives the following outputs: Output 1: Output 2: DocumentRoot "/var/www/html" Output 3: Which of the following would be the appropriate steps to take to solve this issue?

Exhibit 1 for question 259Exhibit 2 for question 259
  • Asystemctl stop httpd umount /dev/sdb1 xfs_repair /dev/sdb1 mount /dev/sdb1 /var/www/html systemctl start httpd (correct answer)
  • Bumount /dev/sdb1 xfs_repair /dev/sdb1 xfs_metadump /dev/sdb1 mount /dev/sdb1 /var/www/html systemctl restart httpd
  • Cumount /dev/sdb1 systemctl stop httpd xfs_metadump /dev/sdb1 mount /dev/sdb1 /var/www/html systemctl start httpd
  • Dsystemctl stop httpd xfs_check -L /dev/sdb umount /var/www/html systemctl start httpd
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: systemctl stop httpd umount /dev/sdb1 xfs_repair /dev/sdb1 mount /dev/sdb1 /var/www/html systemctl start httpd This option decouples the components so they scale independently and absorb load spikes.

Topic 1 Β· Question 260

A systems administrator wants to ensure all the latest patches and updates are automatically synced to the local repository every two hours on Sundays through Tuesdays in the month of May. Which of the following cron entries can the administrator use to achieve this goal? (Choose two.)

  • A0 */2 * 5 0-3 /root/update-from-remote-to-local.sh
  • B0 0,2,4,6,8,10,12,14 * 5 0-3 /root/update-from-remote-to-local.sh
  • C0 0,2,4,6,8,10,12,14 * 5 0-2 /root/update-from-remote-to-local.sh
  • D0 0-23/2 * 5 0-3 /root/update-from-remote-to-local.sh
  • E0 0-23/2 * 5 0-2 /root/update-from-remote-to-local.sh (correct answer)
  • F0 */2 * 5 0-2 /root/update-from-remote-to-local.sh
Reveal answer & explanation
Correct answer: E

The correct answer is E. Option E: 0 0-23/2 * 5 0-2 /root/update-from-remote-to-local.sh

Topic 1 Β· Question 261

A diagnostic tool reports a β€œhost seems down” event for a server with an IP address of 192.168.47.44. Which of the following commands should the administrator use to confirm the host down event?

  • Anmap 192.168.47.0/32
  • Bnetcat 192.168.47.44
  • Cnmap 192.168.47.44 -Pn
  • Dping -c 1 192.168.47.44 (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: ping -c 1 192.168.47.44

Topic 1 Β· Question 262

A Linux engineer receives the following notification from a system: cp: cannot create regular file '/app/appdata.tar': No space left on device The engineer obtains the following output: Which of the following describes the state of the filesystem based on this output?

Exhibit 1 for question 262
  • AThe filesystem was mounted in read-only mode.
  • BThe filesystem has depleted the available modes. (correct answer)
  • CThe filesystem is not mounted in the correct location.
  • DThe filesystem has consumed the available space.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: The filesystem has depleted the available modes.

Topic 1 Β· Question 263

A DevOps engineer wants to work on a snapshot of the infrastructure as code configuration. Which of the following commands should the engineer use to accomplish this task?

  • Agit pull
  • Bgit push
  • Cgit branch
  • Dgit tag (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: git tag

Explanation

Git provides distributed source control with branching, history, and collaborative change tracking.

Showing questions 241–260 of 263 Β· Page 13 of 14