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

A Linux administrator needs to ensure that a web-based application service does not start until after the graphical interface has been loaded. Which directive should the administrator use within the service's unit file to enforce this dependency?

  • Wants=graphical.target

  • Requires=graphical.target

  • BindsTo=graphical.target

  • After=graphical.target

Question 2 of 15

You have been working on a new feature in a separate branch called 'feature-xyz' of your project's repository. After completing the work on your feature, you want to integrate it into the main codebase. What is the next step to request the integration of your changes into the 'main' branch, ensuring that your peers can review it before it is merged?

  • Push the changes from your 'feature-xyz' branch directly to the 'main' branch without a pull request.

  • Commit the changes in your 'feature-xyz' branch and notify your team that the feature is complete.

  • Create a pull request in the repository, comparing your 'feature-xyz' branch to the 'main' branch.

  • Tag the latest commit in your 'feature-xyz' branch and ask your team to review the tag.

Question 3 of 15

An administrator in your organization is concerned about performance issues and believes that Security-Enhanced Linux (SELinux) may be impacting the system's performance negatively. The admin has decided to completely disable SELinux to test this theory. After changing the SELinux mode to 'disabled' and rebooting the system, what long-term security implications should the administrator be made aware of?

  • The system performance will improve without any negative security implications since file permissions and ACLs continue to protect the system.

  • SELinux will automatically re-enable after an update, minimizing long-term security risks.

  • SELinux can be re-enabled without rebooting, thus no long-term security implications exist.

  • The system will rely solely on traditional Unix/Linux permissions, leading to potential security vulnerabilities.

Question 4 of 15

A monitoring service unit omits a Type line. Its executable launches a secondary task and then exits, yet the task continues running. After start, systemctl status reports failure, even though the task remains active. What addition to the [Service] section allows systemd to track the actual running process?

  • Add PIDFile=/run/monitor.pid

  • Add Type=notify

  • Add Type=forking

  • Add RemainAfterExit=yes

Question 5 of 15

If a system administrator wants to update the GRUB2 boot loader on a system that uses BIOS, which command should be used to ensure GRUB2 is properly installed onto the Master Boot Record (MBR)?

  • grub2-update

  • grub2-mkconfig -o /boot/grub2/grub.cfg

  • update-grub

  • grub2-install /dev/sda

Question 6 of 15

Which invocation will display the free capacity of the /var filesystem strictly in gigabyte units?

  • -m /var

  • -BG /var

  • --si /var

  • -h /var

Question 7 of 15

During resource-intensive operations, a Linux system administrator needs to ensure that a new statistical analysis application doesn't consume excessive CPU resources, potentially impacting the performance of other critical services. Which of the following commands will start the new application with a reduced CPU priority?

  • renice -n 10 -p /path/to/stat_analysis_app

  • adjust -n 10 /path/to/stat_analysis_app

  • nice -n 10 /path/to/stat_analysis_app

  • priority -10 /path/to/stat_analysis_app

Question 8 of 15

Using the groupadd command with the -r option creates a system group.

  • False

  • True

Question 9 of 15

Which of the following commands is used to check and repair filesystem errors on a Linux system?

  • chown

  • fsck

  • dd

  • fdisk

  • chmod

  • mkfs

Question 10 of 15

A system administrator has noticed SELinux is preventing a web application from functioning properly on a production server running the 'targeted' policy. The administrator wants to temporarily relax SELinux enforcement to diagnose the issue without entirely disabling SELinux or making permanent policy changes. Which command should the administrator use to fulfill this requirement?

  • enforce 0

  • setenforce Disabled

  • setenforce 0

  • setsebool -P

  • setenforce enforcing

Question 11 of 15

A Linux administrator is configuring a system to make sure that any user attempting to access a certain service should present two different forms of identification. Which of the following authentication methods should the administrator configure?

  • Tokens

  • Pluggable authentication modules (PAM)

  • Multifactor authentication (MFA)

  • System Security Services Daemon (SSSD)

Question 12 of 15

What command would be used to perform a basic scan of a target system's open ports using Nmap?

  • nmap --top-ports 10

  • nmap -A

  • nmap

  • nmap -sV

Question 13 of 15

When administering a system, which command would you use to load a kernel module for immediate use without reflecting on module dependencies or its configuration?

  • modinfo

  • modprobe

  • lsmod

  • insmod

Question 14 of 15

Which command should be used to verify that the rules currently loaded into the kernel's packet filter are allowing inbound SSH traffic on port 22?

  • iptables -L

  • ifconfig

  • netstat -tuln

  • nmap -p 22 localhost

Question 15 of 15

A systems administrator notices that a user who was recently added as a member of the 'data-analysts' group cannot modify files in the 'analytics_reports' directory. The directory permissions are set to drwxrwx---. The user and group ownerships are 'datamgr' and 'data-analysts' respectively. The administrator has verified that the user is indeed a member of the 'data-analysts' group. What should the administrator investigate as the most likely cause of this issue?

  • There is full disk space, preventing any changes to files

  • There are file-specific ACLs that override group permissions and prevent modifications

  • The filesystem for the 'analytics_reports' directory is mounted as read-only

  • The user has not logged out and back in since being added to the group