EnglishDeutschFrançaisEspañolPortuguês

CompTIA · COMPTIA-LINUX · Intermediate

CompTIA Linux+ — Practice Questions and Mock Exam

CompTIA Linux+ (XK0-006) validates the skills required to configure, manage, operate, and troubleshoot Linux environments.

90Questions per Pass-IT mock exam
90minPass-IT mock exam time limit

Official COMPTIA-LINUX exam: 720 out of 900 points to pass.

Checked against CompTIA · August 2026 · Current exam version

See what learning with Pass-IT is like.

Answer a COMPTIA-LINUX sample question and read the explanation with its source. Right here, with no sign-up.

Troubleshooting2 / 5

An administrator configures an Apache virtual host but the site returns the default page instead of the custom site. The configuration file is in /etc/httpd/conf.d/mysite.conf. What is the most likely troubleshooting step?

AlexFull explanation from Alex

Apache name-based virtual hosting routes requests using the HTTP Host header matched against ServerName and ServerAlias directives. When the default page appears, the virtual host is not matching. Common causes: ServerName mismatch (www.example.com vs example.com), config file not loaded, or syntax errors. Debug with 'apachectl -S' to list all parsed virtual hosts and source files. After fixes, validate with 'apachectl configtest' and reload with 'systemctl reload httpd'. On Debian, enable sites with a2ensite. Why distractors fail: Firewall blocking port 80 causes connection refused, not a default page. Reinstalling Apache is destructive and unnecessary. Incorrect DNS prevents reaching the server entirely. Ref: Apache httpd docs mod_core ServerName, httpd.apache.org/docs/2.4/vhosts/

Sourcehttpd.apache.org

Automation, Orchestration, and Scripting3 / 5

In an Ansible playbook, which directive ensures a task runs with root privileges on the target host?

AlexFull explanation from Alex

The 'become: true' directive enables privilege escalation on the target host (docs.ansible.com — Understanding Privilege Escalation). When set, Ansible uses sudo (default method) to run the task as root (default become_user). Distractor analysis: 'sudo: yes' was deprecated in Ansible 1.9 and removed in 2.0 — no longer valid syntax. 'escalate: true' and 'privilege: root' are fabricated directives with no Ansible equivalent. Related directives: become_user (target user), become_method (sudo/su/pbrun/doas), become_flags (extra arguments). Can be applied at play, block, task, or role level and overridden via CLI with --become/-b. CompTIA Linux+ objective: Automation with configuration management tools. Refs: Ansible docs — Privilege Escalation.

Sourcedocs.ansible.com

System Management5 / 5

An administrator needs to configure a multi-path I/O (MPIO) setup for a SAN-connected server with two HBA ports providing redundant paths to a LUN. Which service and configuration file manage this on RHEL?

AlexFull explanation from Alex

Device Mapper Multipath (DM-MPIO) manages redundant physical paths to SAN LUNs. The multipathd daemon monitors path health and handles automatic failover; configuration lives in /etc/multipath.conf (Red Hat RHEL 8 DM Multipath Guide). It creates /dev/mapper/mpathX devices that applications use instead of raw paths. 'multipath -ll' shows topology including active, standby, and failed paths. Why distractors fail: iSCSI (iscsid.conf) provides the transport layer but does not manage multiple paths to the same LUN. mdadm manages software RAID across different disks, not redundant paths to one LUN. LVM provides logical volume management on top of block devices, not path redundancy. Ref: Red Hat RHEL 8 DM Multipath Guide, man multipathd(8), man multipath.conf(5)

Sourcedocs.redhat.com

How to prepare for COMPTIA-LINUX with Pass-IT.

Currently 321 practice questions for COMPTIA-LINUX, with new ones added regularly. Focus on what you still need to learn.

Get past difficult questions.

Understand why an answer is correct. Alex explains the concepts and answers your follow-up questions so you can apply what you learn to the next task.

Meet Alex →

Conversation preview · COMPTIA-LINUX

Apache serves the wrong site

  1. You

    Why do I see the default page instead of my virtual host?

  2. Alex · AI tutor

    Check whether the request’s Host name matches the configured ServerName or ServerAlias.

    Read the documentation ↗
  3. You

    What happens when no name matches?

  4. Alex · AI tutor

    For the matching address and port, Apache uses the first listed virtual host.

    Read the documentation ↗

Make your study time count.

