15 RHCSA Lab Exercises You Must Try Before Your Exam
Published On: 15 August 2025
Objective
The goals of the Red Hat Certified System Administrator (RHCSA) exam are performance-based assignments meant to assess your practical skills in managing Linux systems. RHCSA calls for you to actually complete real-world tasks on live systems, unlike conventional multiple-choice tests. These goals address basic areas including user management, file permissions, storage configuration, networking, and system security. Since the exam environment replics real-world workplace situations where you must troubleshoot, configure, and effectively manage Red Hat Enterprise Linux systems under time pressure, mastering these objectives through hands-on lab practice is absolutely essential.
The 15 Critical RHCSA Lab Exercises
Lab 1: Reset Root Password from GRUB
- Objective: Learn master system recovery methods by resetting lost root passwords with GRUB rescue mode.
- Every Linux administrator should possess fundamental system recovery techniques taught in this lab. You'll pick up boot into single-user mode, write permission remount of the filesystem, and safe root password change techniques. Access to emergency systems depends on this ability, which also shows that you grasp the Linux boot process.
- Key Tasks:
- Turn on single-user mode:
- Access GRUB menu during boot by pressing e to edit boot parameters.
- Locate the line starting with linux and append single or init=/bin/bash to boot into single-user mode.
- Remount filesystem:
- After entering single-user mode, use the command mount -o remount,rw / to enable write permissions on the root filesystem.
- Verify the remount status using mount | grep ' / '.
- Change root password:
- Use the command passwd to set a new root password.
- Ensure the password adheres to your system's security policies.
- Restore SELinux contexts:
- Run touch /.autorelabel to trigger automatic SELinux relabeling on the next reboot.
- Reboot the system with reboot to apply the SELinux contexts.
- Turn on single-user mode:
- Practice Lab: Reset RHEL Password
Lab 2: Create, Modify & Delete Users and Groups
- Objective: Master complete user account lifecycle management including creation, change, and deletion with particular characteristics.
- Linux system management and security depend on user management in a fundamental sense. This lab manages account expiration, adds users to secondary groups, generates users with particular UIDs and GIDs, and limits user access. You will also pick up skills in password policy management and account lock/unlock.
- Key Tasks:
- Custom attributes for useradd:
- Use the useradd command with options like -u for setting user ID (UID), -g for setting primary group ID (GID), and -c for adding comments or descriptions for the user.
- Example:
useradd -u 1001 -g 1001 -c "New User" username
- usermod for account changes:
- Use usermod to modify an existing user account, including changing home directories (-d), adding users to secondary groups (-G), or updating login shells (-s).
- Example:
usermod -d /home/newdir -s /bin/bash username
- userdel for removal:
- Delete user accounts using userdel, optionally with the -r flag to remove the user's home directory and mail spool.
- Example:
userdel -r username
- Group management with groupadd and gpasswd:
- Create new groups with groupadd and assign users to them using usermod -G.
- Manage group passwords and administrative settings using gpasswd.
- Example:
andgroupadd newgroup
gpasswd -a username newgroup
- Custom attributes for useradd:
- Practice Lab: Manage Local Users and Groups
Lab 3: File Permissions, Ownership & Special Modes
- Objective: For complete access control, setuid, setgid, and sticky bit standards and advanced file permissions.
- Linux security is built mostly on file permissions. While learning special permissions like setuid, setgid, and sticky bit, this lab helps you to properly use chmod, chown, and chgrp. Maintaining safe systems depends on one knowing permission inheritance and access control.
- Key Tasks:
- chmod 755:
- Use the chmod command to set file permissions. The mode 755 sets read, write, and execute permissions for the owner and read and execute permissions for others.
- Example:
chmod 755 filename
- Changes in chown user:group ownership:
- Change the ownership of a file or directory to a specific user and group using the chown command.
- Example:
chown user:group filename
- Setuid/setgid implementation:
- Setuid allows a program to run with the privileges of the file owner. Use chmod u+s to set this.
- Setgid allows files in a directory to inherit the group of the directory. Use chmod g+s to enable this.
- Example:
orchmod u+s program
chmod g+s directory
- Sticky bit configuration for shared directories:
- Enable the sticky bit to restrict file deletion to the file owner in shared directories.
- Use chmod +t to set the sticky bit.
- Example:
chmod +t /shared/directory
- chmod 755:
- Practice Lab: Control Access to Files
Lab 4: Configure and Mount Local Partitions
- Objective: Create, format, and persistently mount filesystem partitions for storage management.
- System extension and organization depend on effective storage management. Using fdisk or parted for partition creation, formatting with xfs or ext4 filesystems, and configuring persistent mounting through /etc/fstab, this lab addresses proper management of system storage depends on these basic abilities.
- Key Tasks:
- fdisk partition creation:
- Use fdisk to create, delete, or modify partitions on a disk.
- Example:
fdisk /dev/sda
- mkfs.xfs formatting:
- Format the partition with the desired filesystem using mkfs.xfs or mkfs.ext4.
- Example:
mkfs.xfs /dev/sda1
- /etc/fstab configuration:
- Modify the /etc/fstab file to ensure partitions are mounted persistently across reboots.
- Example: Add an entry like
/dev/sda1 /mnt/data xfs defaults 0 0
- Mount verification:
- Use the mount command to manually mount partitions and verify with df -h.
- fdisk partition creation:
- Practice Lab: Manage Basic Storage
Lab 5: Set Up File Permissions with ACLs
- Objective: For sophisticated permission scenarios, apply fine-grained access control with Access Control Lists.
- Access Control Lists (ACL) provide advanced permission management that goes beyond conventional Unix permissions. Essential for corporate environments where standard permissions are insufficient, this lab teaches you to use setfacl and getfacl for building sophisticated access control schemes.
- Key Tasks:
- setfacl -m u:user:rwx:
- Modify the ACL of a file or directory to grant specific permissions to a user.
- Example:
setfacl -m u:john:rwx /path/to/file
- setfacl -m g:group:rx:
- Set group-specific permissions using ACLs.
- Example:
setfacl -m g:admins:rx /path/to/file
- getfacl verification:
- Check the ACL of a file or directory using the getfacl command.
- Example:
getfacl /path/to/file
- Default ACL configuration:
- Set default ACLs to automatically apply to new files or directories within a directory.
- Example:
setfacl -m d:u:john:rw /path/to/dir
- setfacl -m u:user:rwx:
- Practice Lab: Controlling Access to Files with ACL
Lab 6: Manage Swap Space
- Objective: Create and set up virtual memory management swap partitions or files.
- System performance and memory control depend on swap space. This lab guarantees constant configuration, creates swap partitions and files, activates them with swapon. Good swap control enhances performance under memory pressure and helps to avoid system failures.
- Key Tasks:
- Create a Swap File with dd:
- Use the dd command to create a file of the desired size for use as swap space.
- Example:
dd if=/dev/zero of=/swapfile bs=1M count=1024
- Format the Swap File with mkswap:
- Prepare the file as a swap space using mkswap.
- Example:
mkswap /swapfile
- Activate the Swap Space with swapon:
- Enable the newly created swap space.
- Example:
swapon /swapfile
- Ensure Persistence Across Reboots:
- Add an entry for the swap file in /etc/fstab.
- Example:
echo '/swapfile none swap defaults 0 0' >> /etc/fstab
- Create a Swap File with dd:
- Practice Lab: Manage Basic Storage
Lab 7: Install, Update, and Remove Packages Using DNF
- Objective: Manage software packages and repositories using DNF package manager for system maintenance.
- Maintaining and upgrading Linux systems depends on good package management. This lab covers managing repositories, using DNF history for rollbacks, installing, updating, and deleting software packages. Software lifespans and system maintenance depend on these abilities.
- Key Tasks:
- Install Software Packages:
- Use the dnf install command to install a software package.
- Example:
dnf install package_name
- Update Installed Software:
- Use dnf update to update installed packages and dependencies.
- Example:
dnf update
- Remove Unneeded Software:
- Use dnf remove to uninstall software packages.
- Example:
dnf remove package_name
- Repository Configuration:
- Configure and enable repositories using DNF configuration files.
- DNF History Management:
- Use dnf history to view, undo, or redo package changes.
- Example:
dnf history list
- Install Software Packages:
- Practice Lab: Install and Update Software
Lab 8: Configure Networking (nmcli + nmtui)
- Objective: Create DNS setups, static IP addresses, and network interfaces for system connectivity.
- Fundamental for system connectivity and communication is network configuration. This lab tests connectivity, assigns static IP addresses, configures network interfaces using nmcli and nmtui, and configures DNS resolution. Maintaining networked systems calls for these abilities.
- Key Tasks:
- Create New Connections with nmcli:
- Use nmcli con add to add a new connection with specific parameters.
- Example:
nmcli con add type ethernet con-name my-connection ifname eth0
- Assign Static IP Addresses:
- Use nmcli or nmtui to set a static IP address for a connection.
- Example:
nmcli con mod my-connection ipv4.addresses 192.168.1.10/24 ipv4.method manual
- Configure DNS:
- Set DNS servers for a connection using nmcli.
- Example:
nmcli con mod my-connection ipv4.dns "8.8.8.8 8.8.4.4"
- Verify Connectivity:
- Test network connectivity using ping or nslookup.
- Example:
orping -c 4 8.8.8.8
nslookup www.example.com
- Create New Connections with nmcli:
- Practice Lab: Manage Networking
Lab 9: Manage Services with systemctl
- Objective: Control system services and daemons using systemd for service management.
- Linux system management is based fundamentally on service management. Learning to use systemctl for starting, stopping, enabling, and disabling services, checking service status, and evaluating service dependencies, this lab helps you. Managing modern Linux systems successfully depends on an awareness of systemd.
- Key Tasks:
- Start, Stop, or Restart Services:
- Use systemctl to manage service states.
- Example:
systemctl start apache2
orsystemctl stop apache2
systemctl restart apache2
- Enable or Disable Services:
- Set services to start or prevent them from starting automatically during boot.
- Example:
orsystemctl enable apache2
systemctl disable apache2
- Check Service Status:
- Use systemctl status to check if a service is active, inactive, or failed.
- Example:
systemctl status apache2
- Analyze Service Dependencies:
- Use systemctl list-dependencies to view dependent and required services.
- Example:
systemctl list-dependencies apache2
- Start, Stop, or Restart Services:
- Practice Lab: Control Services and Daemons
Lab 10: Use journald and Log Analysis
- Objective: Analyze system logs with journalctl and control log retention for troubleshooting.
- System monitoring and troubleshooting depend on log analysis. Understanding log rotation, implementing efficient log management techniques, and covering using journalctl for filtering logs by service, time, and priority levels, this lab addresses maintaining system health and diagnosing problems depend on these abilities.
- Key Tasks:
- Filter Logs by Service:
- Use journalctl -u to view logs related to a specific service.
- Example:
journalctl -u apache2
- Perform Time-Based Log Queries:
- Retrieve logs for a specific time range using journalctl with time options.
- Example:
journalctl --since "2023-01-01" --until "2023-01-31"
- Filter by Priority Levels:
- Use journalctl -p to filter logs based on priority levels.
- Example:
(for error-level logs)journalctl -p err
- Configure Log Retention:
- Modify journald configuration in /etc/systemd/journald.conf to control log retention.
- Example: Set
to limit journal size.SystemMaxUse=50M
- Filter Logs by Service:
- Practice Lab: Analyze and Store Logs
Lab 11: Configure and Use SELinux
- Objective: Manage SELinux security contexts and policies for enhanced system security.
- Red Hat's security approach depends on SELinux. This lab teaches you to restore contexts with restorecon, control SELinux modes, use semanage and chcon to modify security contexts, and troubleshoot SELinux-related problems. Maintaining secure Red Hat systems depends on an awareness of SELinux.
- Key Tasks:
- Manage Policies with semanage:
- Use semanage to add or modify SELinux policy rules.
- Example:
semanage fcontext -a -t httpd_sys_content_t '/var/www/html(/.*)?'
- Restore Contexts with restorecon:
- Restore SELinux security contexts for files or directories.
- Example:
restorecon -Rv /var/www/html
- Temporary Changes with chcon:
- Change SELinux contexts temporarily using chcon.
- Example:
chcon -t httpd_sys_content_t /var/www/html/index.html
- Configure SELinux Booleans:
- Enable or disable SELinux boolean values to adjust policy behavior.
- Example:
setsebool -P httpd_enable_homedirs on
- Manage Policies with semanage:
- Practice Lab: Managing SELinux Security
Lab 12: Create and Manage LVM
- Objective: Implement Logical Volume Management for flexible and scalable storage solutions.
- LVM offers sophisticated storage management features needed in business settings. Covering building physical volumes, volume groups, and logical volumes, this lab extends and reduces filesystems, manages LVM snapshots. Dynamic storage management calls for these kinds of abilities.
- Key Tasks:
- Create Physical Volumes:
- Use pvcreate to initialize disks or partitions as physical volumes.
- Example:
pvcreate /dev/sdb1
- Create Volume Groups:
- Combine physical volumes into a volume group using vgcreate.
- Example:
vgcreate vg_name /dev/sdb1
- Create Logical Volumes:
- Create logical volumes within a volume group using lvcreate.
- Example:
lvcreate -L 10G -n lv_name vg_name
- Extend and Reduce Filesystems:
- Resize logical volumes and filesystems with lvextend, resize2fs, or xfs_growfs.
- Example:
lvextend -L +5G /dev/vg_name/lv_name
- Create Physical Volumes:
- Practice Lab: Manage Logical Volume
Lab 13: Auto-Mount NFS and SMB Shares
- Objective: Configure automatic mounting of network storage for shared file access.
- Networked environments depend on good management of network storage. This lab guides you through the process of configuring NFS and SMB shares, utilizing autofs to enable automatic mounting, and troubleshooting network storage connectivity. Managing shared storage resources calls for these kinds of abilities.
- Key Tasks:
- Configure NFS Mounts:
- Mount NFS shares manually or persistently via /etc/fstab.
- Example:
mount -t nfs server:/share /mnt
- Configure SMB Mounts:
- Mount SMB/CIFS shares manually or persistently using mount.cifs.
- Example:
mount -t cifs -o username=user //server/share /mnt
- Setup Autofs for Auto-Mounting:
- Configure /etc/auto.master and /etc/auto.misc for autofs-based automatic mounting.
- Test and Troubleshoot:
- Verify mounts using mount or df -h and troubleshoot issues.
- Configure NFS Mounts:
- Practice Lab: Access Network Attached Storage
Lab 14: Configure and Secure SSH
- Objective: Set up secure SSH access, configure key-based authentication, and implement SSH security best practices.
- Safe remote system management depends fundamentally on SSH configuration. This lab shows you how to disable password authentication, set SSH security features including port changes and access restrictions, implement key-based authentication, and configure SSH daemon settings. Maintaining safe remote access to Linux systems calls for these abilities.
- Key Tasks:
- Generate SSH Keys:
- Use ssh-keygen to create SSH key pairs for key-based authentication.
- Example:
ssh-keygen -t rsa -b 2048
- Modify SSH Configuration:
- Edit /etc/ssh/sshd_config for security settings like disabling password authentication and changing the SSH port.
- Set Up Key-Based Authentication:
- Copy public keys to remote servers using ssh-copy-id or manually.
- Example:
ssh-copy-id user@host
- Implement SSH Security Hardening:
- Apply additional security measures like restricting user access and enabling fail2ban.
- Generate SSH Keys:
- Practice Lab: Configure and Secure SSH
Lab 15: Manage Network Security (Firewall)
- Objective: Configure firewall rules using firewalld to control network traffic and enhance system security.
- Control of access and network security depends on firewall management. This lab addresses creating and managing firewall zones using firewalld, configuring service access rules, applying port forwarding, and handling rich rules for sophisticated traffic control. Securing networked Linux systems depends on knowing firewall configuration.
- Key Tasks:
- Manage Firewall Rules:
- Use firewall-cmd to add or remove rules.
- Example:
firewall-cmd --add-service=http --permanent
- Configure Firewall Zones:
- Assign specific interfaces or sources to zones.
- Example:
firewall-cmd --zone=public --add-interface=eth0
- Manage Services and Ports:
- Enable or disable services and open/close ports.
- Example:
firewall-cmd --add-port=8080/tcp
- Apply Rich Rules:
- Create custom firewall rules using rich rule syntax.
- Example:
firewall-cmd --add-rich-rule='rule family=ipv4 source address=192.168.1.100/24 service name=http accept'
- Manage Firewall Rules:
- Practice Lab: Manage Network Security (Firewall)
Why Hands-On Practice is Non-Negotiable
There are no multiple-choice questions or theoretical assessments on the 100% performance-based RHCSA test. On live Red Hat Enterprise Linux systems, you have almost three hours to finish real-world system management chores. This structure suggests:
-
Memory and Muscle Memory Matter : You have to recall command syntax free of autocomplete help. Essential are fast typing and accurate command execution. Regular practice develops the muscle memory required for success on tests.
-
Time Pressure is Real : Many difficult chores have to be finished within a limited time. Effective navigation among the material is absolutely vital. Only great hands-on experience will enable speed.
-
Troubleshooting Skills are TestedThings will go wrong during practice; this is a great teaching tool. Essential are debugging techniques and error recovery ability. Real-world situations call for both flexibility and creative problem-solving.
Conclusion
Although the basis of RHCSA exam success is these 15 lab exercises, practice quality counts more than number. Emphasize on grasping the fundamental ideas and developing useful skills by repeated application.Start with the free labs to see the difference that appropriate hands-on experience makes by visiting RHCSA.GURU. Join hundreds of qualified RHCSA candidates who have passed their certification on the first try by using these exact lab exercises. The RHCSA test measures your capacity for action rather than knowledge. Every command you learn, every error you fix, and every successful configuration you complete advances you one step toward certification as a Red Hat System Administrator.