00:15:00

CompTIA Linux+ Practice Test (XK0-005)

Use the form below to configure your CompTIA Linux+ Practice Test (XK0-005). The practice test can be configured to only include certain exam objectives and domains. You can choose between 5-100 questions and set a time limit.

Logo for CompTIA Linux+ XK0-005 (v7)
Questions
Number of questions in the practice test
Free users are limited to 20 questions, upgrade to unlimited
Seconds Per Question
Determines how long you have to finish the practice test
Exam Objectives
Which exam objectives should be included in the practice test

CompTIA Linux+ XK0-005 (v7) Information

CompTIA Linux+ (XK0-005) Exam

The CompTIA Linux+ (XK0-005) certification is designed for IT professionals who work with Linux systems. It validates skills in system administration, security, scripting, and troubleshooting. This certification is vendor-neutral, covering multiple distributions such as Ubuntu, CentOS, and Red Hat.

Exam Overview

The XK0-005 exam consists of a maximum of 90 questions, including multiple-choice and performance-based questions. Candidates have 90 minutes to complete the test. The exam costs $358 USD. A passing score is 720 on a scale of 100 to 900. The certification is valid for three years and can be renewed through CompTIA’s continuing education program.

Exam Content

The XK0-005 exam focuses on five main domains: system management, security, scripting and automation, troubleshooting, and Linux fundamentals. System management includes package management, system monitoring, and user administration. Security covers permissions, authentication, and encryption. Scripting and automation focus on Bash scripting and task automation. Troubleshooting tests problem-solving skills for system failures and performance issues. Linux fundamentals include file system hierarchy, networking, and command-line operations.

Who Should Take This Exam?

The CompTIA Linux+ certification is ideal for system administrators, Linux support technicians, and DevOps professionals. It is recommended for individuals with at least one year of Linux experience. This certification is beneficial for IT professionals working with servers, cloud infrastructure, and cybersecurity.

How to Prepare

Candidates should review the official CompTIA Linux+ Exam Objectives and study materials provided by CompTIA. Hands-on experience with Linux systems is essential. Practice exams can help assess readiness and identify weak areas. Using Linux in a lab or virtual environment can provide practical experience with commands, system configuration, and troubleshooting.

Summary

The CompTIA Linux+ (XK0-005) certification is a valuable credential for IT professionals working with Linux systems. It validates essential skills in system administration, security, and automation. This certification is ideal for those managing Linux-based environments in IT infrastructure, cybersecurity, and cloud computing.

Free CompTIA Linux+ XK0-005 (v7) Practice Test

Press start when you are ready, or press Change to modify any settings for the practice test.

  • Questions: 15
  • Time: Unlimited
  • Included Topics:
    System Management
    Security
    Scripting, Containers, and Automation
    Troubleshooting
Question 1 of 15

Which command utility can be used to search for and replace patterns within a file, and it requires no additional scripting or programming?

  • tail

  • awk

  • sed

  • grep

Question 2 of 15

An administrator has discovered that a newly deployed web application cannot write to the /var/www/html/reports directory on a SELinux-enabled system, despite the directory having write permissions set for the proper user and group. Which of the following commands should the administrator use to diagnose the issue related to SELinux context permissions?

  • ps auxZ

  • getsebool -a

  • sestatus

  • ls -Z /var/www/html/reports

Question 3 of 15

What characteristic distinguishes a stateful firewall from its stateless counterpart in the context of network traffic?

  • Creates dynamic rules for each new connection

  • Operates at a higher performance level

  • Monitors and maintains the state of active connections

  • Filters traffic solely based on static rules

Question 4 of 15

A system administrator needs to obtain information about which server versions are running on open ports of a remote host. However, the administrator must avoid performing an intrusive scan that could disrupt network services. Which of the following commands should the administrator run to best meet these requirements?

  • nmap -A target_host

  • nmap -sT --top-ports=10 target_host

  • nmap --top-ports=100 -sV target_host

  • nmap -sV --version-light target_host

Question 5 of 15

