CompTIA Linux+ Certification Exam Practice Test
Linux system administration centers on managing files, users, processes, services, storage, and network settings from the command line. Practice scenarios cover tasks such as checking disk usage, setting file ownership, extracting archives, inspecting systemd services, following logs, and identifying interface addresses. These skills support routine configuration and troubleshooting on Linux hosts.
Exam overview
About the CompTIA Linux+ Certification Exam
Effective administration requires choosing commands that reveal the right system state and applying changes with appropriate scope. File tasks include creating directories, managing ownership and permissions, and using shell redirection without overwriting existing data. Storage work involves interpreting human-readable directory sizes and handling compressed tar archives. For service troubleshooting, administrators inspect systemd status and recent failure details, then correlate those findings with application logs. Network configuration calls for distinguishing interface addresses, DHCP-provided settings, and resolver configuration, including the role of `/etc/resolv.conf` in specifying DNS nameservers. Understanding command output and configuration files helps narrow faults before making changes, while attention to paths, options, and privileges reduces operational mistakes.
Sample Practice Questions
Review a selection from this exam's published US Practice Tests practice bank.
A Linux system must resolve hostnames using a DNS server, but its configured resolver settings may direct queries elsewhere. Which file commonly specifies resolver nameserver addresses?
Show answer
Correct answer: A`/etc/resolv.conf` commonly contains resolver configuration such as `nameserver` entries. On some systems it is generated or managed by another network service, so direct edits may not persist.
An administrator wants to see the amount of space used by each immediate subdirectory of `/var/cache`, with sizes displayed in human-readable units. Which command is appropriate?
Show answer
Correct answer: A`du` reports disk usage for files and directories; `--max-depth=1` limits the report to the target and its immediate children. `df` reports filesystem capacity, `ls` lists directory entries, and `free` reports memory usage.
A Linux host is configured to obtain an IPv4 address and network settings automatically from a DHCP server. What information does DHCP commonly provide in addition to the address?
Show answer
Correct answer: ADHCP commonly supplies network configuration such as an IP address, subnet mask or prefix, default gateway, and DNS server information. It does not provide local account credentials, package data, or disk identifiers.
A user needs to unpack a gzip-compressed tar archive named `logs.tar.gz` into the current directory. Which command is appropriate?
Show answer
Correct answer: AThe tar options `-x` extract, `-z` handle gzip compression, and `-f` specify the archive file. Option B creates an archive, while gzip alone decompresses the stream without extracting the tar members.
A systemd-managed service is failing to start, and an administrator wants a concise summary of its current state and recent failure information. Which command is appropriate?
Show answer
Correct answer: Asystemctl status displays a unit's state and typically includes recent log lines and details useful for initial troubleshooting. The other commands reload unit definitions, show dependency relationships, or apply preset policies.
Which command creates a new directory named `archive` inside the current directory?
Show answer
Correct answer: B`mkdir` creates directories. `touch` creates or updates a file, `rmdir` removes an empty directory, and `ln` creates links.
Which command changes the owner of `report.txt` to user `alex`?
Show answer
Correct answer: B`chown` changes file ownership. `chmod` changes permission bits, `chgrp` changes the group, and `umask` controls default permissions for newly created files.
How to use this practice test
Access the Linux+ practice questions for free. Each session presents up to 20 random questions from the available bank, with results shown after the session. Use missed items to identify command syntax or system concepts to revisit, such as resolver configuration, service status, file ownership, or log monitoring.
Preparation tips
- Practice `du` options for summarizing immediate subdirectories and displaying sizes in human-readable units.
- Compare `systemctl status` output with `journalctl` entries when investigating a service that fails to start.
- Review ownership and permission commands, including how `chown` targets users and how redirection operators affect existing files.
- Work through archive and log tasks using `tar` extraction options and `tail -f` for following new entries.
- Trace basic host networking by checking interface addresses, DHCP-provided settings, and nameserver entries in `/etc/resolv.conf`.