Skip to main content
OpenpassAI

Free tool · No sign-up needed

CompTIA Linux+ Performance-Based Questions

6 free, original PBQs for Linux+ (XK0-006), with the Linux command line and drag-and-drop. Do each task, check it, and read why the answer is right.

Last updated

CompTIA Linux+

6 performance-based questions

You do each task instead of picking an answer. Every question is explained after you check it, and you get a score at the end.

  1. 1Count errors and archive an old logLinux command line · System Management
  2. 2Add an analyst and bring up the databaseLinux command line · Services and User Management
  3. 3Fix the permissions on SSH keysLinux command line · Security
  4. 4Turn permission strings into numbersMatching · Security
  5. 5Put the lines of a Bash script in orderOrdering · Automation, Orchestration, and Scripting
  6. 6Choose the command that answers the questionMatching · Troubleshooting

Take it further in OpenpassAI

Performance-based questions in every practice session

OpenpassAI’s practice sessions add performance-based questions, with command-line and network topology tasks, to full timed exams, AI explanations and a readiness score.

The questions

The Linux+ performance-based questions on this page

Each one with its scenario and task. Try it above first, then open the explanation.

  1. Question 1 · Linux command line · System Management

    Count errors and archive an old log

    The payments application on app01 logged errors this morning, and its log folder is filling up. You’ve been asked how many errors there were, and to move the rotated log out of the way into an archive folder that doesn’t exist yet.

    Answer the question from the log, then create the archive folder and move the old log into it.

    Show the explanation

    grep -c counts the lines that match instead of printing them. /var belongs to root, so creating a folder there needs sudo, and -p creates /var/archive on the way to /var/archive/app. mv moves the rotated log, and mode 444 makes the archived copy read-only for everyone, so it can’t be edited by accident.

  2. Question 2 · Linux command line · Services and User Management

    Add an analyst and bring up the database

    Dana joins the data team today and needs an account on db01, in a new group called analysts. While you’re there, the PostgreSQL service, which was installed yesterday, has to be started and set to come up at boot.

    Create the group and the account, then start and enable the service.

    Show the explanation

    groupadd creates the group and useradd creates the account; -m gives it a home directory and -s sets the shell. usermod -aG adds a group without removing the others: without -a, -G replaces the whole list. systemctl enable --now does two jobs in one command: it starts the service and sets it to start at every boot.

  3. Question 3 · Linux command line · Security

    Fix the permissions on SSH keys

    You copied your SSH keys to web01 from a USB stick, and now the SSH client refuses to use the private key: “permissions are too open”. Everything in ~/.ssh came across readable by every user on the server.

    Look at the permissions in ~/.ssh, then set the ones SSH expects.

    Show the explanation

    SSH refuses a private key that other users could read, because anyone holding it can sign in as you. The .ssh folder should be 700, so only you can enter it. The private key and authorized_keys should be 600: read and write for you, nothing for anyone else. The public key (.pub) is meant to be shared, so 644 is fine.

  4. Question 4 · Matching · Security

    Turn permission strings into numbers

    A hardening checklist gives file modes as numbers, but ls -l shows them as letters. You need to read one as the other without stopping to think.

    Match each permission string to its octal mode.

    Show the explanation

    Each group of three letters is one digit: read is 4, write is 2 and execute is 1, added together. So rwx is 7, r-x is 5, rw- is 6, r-- is 4 and --- is 0. The three digits are the owner, the group and everyone else, in that order: rwxr-x--- is 7, 5, 0.

  5. Question 5 · Ordering · Automation, Orchestration, and Scripting

    Put the lines of a Bash script in order

    A script is meant to copy every log file that isn’t empty from /var/log into /backup. Its six lines were pasted into a ticket in the wrong order.

    Arrange the lines so the script works.

    Show the explanation

    The first line names the interpreter. The for loop takes each file matching /var/log/*.log in turn, and do opens its body. Inside it, if tests the file with -s, which is true when the file exists and isn’t empty, and then opens the block that runs when the test passes. The copy goes inside that block. fi closes the if, and done closes the loop: blocks close in the reverse of the order they opened.

  6. Question 6 · Matching · Troubleshooting

    Choose the command that answers the question

    A web server is misbehaving and you have a shell on it. Each question you need answered has one command that answers it directly.

    Match each question to the command you would run.

    Show the explanation

    df -h shows how full each filesystem is, and du -sh sizes the directories inside one. top lists processes by CPU use, live. journalctl -u shows one service’s log, which is where its startup error will be. ss -tulpn lists listening ports with the process behind each, and dmesg prints the kernel’s messages, including hardware errors. lsblk lists disks and partitions, and free -h shows memory.

On the real Linux+ exam

CompTIA lists Linux+ among its certifications with simulation performance-based questions: tasks in an approximation of a real tool, such as a firewall, a network diagram or a terminal window. CompTIA’s page on performance-based questions, read on November 12, 2026.

Guide

How to practice performance-based questions

What a performance-based question is

CompTIA describes performance-based questions as exam items that test your ability to solve problems in real-world settings. Most are simulations: an approximation of a tool such as a firewall, a network diagram, a terminal window or an operating system.

You don’t pick an answer. You do the task, and there can be more than one correct way to do it.

Do the task before you read

Try each question cold. Getting it wrong first and then reading why teaches more than reading the answer and nodding along.

Read the explanation even when you’re right

A right answer reached by guessing is a wrong answer waiting for exam day. Every question here explains why each part is what it is.

Manage your time on exam day

CompTIA says a simulation question can be skipped and returned to later, with your work saved. If one is eating your time, move on, answer the multiple-choice questions and come back.

FAQs

Got Questions? We’ve Got Answers.

Find quick answers or contact our support team.

Does the real Linux+ exam have performance-based questions?

Yes. CompTIA lists Linux+ among its certifications with simulation performance-based questions: tasks in an approximation of a real tool, such as a firewall, a network diagram or a terminal window. That is from CompTIA’s page on performance-based questions, read on November 12, 2026.

Are these real exam questions?

No. They’re original tasks written to each exam’s published objectives. Using leaked real exam questions breaks every vendor’s exam rules.

How are performance-based questions scored on the real exam?

CompTIA says a performance-based question can have more than one correct way through it, that its scoring allows for the different approaches, and that partial credit may be given. Here, each question is scored by its parts, so you can see which part you missed.

Can I skip a performance-based question and come back to it?

CompTIA says a simulation question can be skipped and returned to later, and that your work on it is saved when you move on. A virtual-environment question has to be completed when you reach it: a warning screen tells you so first.

Is the command line in these questions a real machine?

No. It’s a practice terminal that runs in your browser. It understands the real commands the task needs and answers the way the real system would, but it isn’t a full operating system: nothing is installed, and nothing you type can break anything.

Do I need an account?

No. The questions run in your browser and nothing is saved. Sign up only if you want full practice exams and progress tracking.

Ready to Get Certified Faster?

Start free today or see it in action first.

OpenpassAI

Hi 👋 I’m OpenpassAI. Ready to prepare for your exam the smarter way?

Ready to explore OpenpassAI? I can show you how the platform helps you prepare, practice, and pass.