Practice at your level.
For new practice sessions, Pass-IT adjusts the difficulty based on your previous answers.

Learn from mistakes.
Incorrect answers automatically become flashcards. When you review them, you rate how confidently you remember; Pass-IT schedules the next review.

See how focused practice works →

Animated feature preview

Turn your mistakes into knowledge you can rely on.

How Pass-IT works

Your review

Answered a question incorrectly?

Pass-IT saves it for your review.

COMPTIA-LINUX · Question excerpt

Apache serves the wrong site

View the full question

An administrator configures an Apache virtual host but the site returns the default page instead of the custom site. The configuration file is in /etc/httpd/conf.d/mysite.conf. What is the most likely troubleshooting step?

Understand the correct answer.

Verify the ServerName directive matches the requested hostname and that the virtual host is enabled

Verify the requested host name against the virtual host names.

Read the documentation ↗

How confidently do you remember?

During review, you assess how well you still know the answer.

Correct after hesitating

Pass-IT schedules your next review.

The date depends on your self-assessment and previous reviews.

Simplified demonstration. No learning progress is saved.

Practice for the moment that counts.

Take a full mock exam with a time limit and find out whether you can finish in time.

Your COMPTIA-LINUX mock exam

Questions
90
Minutes
90

Illustration of an exam session

  1. Start
  2. Answer questions
  3. Finish

Length and time limit of the Pass-IT mock exam.

Go into your exam with more confidence.

Your Readiness Score helps you assess whether you are ready for the exam. Results by exam domain show you where you should keep practicing.

Your money back if you fail despite 80% Readiness.
If your Readiness Score is at least 80% when you take the exam and you still fail, we refund the Pass-IT purchase price for this certification.

For active, paid access. Submit proof of failing within 14 days.

Further guarantee conditions

You need at least 80% Readiness and active, paid access to the certification when you take the exam. Take the exam within your access period and submit official proof of failing within 14 days after the exam.

For purchases through Apple or Google, refunds are handled by the respective store. See the full terms for further details.

Read the guarantee terms →

The Readiness Score describes your practice progress, not a probability of passing.

Guarantee requirement

80%

At least 80% Readiness
when you take the exam

Money back if you fail

Question counts and mock exam settings from the current Pass-IT catalog.

What you practice for COMPTIA-LINUX.

Exam topics, relevant practice and sources you can check.

Manage Linux systems and resourcesSee the guide for weighting78 QuestionsPass-IT questions

Use Linux tools to configure the system, its hardware and its working environment.

  • Explain boot, filesystem layout, distributions, architectures, graphical environments and licensing, and use device or kernel-module tools.
  • Manage partitions, logical volumes, filesystems, RAID and mounts, and perform backups or restores with archive, compression and copying tools.
  • Configure Linux networking and name resolution, using command-line tools to inspect connections and traffic.
  • Work with shell variables, paths, redirection, text utilities and editors to manage the system.
  • Explain Linux virtualization, including KVM, virtual-machine resources, images, states, networking, cloning and migration.
Manage users, services and applicationsSee the guide for weighting71 QuestionsPass-IT questions

Control files, accounts and running workloads on a Linux server.

  • Manage files, directories and links, and distinguish device-file types.
  • Create, change, lock and remove local accounts or groups, managing identities, profiles and expiration.
  • Inspect process states and resource use, adjust priorities and limits, and control or schedule jobs.
  • Install, update, remove and configure software, manage repositories and common services, and control service states and other units through systemd.
  • Build and manage container images, workloads, volumes and networks, including logs, port mapping and privilege settings.
Secure Linux access and dataSee the guide for weighting59 QuestionsPass-IT questions

Apply access controls, system protections and auditing to Linux environments.

  • Explain authentication, authorization and accounting with local or directory-backed identities, logs and audit tools.
  • Configure host firewalls, packet filtering, network address translation and forwarding with appropriate rule persistence.
  • Harden accounts and the operating system through permissions, SELinux, controlled privilege escalation, secure remote access and stronger authentication.
  • Explain encryption, hashing and certificates, protecting stored or transmitted data and replacing weak cryptographic options.
  • Use vulnerability checks, integrity verification and security benchmarks, and explain audit, supply-chain and secure-destruction procedures.
Automate and version Linux administrationSee the guide for weighting42 QuestionsPass-IT questions

