A volume group is out of free space and a new disk has been added. Which command adds the new physical volume to the group?vgextend(8), DESCRIPTION
After mkswap has set up a swap area on a partition, which command turns swapping on for it?swapon(8), DESCRIPTION
By default gzip replaces each file with its compressed version. Which option keeps the input file?GNU Gzip manual, section 3 Invoking gzip
How many devices can an md RAID6 array lose without losing data?md(4), DESCRIPTION
How many nameserver entries in /etc/resolv.conf will the resolver use at most?resolv.conf(5), DESCRIPTION
In bash, where does cd - take you?bash(1), SHELL BUILTIN COMMANDS
In bash, which redirection sends standard output and standard error both to the file out.log?bash(1), Redirecting Standard Output and Standard Error
In the Linux boot sequence, what does the system firmware hand control to after its minimal hardware initialization?bootup(7), DESCRIPTION
Into which file does depmod write its list of module dependencies by default?depmod(8), DESCRIPTION
Under the Filesystem Hierarchy Standard, where must the operating system kernel be located?Filesystem Hierarchy Standard 3.0, section 3.5.2
What does each line of /etc/hosts associate?hosts(5), DESCRIPTION
Show all 146 questions (135 more)
System management, continued
What does mount -a do?mount(8), COMMAND-LINE OPTIONS
What does the bash builtin export do to a variable?bash(1), SHELL BUILTIN COMMANDS
What does the sixth field of an /etc/fstab line control?fstab(5), DESCRIPTION
What form does an initramfs take?bootup(7), DESCRIPTION
Which command adds a default route through the gateway 192.168.1.1?ip-route(8), EXAMPLES
Which command initializes a disk or partition so that LVM recognizes it as a physical volume?pvcreate(8), DESCRIPTION
Which command loads a kernel module and also handles the modules it depends on?insmod(8), DESCRIPTION
Which command prints a block device's attributes, such as its LABEL and UUID?blkid(8), DESCRIPTION
Which directory holds temporary files that are kept between reboots, under the Filesystem Hierarchy Standard?Filesystem Hierarchy Standard 3.0, section 5.15.1
Which file decides whether host names are looked up in local files before DNS?nsswitch.conf(5), DESCRIPTION
Which lsblk option adds filesystem information to the list of block devices?lsblk(8), OPTIONS
Which lspci option shows the kernel driver that handles each device?lspci(8), OPTIONS
Which lvextend option resizes the filesystem on the logical volume in the same step?lvextend(8), OPTIONS
Which md RAID level is also called a mirrored set?md(4), DESCRIPTION
Which qemu-img command changes a disk image from one format to another, for example from raw to qcow2?QEMU documentation, qemu-img, convert
Which rsync option removes files from the destination that are no longer in the source?rsync(1), OPTION SUMMARY
Which ss option shows the process that is using each socket?ss(8), OPTIONS
Which tar operation lists the contents of an archive without extracting it?tar(1), DESCRIPTION
Which tar option filters the archive through xz?tar(1), OPTIONS
Which uname option prints the kernel release?uname(1), DESCRIPTION
Which virsh command stops a guest at once, without a clean shutdown of its operating system?virsh(1) on libvirt.org, destroy
Which x86 hardware feature does KVM need for full virtualization?KVM project page (linux-kvm.org), Main Page
Services and user management 30
After a unit file has been edited by hand, which command makes systemd reload all unit files?systemctl(1), COMMANDS
In ps output, what does the process state code Z mean?ps(1), PROCESS STATE CODES
What does adding --now to systemctl enable do?systemctl(1), OPTIONS
What does apt update do?apt(8) (Debian manpages), DESCRIPTION
What does chown :staff report.txt change?chown(1), DESCRIPTION
What does podman run -p 8080:80 publish?podman-run(1), OPTIONS
What does the sticky bit do on a world-writable directory such as /tmp?chmod(1), RESTRICTED DELETION FLAG OR STICKY BIT
What is the range of niceness values, from most to least favorable to the process?nice(1), DESCRIPTION
What kind of link does ln create when it is run without options?ln(1), DESCRIPTION
When does the crontab line 30 2 * * 1 /usr/local/bin/backup.sh run?crontab(5), DESCRIPTION
When useradd -m creates a home directory, which directory are its starting files copied from by default?useradd(8), OPTIONS
Which command changes the scheduling priority of a process that is already running?renice(1), DESCRIPTION
Which command lists your pending at jobs?at(1) (Debian manpages), DESCRIPTION
Which dnf command finds the packages that provide a given file?DNF Command Reference, Provides Command
Which Dockerfile instruction sets the base image for the instructions that follow?Dockerfile reference, FROM
Which dpkg option lists the files that an installed package put on the system?dpkg(1), COMMANDS
Which file holds the hashed passwords and the password aging information of local accounts?shadow(5), DESCRIPTION
Which journalctl option shows the most recent entries and keeps printing new ones as they arrive?journalctl(1), OUTPUT OPTIONS
Which kind of network does podman network create make by default?podman-network-create(1), DESCRIPTION
Which numeric mode gives the owner read and write, the group read only, and others no access?chmod(1), DESCRIPTION
Which podman ps option also shows containers that are not running?podman-ps(1), OPTIONS
Which podman run option starts the container in the background and prints its ID?podman-run(1), OPTIONS
Which rpm query names the package that owns an installed file?rpm(8), PACKAGE SELECTION OPTIONS
Which signal does kill send when no signal is named?kill(1), DESCRIPTION
Which systemctl command links a unit file to /dev/null so that the unit cannot be started?systemctl(1), COMMANDS
Which systemd timer setting runs a job that was missed while the machine was off?systemd.timer(5), OPTIONS
Which two signals can a process never catch, block or ignore?signal(7), DESCRIPTION
Which unit does backup.timer activate by default when it elapses?systemd.timer(5), DESCRIPTION
Which userdel option also removes the user's home directory and mail spool?userdel(8), OPTIONS
Which usermod options add a user to a supplementary group and leave the user in the groups they already have?usermod(8), OPTIONS
Security 27
An account's shell field is set to nologin. What happens when that user tries to log in?nologin(8), DESCRIPTION
In a PAM stack, which control value returns failure to the application at once when its module fails?pam.d(5), DESCRIPTION
In auditctl -w /etc/passwd -p wa -k identity, what does -k identity do?auditctl(8), RULE OPTIONS
On the remote machine, which file does ssh-copy-id add your public key to?ssh-copy-id(1), DESCRIPTION
What does a ufw limit rule do to an address that starts 6 or more connections within 30 seconds?ufw(8) (Ubuntu manpages), RULE SYNTAX
What does PermitRootLogin prohibit-password in sshd_config do?sshd_config(5), DESCRIPTION
What does setfacl -m u:ana:r report.txt do?setfacl(1), OPTIONS
Where does iptables -I INPUT place a new rule when no rule number is given?iptables(8), OPTIONS
Which chage option sets how many days at most a password stays valid?chage(1), OPTIONS
Which command lists the Kerberos tickets held in your credentials cache?MIT Kerberos documentation, klist, DESCRIPTION
Which command obtains and caches an initial Kerberos ticket-granting ticket?MIT Kerberos documentation, kinit, DESCRIPTION
Which command prints every table, chain and rule that nftables holds in the kernel?nft(8) on netfilter.org, RULESET
Which cryptsetup action initializes a LUKS partition and sets its first passphrase?cryptsetup(8), LUKS EXTENSION
Which file attribute, set with chattr, makes a file impossible to modify, delete or rename?chattr(1), ATTRIBUTES
Which firewall-cmd option saves the active runtime configuration as the permanent one?firewall-cmd(1) on firewalld.org, Status Options
Which gpg option encrypts a file with a passphrase alone, with no key pair?GnuPG manual, section 4.1.2 Commands to select the type of operation
Which iptables option sets the default policy of a built-in chain?iptables(8), OPTIONS
Which ldapsearch option sets the starting point of the search in the directory tree?ldapsearch(1) on openldap.org, OPTIONS
Which openssl x509 option prints a certificate's expiry date?openssl-x509(1), Certificate Printing Options
Which PAM module type handles updating a user's authentication token, such as a password?pam.d(5), DESCRIPTION
Which passwd option expires a password at once, so that the user must change it at the next login?passwd(1), OPTIONS
Which rpm mode compares the installed files of a package with the information stored in the rpm database?rpm(8), OPERATIONS
Which sha256sum option reads checksums from a file and checks them against the files it names?sha256sum(1), DESCRIPTION
Which sudoers tag lets a user run a command without authenticating first?sudoers(5), SUDOERS FILE FORMAT
Why is /etc/sudoers edited with visudo and not opened directly in an editor?visudo(8), DESCRIPTION
With faillock.conf at its defaults, how many seconds after a lockout is access re-enabled?faillock.conf(5), OPTIONS
You add a service with firewall-cmd --permanent and nothing else. When does the change take effect?firewall-cmd(1) on firewalld.org, Permanent Options
Automation, orchestration and scripting 24
A script fails partway through. Which bash setting prints each command with its expanded arguments as it runs?bash(1), SHELL BUILTIN COMMANDS
In a bash test, when is [ -z "$name" ] true?bash(1), CONDITIONAL EXPRESSIONS
In bash, what does $? expand to?bash(1), Special Parameters
Inside double quotes, how does bash expand "$@"?bash(1), Special Parameters
What does ansible-playbook --check do?ansible-playbook(1) (Debian manpages), COMMON OPTIONS
What does bash put in place of $(date) when it expands the line?bash(1), Command Substitution
What does git commit --amend do?git-commit(1), OPTIONS
What does git pull do first, before it integrates the remote branch into the current one?git-pull(1), DESCRIPTION
What does set -e make a bash script do?bash(1), SHELL BUILTIN COMMANDS
What does the bash builtin local do to a variable inside a function?bash(1), SHELL BUILTIN COMMANDS
Which Ansible tool encrypts and decrypts data files, such as a file of secrets?ansible-vault(1) (Debian manpages), NAME
Which ansible-playbook option limits a run to a subset of the selected hosts?ansible-playbook(1) (Debian manpages), COMMON OPTIONS
Which ansible-playbook option runs operations with become, that is, with privilege escalation?ansible-playbook(1) (Debian manpages), COMMON OPTIONS
Which bash loop runs its body for as long as the test command returns a non-zero status?bash(1), Compound Commands
Which built-in Python sequence type is immutable?The Python Tutorial, section 5.3 Tuples and Sequences
Which command creates a Python virtual environment in the directory tutorial-env?The Python Tutorial, section 12.2 Creating Virtual Environments
Which files does a .gitignore file not affect?gitignore(5), DESCRIPTION
Which git command records the state of working directory and index, then gives you a clean working directory?git-stash(1), DESCRIPTION
Which git push option pushes all refs under refs/tags?git-push(1), OPTIONS
Which git tag option makes an annotated tag object?git-tag(1), OPTIONS
Which module does the ansible ad hoc command run when no -m option is given?ansible(1) (Debian manpages), COMMON OPTIONS
Which pip command prints the installed packages in requirements format?pip documentation, pip freeze, Description
Which pip install option installs the packages named in a requirements file?pip documentation, pip install, Options
Which Python data type is an unordered collection that holds no duplicate elements?The Python Tutorial, section 5.4 Sets
Troubleshooting 32
A filesystem is full. Which du option prints only one total for each directory you name, to find the largest?du(1), DESCRIPTION
A server takes minutes to boot. Which command lists the running units ordered by the time each took to initialize?systemd-analyze(1), DESCRIPTION
A service should be waiting on TCP port 443. Which ss option displays only listening sockets?ss(8), OPTIONS
A user's sudo command is refused. Which sudo option lists what that user may run on this host?sudo(8), DESCRIPTION
An ext4 filesystem needs a repair with e2fsck. What should be true of the filesystem first?e2fsck(8), DESCRIPTION
Files moved into /var/www/html kept their old SELinux labels, and the web server is denied access. Which command resets them to the default contexts?restorecon(8), NAME and OPTIONS
In free output, what does the available column estimate?free(1), DESCRIPTION
In vmstat output, which CPU column is the time spent waiting for IO?vmstat(8), FIELD DESCRIPTION FOR VM MODE
The root filesystem came up read-only. Which mount option, given together with rw, makes the mounted filesystem writable again?mount(8), FILESYSTEM-INDEPENDENT MOUNT OPTIONS
Steady non-zero values in the si and so columns of vmstat mean what?vmstat(8), FIELD DESCRIPTION FOR VM MODE
What does dmesg examine?dmesg(1), DESCRIPTION
What does journalctl -p err show?journalctl(1), FILTERING OPTIONS
What does setenforce 0 do?setenforce(8), DESCRIPTION
Which column of iostat -x gives the percentage of elapsed time in which I/O requests were being issued to the device?iostat(1), REPORTS
Which command checks the audit log for SELinux denials?ausearch(8), OPTIONS and EXAMPLES
Which command prints the single route the kernel would use to reach 10.0.5.20?ip-route(8), DESCRIPTION
Which dig option does a reverse lookup, from an address to a name?dig(1) (Debian manpages), OPTIONS
Which firewall-cmd option lists everything added to or enabled in the default zone?firewall-cmd(1) on firewalld.org, Options to Adapt and Query Zones and Policies
Which fstab option tells the system not to report errors for a device that does not exist?fstab(5), DESCRIPTION
Which IP header field does traceroute use to make each gateway along the path reply?traceroute(8), DESCRIPTION
Which journalctl command shows the messages of the boot before the last one?journalctl(1), FILTERING OPTIONS
Which kernel command line parameter overrides the unit that systemd activates at boot, for example to reach rescue.target?systemd(1), KERNEL COMMAND LINE
Which mdadm option prints the details of an md array?mdadm(8), OPTIONS
Which periods do the three load averages printed by uptime cover?uptime(1), DESCRIPTION
Which ping option stops after a set number of ECHO_REQUEST packets?ping(8), OPTIONS
Which strace option attaches to a process that is already running?strace(1), OPTIONS
Which sysctl sets the relative cost of swapping against filesystem paging, as a value from 0 to 200?Linux kernel documentation, /proc/sys/vm, swappiness
Which systemctl option lists the units that are in a failed state?systemctl(1), OPTIONS
Which systemd target starts a shell on the main console without pulling in other services or mounts?systemd.special(7), UNITS MANAGED BY THE SYSTEM SERVICE MANAGER
Which tcpdump option stops addresses and port numbers being converted to names?tcpdump(1), OPTIONS
Which tool repairs a corrupt or damaged XFS filesystem?xfs_repair(8), DESCRIPTION
Writes fail with "No space left on device" while df -h still shows free blocks. Which command shows whether the inodes are used up?df(1), OPTIONS
How this list was compiled: Own questions, written to the five domains and weights of CompTIA's Linux+ exam XK0-006 (version 8) as CompTIA publishes them at https://www.comptia.org/en-us/certifications/linux/ (read 2026-10-08). Facts were read on 2026-10-08 in public texts: the Linux man-pages collection at man7.org, the Filesystem Hierarchy Standard 3.0, the GNU Gzip manual, the GnuPG manual, the Python tutorial and pip documentation, the Podman, QEMU, libvirt, firewalld, netfilter, OpenLDAP, OpenSSL, MIT Kerberos and DNF documentation, the Dockerfile reference, the Linux kernel documentation and manual pages on manpages.debian.org and manpages.ubuntu.com. Each question names the page and section it was written from and links to it. Licence: Own work. Every question, wrong choice and explanation was written for this site from the public texts named in each question. Nothing is copied or reworded from a CompTIA exam, a released or sample question, or another practice product.
How it works
An unofficial Linux+ practice test: 146 of our own questions, sorted by the five domains CompTIA publishes for exam XK0-006. This site is not affiliated with CompTIA, and nothing here is taken from the real exam.
Read the full guide
What the Linux Plus exam asks
CompTIA's page for exam XK0-006 (version 8), read on October 8, 2026, weights five domains: system management 23%, services and user management 20%, security 18%, automation, orchestration and scripting 17% and troubleshooting 22%.
Which version to study, and what is left out
The same page gives January 13, 2026 as the retirement date of the English XK0-005 exam, so XK0-006 is the one to prepare for. This bank is multiple choice only: the performance-based tasks are not here, and neither are Puppet, CI/CD tools, Kubernetes or the objectives' AI best practices.
kill sends TERM unless you name a signal. KILL and STOP are the two signals a process cannot catch, block or ignore (kill(1), signal(7)).
firewall-cmd --permanent changes nothing until a reload. --runtime-to-permanent saves the rules that are running now.
journalctl -b -1 shows the boot before the last one, and -p err shows err together with every more important level.
Questions and answers
Is this an LX0-103 practice test?
It follows XK0-006 (version 8), the newest Linux+ exam on CompTIA's page, launched July 15, 2025. That page names XK0-005 as the version before it and does not offer LX0-103.
How many questions are on the CompTIA Linux+ exam?
A maximum of 90 in 90 minutes, by CompTIA's XK0-006 page, some of them performance-based. Exam mode on this page sets 90 multiple-choice questions against a 90-minute clock and gives your percent right for each domain.
What is the passing score for Linux+ XK0-006?
CompTIA's page gives 720 on a scale of 100 to 900. That scale is not a percent, so a result here gives no pass or fail.
Is this CompTIA Linux+ practice test free?
Yes. Every question, every explanation with its source link and the timed exam mode are free, with no sign-up. Your answers and your missed pile stay in your browser.