What operation should be periodically performed on a solid-state storage device to indicate which sectors are no longer in use?

  • Running a defragmentation program

  • Performing a surface scan

  • Conducting a sector-by-sector backup

  • Increasing the partition size

  • Executing a trim command

Question 6 of 15

A custom service runs a preparation script in ExecStart and a cleanup script in ExecStop. The preparation script exits with status code 2, so systemd marks the service as failed and skips cleanup on stop. Which setting added to the unit file will treat exit code 2 as normal and permit the cleanup script to run?

  • Restart=on-failure

  • Type=forking

  • SuccessExitStatus=2

  • ValidExitCodes=*

Question 7 of 15

A Linux user is unable to write to a file named 'report.txt' located in a directory they own. Which of the following commands should the system administrator use to BEST resolve this issue?

  • chmod a+wx report.txt

  • chown :usergroup report.txt

  • chmod u+w report.txt

  • chmod 777 report.txt

Question 8 of 15

A Linux administrator is deploying an application on Kubernetes and needs to ensure that two containers (a web server and a caching service) share the same network and storage resources. Which of the following is the BEST option to achieve this requirement?

  • Launch separate pods for each container and use a service to link them

  • Use a DaemonSet to ensure that both containers run on each node in the cluster

  • Create a new Kubernetes service to facilitate communication between two standalone pods

  • Deploy both containers within a single pod

Question 9 of 15

A company is planning to streamline their employee's access to multiple internal and external web applications to improve productivity and security. They want their employees to only log in once each day and gain access to all authorized resources without the need to sign in multiple times. Which solution should be implemented to achieve this requirement?

  • Implement Pluggable Authentication Modules (PAM) on all servers

  • Distribute SSH keys to all users

  • Establish centralized user management

  • Implement an SSO solution

Question 10 of 15

An organization requires a data storage solution using multiple disks. The solution must ensure continuous data availability even if two disks fail concurrently. Which configuration should be utilized to fulfill this requirement?

  • Striped set without redundancy

  • Mirrored set across two or more disks without parity

  • Striped mirrors with single-level parity

  • Dual parity configuration (capable of handling two simultaneous disk failures)

Question 11 of 15

A system administrator needs to create a compressed backup of the /var/log directory. Which command should they use to create a gzip-compressed archive file named log_backup.tar.gz?

  • tar -xvf log_backup.tar.gz /var/log

  • tar -tzvf log_backup.tar.gz /var/log

  • tar -cvf log_backup.tar.gz /var/log

  • tar -czvf log_backup.tar.gz /var/log

Question 12 of 15

A system administrator compiles a custom version of an essential shared library required by commands in /bin and /sbin. After installation, those commands fail to run before the root filesystem is fully mounted. Which directory should the administrator install the new library in to make it available during early boot?

  • /usr/local/lib

  • /lib

  • /usr/lib

  • /lib64

Question 13 of 15

A system administrator has been alerted to slow performance on a virtualized Linux server. After checking various system metrics, the administrator finds that a significant amount of processor time is categorized under 'st' when inspecting resource usage with monitoring tools. What does this category represent?

  • The period during which the system is idle and waiting for user interaction

  • Duration dedicated to running the kernel and its associated processes

  • Time allocated by the hypervisor to other virtual processors

  • Time reserved for low-priority background tasks within the system

  • This is the time spent performing calculations for user-initiated processes

  • Time spent processing input/output operations waiting for external devices

Question 14 of 15

In the scenario where a Linux system has multiple services running, which of the following actions is the BEST practice to secure the corresponding service accounts?

  • Configuring PAM modules to limit the access times for service accounts.

  • Changing the default shell of the service accounts to /bin/nologin.

  • Setting a strong, unique password for each service account.

  • Changing the home directory permissions of service accounts to 700.

Question 15 of 15

A directory named 'data_backup' contains multiple files and subdirectories. How would an administrator remove the entire directory and its contents without being prompted for each file or directory?

  • rm data_backup

  • rmdir data_backup

  • rm -rf data_backup

  • rm -i data_backup