00:15:00

Free CompTIA Linux+ XK0-005 Practice Test

Prepare for the CompTIA Linux+ XK0-005 exam with this free practice test. Randomly generated and customizable, this test allows you to choose the number of questions.

  • Questions: 15
  • Time: 15 minutes (60 seconds per question)
  • Included Objectives:
    • System Management
    • Security
    • Scripting, Containers, and Automation
    • Troubleshooting
Question 1 of 15

A system administrator wants to perform a directory synchronization from a local folder to a remote backup server. The requirement is to ensure that only the differences since the last sync are transferred to minimize network usage. The sync needs to be recursive to include all subdirectories and also preserve file permissions. Which command accomplishes this goal most efficiently?

  • rsync --update /local/directory user@remote:/backup/directory

  • rsync --dry-run /local/directory user@remote:/backup/directory

  • rsync --in-place /local/directory user@remote:/backup/directory

  • rsync -a /local/directory user@remote:/backup/directory

Question 2 of 15

A system administrator suspects that a newly installed network card is not being recognized by the Linux kernel. Which command should be used to verify if the card is detected by the system at the hardware level?

  • lsusb

  • lsmod

  • dmesg | grep -i network

  • lspci

Question 3 of 15

A Linux system administrator notices that despite clearing a substantial amount of data, the 'df' and 'du' commands show significant differences in disk usage reports, and users are unable to create new files. What is the MOST likely cause of this problem?

  • The file system has reached its maximum number of available inodes

  • The '/tmp' directory is full

  • The file system is corrupted

  • Rogue processes are continuously consuming disk space

Question 4 of 15

What are System booleans in the context of Security-enhanced Linux (SELinux)?

  • Policy types defining the level of confinement in SELinux

  • Background processes ensuring SELinux states are maintained

  • Commands used to relabel files with new security contexts

  • Toggle switches that can adjust SELinux policies at runtime

Question 5 of 15

The security policy of your company requires a stealthy scan to minimize the chances of detection by the target system's intrusion detection system (IDS). Which Nmap command would perform a SYN scan, while also spoofing the source port to appear as 53 (DNS) and avoiding port 22 on the target 10.0.0.12?

  • nmap -sS --source-port 53 --excludefile no-scan-22.txt 10.0.0.12

  • nmap -sS -D RND:10 -g 53 10.0.0.12

  • nmap -sT --spoof-port 53 -p-22 10.0.0.12

  • nmap -sS -Pn -g 53 --skip-port 22 10.0.0.12

  • nmap -sS -g 53 --exclude-ports 22 10.0.0.12

  • nmap -sU -g 53 -p !22 10.0.0.12

Question 6 of 15

What is the primary function of the 'resolvectl' command in a Linux system?

  • Manage DNS resolution on the system

  • Monitor network traffic in real time

  • Enable or disable network interfaces

  • Establish a VPN connection

Question 7 of 15

A Linux server is having intermittent problems resolving domain names, which is affecting the ability to access external websites. None of the remote services has reported downtime, and other devices on the same network are not experiencing any issues. What is the BEST step to take to diagnose the issue on the Linux server?

  • Ping the domain name in question to verify if domain name resolution works intermittently.

  • Immediately modify the /etc/resolv.conf file to use different nameservers without doing further investigation.

  • Run dig +trace example.com or nslookup example.com to trace the path of the query from the root name servers downward.

  • Check for a high number of outgoing DNS queries that might indicate a misconfigured service or DNS flood attack.

Question 8 of 15

A system administrator is deploying a multi-container application on a single Docker host. The application includes a web server container that needs to communicate with a database container. Both containers should be isolated from other network traffic on the Docker host. Which Docker network driver should the administrator use to fulfill these requirements?

  • Default bridge

  • Host

  • Overlay

  • Bridge

Question 9 of 15

A systems administrator needs to verify the current rules on a Linux system's firewall, including the numeric handle and specific details such as packet counts and byte counters. Which iptables command will provide this detailed information?

  • iptables -n -v -L

  • iptables -t nat -L

  • iptables -S

  • iptables -L -v

Question 10 of 15

After expanding an existing disk array on a Linux file server, a systems administrator observes reduced performance during write operations. The original configuration consisted of four disks managed by the server's hardware controller, and a fifth disk was introduced to enhance storage capacity. What is the most probable cause of the observed decrease in write operation speed following the expansion?

  • Suboptimal cable quality is causing a bottleneck in data transfer between the controller and the disks.

  • The recent disk added to the server is defective, causing a delay in the array's ability to write data effectively.

  • The overhead of parity calculations is higher now with the additional disk, slowing down the overall write performance.

  • The block size of the array is not properly configured for the number of disks, leading to inefficient write operations.

Question 11 of 15

Which command will permanently mount a filesystem at boot by adding an entry to a specific configuration file?

  • Edit /etc/fstab

  • Use mount --permanent

  • Execute systemctl enable mount

  • Use fstab --add-entry

Question 12 of 15

A system administrator notices that a Linux server is experiencing slow performance, specifically in disk operations. Upon investigating, the administrator discovered that the I/O wait time is considerably high. Which of the following actions is the BEST course of action to reduce the high latency affecting the system?

  • Decrease the amount of RAM in the system to reduce the memory available for disk caching.

  • Increase the CPU clock speed to process I/O operations faster.

  • Replace the current I/O scheduler with one that is better optimized for the system's workload.

  • Deploy additional network interfaces to balance the I/O load.

Question 13 of 15

A system administrator needs to find occurrences of the word 'refused' in the 'auth.log' file, which indicates failed SSH login attempts, and then count how many times this occurs. Which command will provide the accurate count?

  • grep -c 'refused' /var/log/auth.log

  • grep -v 'refused' /var/log/auth.log | wc -l

  • grep 'refused' /var/log/auth.log -c

  • grep 'refused' /var/log/auth.log | wc -l

Question 14 of 15

A Linux administrator is troubleshooting a file system mounted as /dev/sdb1 at /data that seems to be causing issues when users attempt to execute scripts stored there. The device is known to only store data files and should not contain any executable code. To enhance security, the administrator had previously set specific mount options for this file system. Which mount option might the administrator have set to cause this behavior, and should now be reviewed or removed to allow script execution?

  • defaults

  • sync

  • nodev

  • noexec

  • nosuid

Question 15 of 15

A system administrator needs to verify the active firewall rules on a Linux server to ensure compliance with the company's security policies. Which of the following commands provides the most comprehensive output of the currently active firewall rules?

  • iptables --state

  • iptables -L -v -n

  • iptables -S

  • iptables -L