Free practice test · no sign-up
CompTIA Linux+Free Linux Certified IT Professional practice test
10 real CompTIA Linux+ practice questions with instant answers and explanations — no account, no credit card, no email. Score yourself, then unlock the full bank of 1,249questions whenever you’re ready. The CompTIA Linux+ passing score is 720 / 900.
An administrator needs to bundle several directories into one archive file while keeping file permissions and folder structure intact. Which command is the right tool for this job?
Answer key
All 10 CompTIA Linux+ questions & answers
Prefer to just read the answers and explanations? Here’s the full key for this free CompTIA Linux+ test.
Q1. An administrator needs to bundle several directories into one archive file while keeping file permissions and folder structure intact. Which command is the right tool for this job?
Correct answer: A. tar
tar bundles multiple files and directories into a single archive, preserving permissions and the original structure. gzip compresses individual files but cannot aggregate multiple directories on its own. unzip is an extraction utility for ZIP archives and serves no archiving purpose. touch is used to create empty files or update timestamps, not to create archives.
Q2. An organization wants to let several Linux servers share files with each other over the network using a protocol built specifically for UNIX-based systems. Which protocol should be configured?
Correct answer: B. NFS
NFS (Network File System) was designed for sharing filesystems among UNIX and Linux hosts and is the standard choice in those environments. SMB (Server Message Block) is primarily associated with Windows file sharing, though it can be used with Linux via Samba. FTP is a file-transfer protocol and does not support filesystem mounting. HTTP delivers web content and has no mechanism for mounting remote filesystems.
Q3. A Linux server's storage configuration writes identical data to two separate disks so the system keeps running if either disk fails. Which RAID level describes this setup?
Correct answer: C. RAID 1
RAID 1 mirrors data across two or more disks, providing redundancy so that a single-disk failure does not cause data loss. RAID 0 stripes data across disks for performance but offers no fault tolerance. RAID 5 distributes parity across three or more disks for both performance and redundancy. RAID 6 extends RAID 5 with double parity, tolerating up to two simultaneous disk failures.
Q4. A database administrator believes a running process has a file open and is preventing it from being deleted. Which command reveals which process currently has that file open?
Correct answer: B. lsof
lsof (list open files) enumerates every file currently opened by any process, letting administrators pinpoint which process holds a specific file. chmod modifies file permissions and provides no information about file usage. mv renames or relocates files and cannot identify open file handles. fdisk manages disk partitions and is unrelated to process or file-handle tracking.
Q5. A database process is consuming an unexpectedly high share of CPU, degrading performance for other users. Which command lets an administrator adjust the scheduling priority of that already-running process?
Correct answer: C. renice
renice changes the nice value of a running process, increasing or decreasing its share of CPU time relative to other processes. who reports which users are currently logged into the system. fg moves a suspended background job to the foreground; it does not influence CPU scheduling. lsof displays open files and has no effect on process priority.
Q6. A developer has compiled a custom kernel module and wants to load it directly into the running kernel for a quick test. Which command should be used?
Correct answer: B. insmod
insmod inserts a specified module file (e.g., a .ko file) directly into the running kernel without resolving dependencies, making it suitable for manual testing during development. modprobe also loads modules but automatically handles dependencies; it is the preferred tool for production use. rmmod removes a module that is already loaded. lsmod displays a list of currently loaded modules.
Q7. After extracting a program's source code and running the ./configure script, what command should a developer run next to compile the software?
Correct answer: B. make
Running make reads the Makefile generated by ./configure and compiles the source code into executable binaries. After make finishes, make install copies those binaries to the appropriate system directories. install alone is not a recognized build step in this workflow. rpm -i is for installing pre-built RPM packages, not for compiling source code. apt-get update refreshes package repository metadata and has no role in source compilation.
Q8. A developer wants to identify which subdirectory in their home folder is consuming the most disk space. Which command should they run?
Correct answer: B. du
du (disk usage) reports how much space each file and directory occupies, making it easy to locate the largest directories. mount attaches filesystems to mount points but does not report space consumption. fsck checks and repairs filesystem integrity and has no space-reporting function. mkinitrd builds an initial RAM disk image and is unrelated to disk-usage reporting.
Q9. A developer needs to transfer a file from their local workstation to a remote server with all data encrypted in transit. Which tool is best suited for this straightforward, encrypted copy?
Correct answer: B. scp
scp (secure copy) tunnels file transfers through SSH, encrypting all data in transit. It provides a simple command-line interface for copying files to or from remote hosts. rsync can also use SSH for secure transfer but is optimized for incremental, directory-level synchronization rather than simple one-off copies. sftp opens an interactive SSH-based file-transfer session rather than a single copy operation. wget retrieves files over HTTP, HTTPS, or FTP and does not use SSH for encryption.
Q10. A developer distributes their application as a single self-contained executable that runs on virtually any modern Linux system without requiring installation. Which packaging format is being used?
Correct answer: C. AppImage
AppImage bundles an application and all its dependencies into one portable executable file. Users download it, make it executable, and run it on almost any Linux distribution without installation. tar.gz and zip are generic archive formats and provide no built-in portability or runtime isolation. pkg is a macOS packaging format and is not applicable to Linux distributions.
Exam facts and objectives sourced from the official CompTIA certification page. Last reviewed June 2026.
Ready for the full CompTIA Linux+ bank? Start free.
1,249 questions, timed mock exams, and missed-question review — 30 free questions, no card.
Start free trial