CompTIA · XK0-006
CompTIA Linux+ validates the skills of IT professionals to configure, manage, and troubleshoot Linux systems used in cloud, cybersecurity, and enterprise environments. It covers system administration, scripting, automation, security hardening, and container management.
Practice Questions
699
≈ 7 practice exams
Duration
90 minutes
Passing Score
720/900
Difficulty
AssociateLast Updated
Mar 2026
Use this XK0-006 practice exam to prepare for CompTIA Linux+ (XK0-006) with realistic questions, detailed explanations, and focused study modes. The practice bank includes 699 questions for CompTIA XK0-006, so you can review the exam steadily instead of relying on one long cram session.
As you practice, pay extra attention to recurring topics such as System Configuration and Management, Storage and Device Management, Network Configuration, Shell Scripting and Automation, and Security and OS Hardening. Start with short sessions to identify weak areas, then move into timed quizzes once your accuracy is consistent.
The explanations are especially useful when you want to connect exam wording to the responsibilities and scenarios described in the official certification guidance. Use the free preview first, then unlock the full question bank when you are ready to build a complete study routine.
CompTIA Linux+ (XK0-006) validates the advanced skills of IT professionals to configure, manage, operate, and troubleshoot Linux systems in enterprise, cloud, and cybersecurity environments. This Associate-level certification demonstrates competency across system administration, storage and network configuration, security hardening, shell scripting, containerization, and troubleshooting. The exam emphasizes practical, hands-on knowledge required for modern Linux environments including hybrid cloud deployments, containerized applications, and enterprise security implementations. Successfully obtaining this certification indicates proficiency in automating tasks, implementing security best practices, and managing complex Linux infrastructure at scale.
CompTIA Linux+ is designed for IT professionals with foundational Linux experience seeking to advance into system administration, cloud infrastructure, or DevOps roles. Ideal candidates include junior Linux system administrators, junior cloud engineers, junior DevOps engineers, systems engineers, and network engineers managing Linux-based infrastructure. This certification appeals to those with 12 months of hands-on Linux server experience or equivalent knowledge from CompTIA A+, Network+, or Server+ certification. Career paths include Linux systems administrator, cloud infrastructure engineer, cybersecurity operations roles, and site reliability engineer positions.
Recommended prerequisites include 12 months of hands-on experience managing Linux servers in production or lab environments. While not mandatory, CompTIA strongly recommends foundational IT knowledge equivalent to CompTIA A+, Network+, or Server+ certifications. Candidates should be comfortable with command-line interfaces, basic system administration tasks, file permissions, networking concepts, and troubleshooting methodologies. Linux experience can be gained through home labs, free Linux distributions (Ubuntu, CentOS, Red Hat), or entry-level support roles. A solid understanding of basic networking, storage concepts, and security principles is beneficial.
The CompTIA Linux+ (XK0-006) exam consists of a maximum of 90 scored questions combining multiple-choice and performance-based (hands-on) questions. The exam is delivered online or at testing centers and must be completed within 90 minutes. The scoring scale ranges from 100 to 900, with a passing score of 720 required. Performance-based questions require candidates to demonstrate practical Linux skills in simulated environments. The exam launched July 15, 2025, and is ISO/IEC accredited by ANSI.
CompTIA Linux+ opens doors to well-compensated roles in high-demand areas of IT. Professionals with this certification earn between $68,000 and $120,000+ annually, with average salaries around $89,000–$91,000 in the United States; experienced professionals in senior roles can exceed six figures. The certification is particularly valuable given the industry shift toward cloud computing and containerization, where Linux expertise is essential. Linux+ validates competency across critical infrastructure technologies, making certified professionals significantly more marketable than non-certified peers. Career advancement opportunities include progression to senior systems administrator, infrastructure architect, cloud engineer, or DevOps engineer roles, with steady salary growth potential as experience accumulates.
5 sample questions with answers and explanations. The full bank has 699 questions, enough for 7 full-length practice exams.
Preview — answers shown1. A systems administrator at Northwind Traders is setting up centralized authentication for multiple Linux servers. The requirement is to allow users to authenticate using credentials stored in Active Directory, cache those credentials for offline login when the domain controller is unreachable, and apply group policy-like restrictions. Which service should be configured on each Linux server? (Select one!)
Explanation
SSSD (System Security Services Daemon) is the modern standard for integrating Linux systems with Active Directory. SSSD acts as a central broker between the operating system and identity/authentication providers including Active Directory, LDAP, and Kerberos. It supports credential caching for offline login, which is critical when domain controllers are temporarily unreachable. The 'realm join' command simplifies joining a Linux system to an Active Directory domain and configures SSSD automatically. SSSD integrates with PAM and NSS, enabling AD users to log in and be recognized by system tools. pam_unix with /etc/shadow is for local users only and cannot integrate with Active Directory. A direct OpenLDAP client configuration using /etc/nsswitch.conf provides name lookup but lacks credential caching for offline access and does not natively handle Kerberos ticket exchange. NIS is a legacy protocol that is not compatible with Active Directory and has significant security weaknesses.
2. A systems administrator at Contoso needs to configure persistent kernel parameters to increase the maximum number of open file descriptors system-wide and enable IP forwarding. The changes must survive reboots. Which file should the administrator modify to make these changes persistent, and which command applies them immediately without rebooting? (Select two!)
Multiple correct answersExplanation
To persist kernel parameters, the administrator should modify /etc/sysctl.conf or create a drop-in file in /etc/sysctl.d/ with a .conf extension. Writing directly to /proc/sys/ files applies changes immediately but they are lost on reboot because /proc is a virtual filesystem. The command sysctl --system applies all drop-in configuration files from /etc/sysctl.d/, /run/sysctl.d/, and /usr/lib/sysctl.d/, as well as /etc/sysctl.conf, making it the correct command to apply all persistent configurations without rebooting. The command sysctl -p only reads /etc/sysctl.conf by default and does not process /etc/sysctl.d/ drop-in files. Modifying /etc/security/limits.conf affects per-user resource limits managed by PAM, not kernel-level parameters like ip_forward.
3. A systems administrator at Contoso is setting up an Ansible playbook to deploy a web application. The playbook needs to install the nginx package, copy a configuration template, restart nginx if the configuration changes, and ensure nginx is running and enabled at boot. Which Ansible feature ensures nginx is only restarted when the configuration actually changes, rather than on every playbook run? (Select one!)
Explanation
Ansible's notify and handler mechanism is specifically designed for this use case. A task (such as copying a configuration template) can notify a named handler. The handler only executes if the notifying task reports a changed status — meaning the file actually changed. If the template content is identical to the existing file, no change is reported and the handler does not run. This prevents unnecessary restarts. Using a when conditional on the restart task would require manually tracking state and is not idiomatic Ansible. Using register and checking changed status manually is more verbose and error-prone than the notify/handler pattern. Setting the service task with state=restarted unconditionally would restart nginx on every playbook run regardless of whether the configuration changed, causing unnecessary service interruptions.
4. A systems administrator at Northwind Traders needs to implement a Git branching workflow where feature branches are developed independently and merged into main with a single clean commit summarizing all changes, preserving a linear history without merge commits. Which Git strategy should they use and how should they complete the merge? (Select one!)
Explanation
A squash merge combines all commits from the feature branch into a single new commit on the target branch. The git merge --squash feature-branch command stages all changes from the feature branch but does not automatically create a commit, so a subsequent git commit is required to create the single summary commit. This produces a linear history without merge commits while consolidating multiple development commits (including work-in-progress messages like 'fix typo' or 'WIP') into one meaningful commit. The result is a clean main branch history where each feature appears as a single atomic commit. Using git merge --no-ff explicitly creates a merge commit, which is the opposite of the desired linear history. Running git rebase feature-branch from main replays the main branch's commits on top of the feature branch, which is not the correct rebase direction and would complicate the workflow. Cherry-pick selectively copies individual commits and is used for specific scenarios rather than complete feature integration, and would require picking each commit individually.
5. A systems administrator at Contoso Ltd. needs to extend a logical volume named 'datalv' in volume group 'datavg' by 10 gigabytes and automatically resize the XFS filesystem it contains. Which command accomplishes this task? (Select one!)
Explanation
The lvextend command with the -r flag (resize) automatically resizes the filesystem after extending the logical volume, combining both operations in a single command. This works for XFS filesystems and is the most efficient approach. The first option attempts to use xfs_growfs with a device path instead of a mount point, which is incorrect since xfs_growfs requires the filesystem mount point, not the device path. The third option uses resize2fs which is for ext4 filesystems, not XFS. The fourth option incorrectly mixes vgextend syntax with lvextend options; vgextend adds physical volumes to a volume group, not extends logical volumes.
$17.99
One-time access to this exam