WGU TutoringAbout UsContact
CompTIA Practice Questions

CompTIA Linux+ Practice Questions

CompTIA Linux+ (XK0-005)Practice with free Linux+ practice test questions covering all four XK0-005 domains - system management, security, scripting and automation, and troubleshooting. Each question includes a thorough explanation so you actually learn the concepts, not just memorize the right letter.

90
Total Questions
90 minutes
Time Limit
720 on 100-900 scale
Passing Score
$358
Registration Fee

Free Sample Questions

Here are 5 free sample questions from our full bank of 350+ CompTIA Linux+ practice questions. Try them out below — click "Show Answer" to reveal the correct response and explanation.

1

A Linux administrator needs to find all files in /var/log that have been modified within the last 24 hours and are larger than 10 MB. Which command accomplishes this?

AA) find /var/log -mtime -1 -size +10M
BB) find /var/log -mtime 1 -size 10M
CC) locate /var/log -mtime -1 -size +10M
DD) ls -lR /var/log --modified 24h --minsize 10M
2

A system administrator needs to configure a firewall on a Linux server running firewalld. The web server should accept incoming traffic on ports 80 and 443 in the public zone, and these rules should persist after a reboot. Which set of commands is correct?

AA) firewall-cmd --zone=public --add-port=80/tcp && firewall-cmd --zone=public --add-port=443/tcp
BB) firewall-cmd --permanent --zone=public --add-service=http && firewall-cmd --permanent --zone=public --add-service=https && firewall-cmd --reload
CC) iptables -A INPUT -p tcp --dport 80 -j ACCEPT && iptables -A INPUT -p tcp --dport 443 -j ACCEPT
DD) ufw allow 80/tcp && ufw allow 443/tcp && ufw reload
3

A junior administrator wrote the following bash script but it isn't producing any output. What is the most likely issue? #!/bin/bash count=0 cat /var/log/syslog | while read line; do if echo "$line" | grep -q "error"; then count=$((count + 1)) fi done echo "Total errors: $count"

AA) The grep -q flag suppresses all output and prevents counting
BB) The pipe to 'while' creates a subshell, so the incremented count variable is lost when the loop ends
CC) The variable count should be declared with 'declare -i count=0'
DD) The 'read line' command should be 'read -r line' to work correctly
4

A server has a single 2 TB disk (/dev/sdb) that needs to be configured with LVM. The admin wants to create a volume group called 'data_vg' and a 500 GB logical volume called 'app_lv' formatted with ext4. What is the correct sequence of commands?

AA) vgcreate data_vg /dev/sdb → lvcreate -L 500G -n app_lv data_vg → mkfs.ext4 /dev/data_vg/app_lv
BB) pvcreate /dev/sdb → vgcreate data_vg /dev/sdb → lvcreate -L 500G -n app_lv data_vg → mkfs.ext4 /dev/data_vg/app_lv
CC) pvcreate /dev/sdb → lvcreate -L 500G -n app_lv /dev/sdb → mkfs.ext4 /dev/app_lv
DD) fdisk /dev/sdb → vgcreate data_vg /dev/sdb1 → lvcreate -l 100%FREE -n app_lv data_vg → mkfs.ext4 /dev/data_vg/app_lv
5

An administrator needs to schedule a backup script (/opt/scripts/backup.sh) to run every weekday at 2:30 AM and redirect both stdout and stderr to a log file. Which crontab entry is correct?

AA) 30 2 * * 1-5 /opt/scripts/backup.sh > /var/log/backup.log 2>&1
BB) 2:30 * * * 1-5 /opt/scripts/backup.sh >> /var/log/backup.log
CC) 30 2 * * * /opt/scripts/backup.sh 2>/var/log/backup.log
DD) 0 2 30 * 1-5 /opt/scripts/backup.sh &> /var/log/backup.log

Get the Full CompTIA Linux+ Question Bank — 350+ Practice Questions

You just saw 5 sample questions. We have a complete bank of 350+ CompTIA Linux+ practice questions with detailed answers and explanations ready for you. Fill out the form below and we'll send you the full question bank — completely free.

We'll send the full question bank to this email.

We won't spam you. Just a quick follow-up if needed.

All fields are required.

About the CompTIA Linux+

Format & Structure

Total Questions
90
Time Limit
90 minutes
Format
Multiple choice and performance-based questions

Scoring & Cost

Passing Score
720 on 100-900 scale
Registration Fee
$358

Frequently Asked Questions

What is the CompTIA Linux+ certification?

CompTIA Linux+ is a vendor-neutral certification that validates your skills in Linux system administration, security, scripting, and containerization. The current version is XK0-005, which was released in 2022 and places heavier emphasis on automation, cloud-adjacent technologies, and security hardening compared to earlier versions. It's widely recognized across industries and doesn't lock you into a specific distro like Red Hat or SUSE certifications do.

How many questions are on the Linux+ XK0-005?

The CompTIA Linux+ XK0-005 has a maximum of 90 questions. You'll encounter both standard multiple-choice questions and performance-based questions (PBQs). The PBQs typically appear at the start of the assessment and ask you to solve real-world problems - things like writing commands, configuring services, or troubleshooting issues in a simulated terminal environment.

What score do I need to pass the Linux+?

You need a 720 on CompTIA's 100-900 scale to pass the Linux+ XK0-005. That's a bit lower than the Security+ threshold of 750, but don't let that fool you - the material is quite technical. CompTIA uses scaled scoring, so it's not a simple percentage. Some questions carry more weight than others, and performance-based questions tend to count more heavily.

How much does the CompTIA Linux+ cost?

The Linux+ voucher costs $358 USD as of 2026. That covers the assessment itself but not study materials or training courses. It's worth looking into CompTIA's bundled packages or checking whether your employer offers certification reimbursement. Military service members and veterans can often get the voucher covered through programs like the Army Cool or Navy Cool initiatives.

What topics does the Linux+ XK0-005 cover?

The XK0-005 covers four main domains: System Management (32%), Security (21%), Scripting, Containers, and Automation (19%), and Troubleshooting (28%). You'll need solid knowledge of file systems, package management, user administration, SELinux/AppArmor, firewall configuration, bash scripting, container basics with Docker and Podman, process management, and network troubleshooting. The troubleshooting domain is heavily weighted, so don't neglect your hands-on practice.

How long should I study for the Linux+?

It really depends on where you're starting from. If you've got hands-on Linux experience - maybe a year or more of using it at work or running your own servers - you could be ready in 4-6 weeks of focused study. Complete beginners should plan on 2-4 months. The single best thing you can do is practice on an actual Linux system. Spin up a VM, break things, fix them. Reading about commands is fine, but typing them yourself is what makes them stick.

Is the Linux+ worth it in 2026?

For a lot of people, yes. Linux powers the vast majority of cloud infrastructure, containers, and web servers, so the skills are genuinely useful. The certification is particularly valuable if you're breaking into system administration, DevOps, or cloud engineering and need something on your resume to prove your Linux knowledge. That said, if you already hold the RHCSA or LPIC-2, the Linux+ might be redundant since those are generally considered more advanced. It's a solid stepping stone, not the finish line.

Can I use the Linux+ practice test to prepare for the real assessment?

Absolutely - practice questions are one of the most effective ways to study for the Linux+. They help you identify weak areas before you sit for the real thing. Our linux+ practice test questions cover all four XK0-005 domains and include detailed explanations so you understand the reasoning, not just the correct answer. Combine practice questions with hands-on lab time and you'll be in great shape.

Get 350+ CompTIA Linux+ Practice Questions

Don't settle for just 5 sample questions. Request the full question bank and start preparing with confidence.

Get Started