CompTIA Linux+ (XK0-006) · Difficulty

Hard XK0-006 practice questions

Challenge — multi-step scenarios, trade-offs, and subtle distinctions. 6 hard questions available — no sign-up, always free.

Question 1 of 6

An Ansible playbook installs several packages using a loop and registers the output. A teammate wants a subsequent task to print the name of each package that was actually installed (changed), skipping packages that were already present. Which construct correctly iterates over the registered results to access per-item status?

Reviewed for accuracy · Report an issue
Question 2 of 6

After a kernel update, a RHEL 9 server fails to boot. The console displays a kernel panic with the message: 'VFS: Unable to mount root fs on unknown-block(0,0)'. You boot into the previous working kernel entry from the GRUB menu, and the system starts normally. Comparing /boot, you notice the initramfs file for the new kernel is 0 bytes. What is the most appropriate action to fix booting into the new kernel?

Reviewed for accuracy · Report an issue
Question 3 of 6

A monitoring alert reports that a database server has a load average of 24.0 on an 8-core system, yet top shows CPU usage is only about 15% with over 80% idle. Users report the application feels extremely sluggish. What is the MOST likely cause of the high load average?

Reviewed for accuracy · Report an issue
Question 4 of 6

Users on a Linux workstation report that opening internal web applications by hostname takes 5-10 seconds before loading, while accessing the same sites by IP address is instant. Running 'dig +short intranet.corp.local' against the configured DNS server returns the correct record in under 20 ms. Which action is MOST likely to resolve the delay?

Reviewed for accuracy · Report an issue
Question 5 of 6

A server has an ext4 filesystem on the logical volume /dev/vg0/data currently mounted at /data. You need to shrink this logical volume from 200 GB to 120 GB to free space in the volume group for another LV. The filesystem currently uses about 80 GB. Which sequence correctly and safely reduces the logical volume without data loss?

Reviewed for accuracy · Report an issue
Question 6 of 6

A Linux administrator manages a fleet of servers joined to a central LDAP directory using SSSD. Users authenticate correctly, but members of the LDAP group 'dbadmins' report they cannot run privileged commands with sudo, even though a rule exists in /etc/sudoers referencing '%dbadmins'. Running 'id' as one of these users shows their LDAP username but does NOT list the 'dbadmins' group. What is the MOST likely cause?

Reviewed for accuracy · Report an issue