10 free, exam-style Linux Plus (Linux Plus) practice questions with answers and
explanations. No signup required. Work through them below, then take the
full free Linux Plus practice test to study every exam domain.
These 10 free Linux Plus questions are organized by exam domain, so you can see how each part of the Linux Plus blueprint is tested. Reveal the answer and explanation under each question.
Domain 1: System Management 23% of exam
Question 1
A systems administrator needs to add 20GB to an existing ext4 logical volume named lv_data in volume group vg_storage. A new physical disk /dev/sdc1 has been prepared. Which sequence of commands correctly extends the logical volume and resizes the filesystem?
- vgextend vg_storage /dev/sdc1 && lvextend -L +20G /dev/vg_storage/lv_data && xfs_growfs /dev/vg_storage/lv_data
- pvcreate /dev/sdc1 && lvextend -L +20G /dev/vg_storage/lv_data && resize2fs /dev/vg_storage/lv_data
- pvcreate /dev/sdc1 && vgextend vg_storage /dev/sdc1 && lvextend -L +20G /dev/vg_storage/lv_data && xfs_growfs /dev/vg_storage/lv_data
- pvcreate /dev/sdc1 && vgextend vg_storage /dev/sdc1 && lvextend -L +20G /dev/vg_storage/lv_data && resize2fs /dev/vg_storage/lv_data
Show answer & explanation
Correct answer: D - pvcreate /dev/sdc1 && vgextend vg_storage /dev/sdc1 && lvextend -L +20G /dev/vg_storage/lv_data && resize2fs /dev/vg_storage/lv_data
Question 2
A system crontab entry reads:
*/10 8-18 * * 1-5 /opt/scripts/monitor.sh
How often and when does this job run?
- At 10 minutes past every hour from 8 AM to 6 PM, Monday through Friday
- Every 10 minutes between 8:00 AM and 6:59 PM, seven days a week
- Once at 8:10 AM and once at 6:10 PM, Monday through Friday
- Every 10 minutes between 8:00 AM and 6:59 PM, Monday through Friday
Show answer & explanation
Correct answer: D - Every 10 minutes between 8:00 AM and 6:59 PM, Monday through Friday
Domain 2: Services and User Management 20% of exam
Question 3
An Apache web server on a RHEL system returns 403 Forbidden errors when serving content from /web/app. The directory has 755 permissions, is owned by the apache user, and the service is running. SELinux is set to enforcing. Which approach permanently resolves this issue?
- Run chcon -R -t httpd_sys_content_t /web/app
- Run semanage fcontext -a -t httpd_sys_content_t '/web/app(/.*)?' then restorecon -Rv /web/app
- Run setsebool -P httpd_enable_homedirs on
- Edit /etc/selinux/config and set SELINUX=permissive
Show answer & explanation
Correct answer: B - Run semanage fcontext -a -t httpd_sys_content_t '/web/app(/.*)?' then restorecon -Rv /web/app
Question 4
A shared project directory /opt/projects has permissions set to 2770. What effect does the special permission bit have on this directory?
- Only the file owner or root can delete files within the directory
- Any executable file created in the directory runs with root privileges
- All users on the system are granted read access to the directory
- New files and subdirectories inherit the group ownership of the parent directory
Show answer & explanation
Correct answer: D - New files and subdirectories inherit the group ownership of the parent directory
Question 5
A junior administrator runs the following command to add user jdoe to the developers group:
usermod -G developers jdoe
Shortly after, jdoe reports being unable to access shared files that worked previously. What is the MOST likely cause?
- The -G flag without -a replaced all of jdoe's supplementary groups with only developers
- The developers group does not exist yet and must be created first with groupadd
- The usermod command requires a system reboot before group changes are applied
- The jdoe account was locked automatically as a security precaution during modification
Show answer & explanation
Correct answer: A - The -G flag without -a replaced all of jdoe's supplementary groups with only developers
Domain 3: Security 18% of exam
Question 6
A bash script contains the following line:
grep -i 'error' /var/log/app.log 2>/dev/null | wc -l
What does this command produce as output?
- All lines containing 'error' from the log file, with error messages suppressed
- A count of lines containing 'error', with any grep error messages discarded
- The word 'error' replaced with null characters throughout the log file
- A count of all lines in the log file that do not contain 'error'
Show answer & explanation
Correct answer: B - A count of lines containing 'error', with any grep error messages discarded
Question 7
An administrator needs to deploy an nginx container that runs in the background, maps host port 8080 to container port 80, and is named webserver. Which command accomplishes this?
- docker create -d -p 80:8080 --name webserver nginx
- docker start -d -p 8080:80 --name webserver nginx
- docker run -d -p 8080:80 --name webserver nginx
- docker run -it -p 8080:80 --name webserver nginx
Show answer & explanation
Correct answer: C - docker run -d -p 8080:80 --name webserver nginx
Domain 4: Automation, Orchestration, and Scripting 17% of exam
Question 8
A Linux virtual machine is responding slowly. The output of top shows the following CPU time breakdown:
%us 8.2, %sy 2.4, %id 1.1, %wa 2.0, %st 86.3
What is the MOST likely cause of the performance degradation?
- The hypervisor is not providing sufficient CPU time to this VM
- A runaway process is consuming all available CPU cycles
- The disk subsystem is creating an I/O bottleneck
- The system is swapping heavily due to memory exhaustion
Show answer & explanation
Correct answer: A - The hypervisor is not providing sufficient CPU time to this VM
Question 9
A production server is unable to create new files or directories. The df -h command shows 35% disk space usage. Which command should the administrator run FIRST?
- fsck /dev/sda1
- iostat -x 1
- df -i
- du -sh /* | sort -rh
Show answer & explanation
Correct answer: C - df -i
Question 10
After a system reboot, a custom service app.service fails to start. Its unit file includes:
[Unit]
Requires=postgresql.service
After=network-online.target
Investigation reveals that postgresql.service failed during startup. What is the expected behavior of app.service?
- It starts regardless since After is the only ordering directive present
- It will not start because Requires enforces a hard dependency on postgresql
- It starts in a limited mode and waits for postgresql to recover
- It queues itself to retry automatically once postgresql becomes active
Show answer & explanation
Correct answer: B - It will not start because Requires enforces a hard dependency on postgresql
The rest of the Linux Plus blueprint
The Linux Plus exam also covers these domains. Drill them in the full free practice test:
- Domain 5: Troubleshooting 22% of exam