Exam TechniqueLesson 1 of 2
Build the practice lab
Create two RHEL 10 machines with the extra disks, users and services the practice exam expects, and make them easy to reset.
virt-installqemu-imgvirsh snapshot-create-asvirsh snapshot-revertdnfuseraddnmclilsblk
After this lesson you can
- Describe the exam environment: two machines, no internet, documentation only, and a result that is checked after a reboot.
- Build node1 and node2 with the disks, names and baseline accounts used in the practice exam.
- Take a clean snapshot, and use a short script to confirm the lab is in its starting state.
The idea
The RHCSA is a hands-on, performance-based exam: you are given a live system and a list of tasks, and the result is judged by checking the system’s state. Red Hat describes it as real-world administration tasks on RHEL 10, with no internet access and no personal notes, but with the documentation that ships on the machine available. Confirm the exact format, duration and scoring on Red Hat’s exam page when you book, because they can change.
The consequences for how you practise:
- There is no multiple choice. Reading about a command does not count; running it correctly does.
- The machine is the answer sheet. Nothing you write in a text file is graded. A configuration that works now but vanishes at reboot scores zero.
- You work offline. Practise using
man,--helpand/usr/share/doc, never a browser. - You need two machines. Some tasks touch a second host (NFS, SSH between nodes, a firewall rule tested from the other side, resetting a password).
The lab in this course
| Machine | Address | Disks | Role |
|---|---|---|---|
node1 | 192.168.122.50 | vda system, vdb 2 GiB, vdc 1 GiB (unused) | Where almost all tasks are done |
node2 | 192.168.122.51 | vda system | The peer: NFS server, SSH target, second host for tests |
Use any network that lets the machines see each other. Names and addresses are only a convention; keep yours consistent and change the tasks if you differ.
Operating system. RHEL 10 is free for individual developers with a Red Hat account. AlmaLinux 10 and Rocky Linux 10 are rebuilds with the same commands, packages, defaults and file paths for everything in the RHCSA objectives, and they work for practice (they do not replace the real exam environment). Where a command differs, such as Red Hat subscription steps, the lessons say so.
What to put in the baseline
- Static IPv4 address, host names,
/etc/hostslines for both machines. - User
alex(passwordEx200!Lab) in thewheelgroup on both. - The installation ISO attached and mounted as a repository on both (lesson Configuring repositories), so installation works offline.
- Packages used by the exam tasks:
httpd,nfs-utils,autofs,tuned,chrony,policycoreutils-python-utils,setroubleshoot-server,flatpak,bind-utils,lvm2,at. - A snapshot named
clean.
Take the snapshot after step 5 and before attempting any exam. Reverting restores the same starting point for every attempt, which is also what makes practising honest: the second time you do the exam you cannot rely on leftovers from the first.
Try it
A baseline checker
Run this on each machine. It prints one PASS or FAIL per fact the exam expects to be true at the start.
#!/bin/bash
# Prints PASS/FAIL for the starting state of the practice lab.
check() { if eval "$2" &>/dev/null; then echo "PASS $1"; else echo "FAIL $1"; fi; }
check "host name is a FQDN" '[[ $(hostname) == *.lab.example ]]'
check "peer resolves" 'getent hosts node2 || getent hosts node1'
check "user alex exists, in wheel" 'id -nG alex | grep -qw wheel'
check "repositories configured" '[ "$(dnf repolist -q | wc -l)" -ge 3 ]'
check "SELinux is enforcing" '[ "$(getenforce)" = Enforcing ]'
check "firewalld is running" 'firewall-cmd --state'
check "chronyd installed" 'rpm -q chrony'
if [[ $(hostname) == node1* ]]; then
check "spare disk vdb (2G)" '[ "$(lsblk -bdno SIZE /dev/vdb)" -ge 2000000000 ]'
check "spare disk vdc (1G)" '[ "$(lsblk -bdno SIZE /dev/vdc)" -ge 1000000000 ]'
check "vdb and vdc unused" '! lsblk -n /dev/vdb /dev/vdc | grep -q part'
fi
sudo chmod 755 /usr/local/bin/lab-check.sh
lab-check.sh
PASS host name is a FQDN
PASS peer resolves
PASS user alex exists, in wheel
PASS repositories configured
PASS SELinux is enforcing
PASS firewalld is running
PASS chronyd installed
PASS spare disk vdb (2G)
PASS spare disk vdc (1G)
PASS vdb and vdc unused
Writing your own checks is an excellent habit: if you can express “task N is done” as a one-line test, you understand exactly what the grader looks at.
Working offline
sudo mandb
man -k autofs | head -3
man 5 autofs.conf | grep -i -A2 timeout
ls /usr/share/doc | head -5
autofs (5) - Linux file system automounter configuration
auto.master (5) - Master Map for automounter
autofs.conf (5) - autofs configuration
The second command prints the lines of autofs.conf(5) that describe the timeout setting; the exact wording depends on the version.
The man -k search needs the manual-page index (mandb). Build it once in the baseline snapshot. Start from the section 5 page of a service for its configuration file syntax, section 8 for administrative commands, and the EXAMPLES section at the bottom, which often contains the exact line you need.
Going further
For more realistic rehearsal, remove any shell aliases and custom ~/.vimrc from the lab, because you will not have yours on the exam system. Practise working in the default editor (vim), and learn the minimal set of vi commands from the editing lesson. A second monitor is not available in some testing environments, so learn to switch terminals (tmux is not guaranteed to be installed). Automating the build with Kickstart, a cloud-init image or Ansible is a good project for later, but do the setup by hand once: it is practice for the exam, too.
Practice
0 of 4 done
Do these on your own system. They get harder. Check each result, then tick it off.
- Warm-up
Write down your lab plan
Decide where your two virtual machines will run (a laptop with KVM or VirtualBox, a workstation, or a cloud account), which RHEL 10-compatible image you will use, and how you will take snapshots. Write down names, addresses and disk sizes.
Check your result
A short plan listing
node1andnode2, one NIC each on a common network,node1with two spare disks (2 GiB and 1 GiB) and 2 GiB of RAM or more per machine.Hint
RHEL 10 itself needs a free Red Hat Developer subscription. AlmaLinux 10 and Rocky Linux 10 behave the same for these tasks.
Solution
node1 192.168.122.50/24 4 GiB RAM 2 vCPU 20 GiB system disk + vdb 2 GiB + vdc 1 GiB node2 192.168.122.51/24 2 GiB RAM 2 vCPU 20 GiB system disk network: one NAT or host-only network, 192.168.122.0/24 snapshots: "clean" taken after the baseline in lesson 1 - Practice
Apply the baseline on both machines
On both machines set the host names
node1.lab.example/node2.lab.example, give them the static addresses from your plan, add each other to/etc/hosts, create the useralexwith sudo rights, mount the installation ISO as a repository (sodnfworks offline), and install the packages the exam needs. Run the checker below on each.Check your result
The checker script prints
PASSfor every line on node1 and on node2 (the disk lines apply to node1 only).Hint
The baseline mirrors earlier lessons: hostname, static address, hosts file, user and wheel, ISO repo. Do it once, snapshot, and reuse.
Solution
sudo hostnamectl set-hostname node1.lab.example sudo nmcli connection modify "System eth0" ipv4.method manual \ ipv4.addresses 192.168.122.50/24 ipv4.gateway 192.168.122.1 ipv4.dns 192.168.122.1 sudo nmcli connection up "System eth0" printf '192.168.122.50 node1.lab.example node1\n192.168.122.51 node2.lab.example node2\n' | sudo tee -a /etc/hosts sudo useradd -m -G wheel alex && echo 'alex:Ex200!Lab' | sudo chpasswd sudo dnf install -y httpd nfs-utils autofs tuned chrony policycoreutils-python-utils \ setroubleshoot-server flatpak bind-utils tree vim-enhanced lvm2 at - Practice
Take a clean snapshot and prove you can return to it
Shut both machines down and take a snapshot named
clean. Start them, change something (create a file in/root), revert to the snapshot, and show that the change is gone. Write the three commands you will use to reset between attempts.Check your result
After the revert the test file no longer exists and the checker script still passes.
Hint
With libvirt:
virsh snapshot-create-as node1 clean,virsh snapshot-revert node1 clean. VirtualBox and cloud consoles have equivalent buttons.Solution
virsh shutdown node1; virsh shutdown node2 virsh snapshot-create-as node1 clean virsh snapshot-create-as node2 clean virsh start node1; virsh start node2 # ... work, break things ... virsh snapshot-revert node1 clean virsh snapshot-revert node2 clean - Challenge
Practise with the network cable pulled
The exam has no internet access. Disable the route to the outside (or disconnect the lab from the internet), then do the following using only what is on the machines: find the option that sets the idle timeout of an autofs mount; find the command that lists SELinux port labels; find the section of a man page that documents
lvextend -r.Check your result
You located each answer with
man,apropos/man -k,/usr/share/docor--help, with no web browser.Hint
sudo mandbbuilds the database thatman -kuses.man -k autofs,man -Ksearches text inside pages,apropos selinux | grep -i port.Solution
sudo mandb man -k autofs man 5 autofs.conf | grep -i -B1 -A3 timeout apropos semanage | grep -i port man lvextend | grep -n -A3 -- '--resizefs'