Free RHCSA Practice Questions
10 free, exam-style Red Hat Certified System Administrator (RHCSA) (RHCSA) practice questions with answers and
explanations. No signup required. Work through them below, then take the
full free RHCSA practice test to study every exam domain.
Question 1
You run `lvextend -L +2G /dev/vgdata/lvweb` on a mounted XFS logical volume. The command succeeds, but `df -h` still shows the old size. What is the correct next step?
- Run `resize2fs /dev/vgdata/lvweb` to grow the filesystem
- Unmount and remount the volume to refresh the reported size
- Reboot so the kernel re-reads the new logical volume size
- Run `xfs_growfs /dev/vgdata/lvweb` to grow the filesystem
Show answer & explanation
Correct answer: D - Run `xfs_growfs /dev/vgdata/lvweb` to grow the filesystem
Question 2
After booting into the `rd.break` shell to reset the root password, you remount /sysroot read-write, chroot into it, and successfully run `passwd`. After rebooting, the new password is rejected. What was almost certainly skipped?
- Rebuilding the boot configuration with `grub2-mkconfig`
- Creating `/.autorelabel` so SELinux relabels /etc/shadow on boot
- Setting `SELINUX=disabled` in /etc/selinux/config before reboot
- Adding `enforcing=0` permanently to the GRUB kernel line
Show answer & explanation
Correct answer: B - Creating `/.autorelabel` so SELinux relabels /etc/shadow on boot
Question 3
You add a firewall rule with `firewall-cmd --permanent --add-service=http`, but connections to the web server are still refused. Everything else about the server is correct. What is the most likely reason?
- The change was saved to disk but is not yet active - you must reload
- The rule needs an explicit `--zone=public` or it is silently ignored
- HTTP requires a port rule because service names are not supported
- firewalld must be restarted with systemctl before services load
Show answer & explanation
Correct answer: A - The change was saved to disk but is not yet active - you must reload
Question 4
User `jorge` currently belongs to the supplementary groups `developers` and `wheel`. You run `usermod -G project jorge`. What is the result?
- jorge is added to `project` while keeping `developers` and `wheel`
- The command fails because `-G` requires an existing membership list
- jorge's supplementary groups are replaced by only `project`
- jorge is added to `project` but removed only from `wheel`
Show answer & explanation
Correct answer: C - jorge's supplementary groups are replaced by only `project`
Question 5
A web service must serve files from a custom directory /webdata. Content copied there returns 'Permission denied' even though standard permissions are correct and SELinux is enforcing. Which approach sets the correct context so it PERSISTS across a full filesystem relabel?
- Relabel once with `chcon -R -t httpd_sys_content_t /webdata`
- Temporarily run `setenforce 0` so the service can read the files
- Add a rule with `semanage fcontext` then apply it with `restorecon`
- Open access completely using `chmod -R 777 /webdata`
Show answer & explanation
Correct answer: C - Add a rule with `semanage fcontext` then apply it with `restorecon`
Question 6
You must add a mounted filesystem to /etc/fstab so it mounts at boot. Which device identifier is the most robust choice, and what command safely tests the entry before you reboot?
- Use the /dev/sdb1 device name; test it by rebooting immediately
- Use the UUID from `blkid`; test the entry with `mount -a`
- Use the /dev/mapper path; test with `systemctl daemon-reload`
- Use only the partition label; confirm the result with `df -h`
Show answer & explanation
Correct answer: B - Use the UUID from `blkid`; test the entry with `mount -a`
Question 7
A service is running now after `systemctl start chronyd`, but the grader reports it fails to run after reboot. Which single command satisfies both 'running now' and 'starts automatically at boot'?
- `systemctl reload chronyd`
- `systemctl enable --now chronyd`
- `systemctl restart chronyd`
- `systemctl mask chronyd`
Show answer & explanation
Correct answer: B - `systemctl enable --now chronyd`
Question 8
A database must listen on TCP port 3333 instead of its default. SELinux is enforcing and blocks the service from binding to that port. Which command allows the service to bind there?
- Open the port with `firewall-cmd --add-port=3333/tcp --permanent`
- Label the port with `semanage port -a -t mysqld_port_t -p tcp 3333`
- Toggle a boolean with `setsebool -P nis_enabled on`
- Restore the config context with `restorecon -v /etc/my.cnf`
Show answer & explanation
Correct answer: B - Label the port with `semanage port -a -t mysqld_port_t -p tcp 3333`
Question 9
You need a shared directory where any file created by a member of the `qa` group automatically belongs to the `qa` group. After setting group ownership, which permission setting achieves this inheritance?
- Apply the sticky bit with `chmod 1775 /shared`
- Apply the setuid bit with `chmod 4775 /shared`
- Apply the setgid bit with `chmod 2775 /shared`
- Use standard permissions with `chmod 0775 /shared`
Show answer & explanation
Correct answer: C - Apply the setgid bit with `chmod 2775 /shared`
Question 10
You configure a `.repo` file in /etc/yum.repos.d/ pointing at an internal mirror, but `dnf install` fails with a GPG-related error. The mirror provides no signing key. Which setting in the repo file lets installation proceed?
- Disable the repository by setting `enabled=0`
- Turn off signature checking by setting `gpgcheck=0`
- Tolerate outages by setting `skip_if_unavailable=1`
- Disable certificate checks by setting `sslverify=0`
Show answer & explanation
Correct answer: B - Turn off signature checking by setting `gpgcheck=0`
What's on the RHCSA exam
The Red Hat Certified System Administrator (RHCSA) (RHCSA) exam is organized into 1 knowledge domains. These free practice questions are drawn from across them so you can see where you're strong and where to study:
- System administration tasks grouped into competency categories (essential tools; operate running systems; configure local storage; create and configure file systems; deploy, configure, and maintain systems; manage users and groups; manage security; manage containers)