Use scripts and orchestration to repeat administrative tasks with controlled changes.

  • Explain infrastructure as code, unattended installation, delivery pipelines and container orchestration with tools such as Ansible, OpenTofu and Kubernetes.
  • Write shell automation with variables, expansions, conditions, loops, functions, comparisons and return codes.
  • Use Python basics, virtual environments, dependencies, modules and coding conventions for administration.
  • Manage versions with Git, including branches, commits, comparisons, merges and recovering or temporarily setting aside changes.
  • Use AI for code or documentation with reviewed outputs, suitable prompts, data governance and organizational policies.
Monitor and troubleshoot LinuxSee the guide for weighting71 QuestionsPass-IT questions

Use system evidence to distinguish hardware, configuration, security and performance problems.

  • Configure monitoring, health checks, log collection and alerts around service indicators and objectives.
  • Diagnose boot, kernel, device, filesystem and software faults, including capacity, dependencies and failed systemd units.
  • Investigate network addressing, name resolution, routing, firewall and interface problems across IPv4 and IPv6.
  • Troubleshoot access, permissions, SELinux, certificates and insecure or exposed services.
  • Analyze memory pressure, CPU load, storage delays and network symptoms to locate performance bottlenecks.
Question formats you can practice
Multiple Choice
Select one answer.
Multiple Response
Select multiple applicable answers.
Drag & Drop
Match items to the appropriate targets.
Performance-based
Complete a practical task in a simulated environment, following the stated requirements.

These are practice formats in Pass-IT. See the Official certification objectives for the official exam requirements.

Frequently asked questions

Your preparation

How much study time should I plan for COMPTIA-LINUX?

For planning, Pass-IT estimates roughly 70–180 hours. Relevant experience may put you toward the lower end; starting from scratch may put you toward the higher end. Your needs may fall outside this range. This is not a time requirement from CompTIA or a promise that you will be exam-ready within that time.

What should you know before taking Linux+?

CompTIA sets no formal prerequisite but recommends A+, Network+ or Server+ plus twelve months of hands-on Linux work. The catalog budget is 120 hours, the longest of any CompTIA exam we track. That number is a fair warning: Linux+ is a command-line exam, and reading about commands is not the same as running them.

Using Pass-IT

What language are Pass-IT questions in?

Questions in the app are currently in English. Translations of the sample questions on this page apply only to this preview. Check with CompTIA for the languages available for the official exam.

How long does my COMPTIA-LINUX access last?

Access covers this certification for 12 months. You pay once, with no automatic renewal.

When does the money-back guarantee apply?

The guarantee refunds the Pass-IT purchase price for this certification. You need eligible paid access and a Readiness Score of at least 80% from your practice results when you take the exam. This score can only reach 80% after at least 50 answered questions and is not a validated probability of passing. Take the exam during your access period and submit official proof of failing within 14 days. Guarantee terms

About the COMPTIA-LINUX exam

Where can I take the COMPTIA-LINUX exam?

Pearson VUE (testing center or online proctored).

How long is the CompTIA Linux+ exam?

The CompTIA Linux+ exam has 90 questions and a 90-minute time limit.

Linux+ or Server+ — which one fits?

Server+ is about server hardware, installation, disaster recovery and the physical and platform layer, regardless of operating system. Linux+ is about operating one specific operating system well: users, services, security and scripting. If your fleet is Linux, Linux+ is the closer match; if you rack and recover machines, Server+ is.

How long does Linux+ last?

Three years. You renew by earning 50 continuing-education units inside the cycle or by passing the current version of the exam again.

What happens if you fail Linux+?

There is no waiting period after the first attempt, so you can rebook straight away. Every failed attempt after that carries a 14-day wait.

Your preparation for COMPTIA-LINUX

$29.99one-time

12 months of access for COMPTIA-LINUX · No automatic renewal

Buy COMPTIA-LINUX access

Questions in the app are currently in English.

Try 20 questions for freeFree account required. No credit card.

Already have an account? Log in

Prefer a subscription? View subscriptions →

Money back if you fail with at least 80% Readiness, for eligible purchases under the guarantee terms.

Guarantee terms

The guarantee refunds the Pass-IT purchase price for this certification. You need eligible paid access and a Readiness Score of at least 80% from your practice results when you take the exam. This score can only reach 80% after at least 50 answered questions and is not a validated probability of passing. Take the exam during your access period and submit official proof of failing within 14 days.

Full guarantee terms →