Top 20 RHCSA Practice Questions (2026)
Published On: 15 May 2026
Objective
The RHCSA gives you a live system and 2.5 hours. No multiple choice. You either type the right commands or you don't pass. This guide covers 20 exam-style tasks across every major topic: user management, file permissions, storage, SELinux, systemd, networking, package management, and boot recovery. Work through each question on a real Linux system. Reading the answers is not practice.
Practice on a real RHEL environment, no VM setup needed → https://linuxcert.guru/?name=rhcsa-mock-exam
User and Group Management: Questions 1 to 4
Question 1
Create a user named alice with the following properties:
- UID: 1500
- Home directory:
/home/alice - Login shell:
/bin/bash
Verify the user was created correctly.
useradd -u 1500 -d /home/alice -s /bin/bash -m alice
id alice
-u sets UID, -d sets home directory, -s sets shell, -m creates the home directory.
Question 2
Configure the password aging policy for user alice so that:
- The password expires after 90 days
- The user receives a warning 7 days before expiry
Confirm the policy is applied.
chage -M 90 -W 7 alice
chage -l alice
Question 3
Perform the following tasks:
- Create a group named
developers - Create the directory
/data/devteam - Set group ownership of
/data/devteamtodevelopers - Configure the directory so that all new files created inside it automatically inherit the group ownership
groupadd developers
mkdir -p /data/devteam
chown :developers /data/devteam
chmod g+s /data/devteam
ls -ld /data/devteam
Note: The SGID bit (g+s) makes new files inherit the group. Confirm s appears in the permissions output.
Question 4
Lock the user account bob so that he cannot log in. Verify the account is locked. Then unlock the account and verify again.
# Lock
usermod -L bob
passwd -S bob # shows LK status
# Unlock
usermod -U bob
passwd -S bob # shows PS status
File Permissions and Special Bits: Questions 5 to 7
Question 5
Grant user carol read and write access to the file /var/data/report.txt. Do not change the file's owner or group. Verify the ACL is set correctly.
setfacl -m u:carol:rw /var/data/report.txt
getfacl /var/data/report.txt
Question 6
Find all files on the system that have the SUID permission bit set. Save the full list of file paths to /root/suid_files.txt. Suppress any permission denied errors.
find / -perm /4000 -type f 2>/dev/null > /root/suid_files.txt
cat /root/suid_files.txt
Question 7
Configure the system so that all new files created by any user have default permissions of 644 and new directories have default permissions of 755. The setting must apply system-wide and persist across reboots.
echo "umask 022" >> /etc/profile
umask
Storage and LVM: Questions 8 to 10
Important: Storage and SELinux together account for more exam failures than any other topics. Don't just read these, type every command.
Question 8
Using the disk /dev/sdb, complete the following:
- Create a physical volume on
/dev/sdb - Create a volume group named
vg_datausing that physical volume - Create a logical volume named
lv_storagewith a size of 2GB invg_data - Format the logical volume with the XFS filesystem
- Mount it persistently at
/mnt/storage - Verify the mount is active
pvcreate /dev/sdb
vgcreate vg_data /dev/sdb
lvcreate -L 2G -n lv_storage vg_data
mkfs.xfs /dev/vg_data/lv_storage
mkdir /mnt/storage
echo "/dev/vg_data/lv_storage /mnt/storage xfs defaults 0 0" >> /etc/fstab
mount -a
df -h /mnt/storage
Question 9
Extend the logical volume lv_storage by 1GB. The filesystem must be resized as well. The volume must remain mounted during the operation.
lvextend -L +1G /dev/vg_data/lv_storage
xfs_growfs /mnt/storage
df -h /mnt/storage
Note: For ext4 filesystems, use resize2fs instead of xfs_growfs.
Question 10
Configure /dev/sdc as a swap partition with a size of 512MB. Activate it immediately and ensure it is activated automatically on every boot.
mkswap /dev/sdc
swapon /dev/sdc
echo "/dev/sdc swap swap defaults 0 0" >> /etc/fstab
swapon --show
SELinux: Questions 11 to 12
Important: Most candidates under-practice SELinux because it feels unfamiliar. It's also where the exam applies the most pressure. These two questions cover the patterns that appear most often.
Question 11
Configure SELinux so that the directory /webdata and all files within it are labeled with the Apache web content context (httpd_sys_content_t). The context must survive a full filesystem relabel.
semanage fcontext -a -t httpd_sys_content_t "/webdata(/.*)?"
restorecon -Rv /webdata
ls -lZ /webdata
Question 12
Configure SELinux to allow the Apache web server to make network connections. The change must be persistent across reboots. Verify the boolean is enabled.
getsebool -a | grep httpd_can_network
setsebool -P httpd_can_network_connect on
getsebool httpd_can_network_connect
Systemd and Services: Questions 13 to 14
Question 13
Create a systemd service unit named backup.service with the following requirements:
- It must execute the script
/usr/local/bin/backup.sh - It must start after the network is available
- It must be enabled to start automatically at boot
- The service type must be
oneshot
Enable and start the service, then verify its status.
cat > /etc/systemd/system/backup.service << EOF
[Unit]
Description=Daily Backup Service
After=network.target
[Service]
ExecStart=/usr/local/bin/backup.sh
Type=oneshot
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable backup.service
systemctl start backup.service
systemctl status backup.service
Question 14
Configure the system to boot into multi-user mode (text mode, no graphical interface) by default. The setting must persist across reboots. Verify the default target.
systemctl set-default multi-user.target
systemctl get-default
Networking and Scheduled Tasks: Questions 15 to 17
Question 15
Configure the network interface eth0 with a static IP address using the following values:
- IP address:
192.168.1.100/24 - Default gateway:
192.168.1.1 - DNS server:
8.8.8.8
The configuration must persist after reboot. Verify the interface is active with the correct address.
nmcli con mod eth0 ipv4.addresses 192.168.1.100/24
nmcli con mod eth0 ipv4.gateway 192.168.1.1
nmcli con mod eth0 ipv4.dns 8.8.8.8
nmcli con mod eth0 ipv4.method manual
nmcli con up eth0
ip addr show eth0
Question 16
Set the system hostname to rhcsa-server.example.com. The change must be persistent. Verify the hostname is set correctly.
hostnamectl set-hostname rhcsa-server.example.com
hostnamectl status
Question 17
Schedule a cron job for user alice that runs the script /usr/local/bin/cleanup.sh every day at 2:30 AM. Verify the cron job is saved correctly.
crontab -u alice -e
# Add this line:
30 2 * * * /usr/local/bin/cleanup.sh
crontab -u alice -l
Package Management and Boot Recovery: Questions 18 to 20
Question 18
Configure a local DNF repository using the RHEL installation ISO mounted at /mnt/cdrom. The repository must be enabled and usable for package installation. Verify the repository appears in the repo list.
cat > /etc/yum.repos.d/local.repo << EOF
[LocalRepo]
name=Local RHEL Repository
baseurl=file:///mnt/cdrom/BaseOS
enabled=1
gpgcheck=0
EOF
dnf repolist
dnf clean all
Question 19
Install PHP version 8.1 on the system using DNF module streams. Verify the correct version is installed after installation.
dnf module list php
dnf module enable php:8.1
dnf install php
php -v
Question 20
You do not know the root password for the system. Regain root access by resetting the root password using rescue mode. The system must boot normally after the password is changed and all services must function correctly.
# 1. Reboot. At GRUB menu, press 'e'
# 2. On the 'linux' line, append:
rd.break
# 3. Press Ctrl+X to boot
# 4. Remount the filesystem read-write
mount -o remount,rw /sysroot
chroot /sysroot
# 5. Change the password
passwd root
# 6. Trigger SELinux relabel
touch /.autorelabel
# 7. Exit and reboot
exit
exit
Critical: The SELinux relabel step is not optional. The password file was modified outside normal boot. SELinux will block login until contexts are corrected. Candidates who skip touch /.autorelabel change the password successfully and still cannot log in.
How to Use These Questions
- Don't read the solution first. Attempt each task from the description alone, then check your answer.
- Reset and repeat. After getting it right, wipe the environment and do it again from memory. Speed comes from repetition, not from understanding it once.
- Time yourself. You have 2.5 hours for 15 to 20 tasks on exam day. Practice under that pressure.
- Front-load SELinux and storage. Questions 8 to 12 fail the most candidates. Spend disproportionate time there.
Conclusion
These 20 questions cover the full range of what the RHCSA tests. None of them are theoretical. Every task maps directly to something you will be asked to do on a live system under time pressure. The candidates who fail aren't usually weak on Linux fundamentals. They run out of time on SELinux and storage because those topics take longer when you're not fluent with the commands. The fix is repetition, not more reading. Type each command until it's reflexive. Reset the environment. Do it again faster.
If you can complete all 20 of these tasks cleanly from memory in under two hours, you're ready.
Practice all questions in a live RHCSA environment, no VM setup needed → https://linuxcert.guru