(RHCSA) Practice Exam 2026 Red Hat
Certified System Administrator (RHCSA)
Practice Examination: Hard-Level Multiple
Choice Questions with Detailed Rationales
ination.
1. A Linux administrator wants to permanently change the
system hostname on a RHEL 9 server. Which command
should be used?
A. hostname server01.example.com
B. hostnamectl set-hostname server01.example.com
C. sysctl hostname=server01.example.com
D. nmcli hostname server01.example.com
Answer: B
Rationale: hostnamectl set-hostname modifies the persistent
hostname managed by systemd. The hostname command
changes it only temporarily until reboot. sysctl and nmcli are
not intended for permanent hostname management.
2. Which command displays all active systemd units
currently running?
,A. systemctl list-targets
B. systemctl list-unit-files
C. systemctl list-units
D. systemctl status all
Answer: C
Rationale: systemctl list-units displays currently loaded and
active units. list-unit-files shows installed unit files regardless
of current state.
3. A file has permissions rwxr-s---. Which numeric
permission represents this mode?
A. 770
B. 2750
C. 4750
D. 6750
Answer: B
Rationale: The setgid bit equals 2 in the special permissions
digit. Owner permissions are 7, group permissions are 5 with
setgid, and others have 0, resulting in 2750.
4. Which command correctly creates an XFS filesystem on
/dev/sdb1?
A. mkfs.ext4 /dev/sdb1
,B. mkfs -t ext4 /dev/sdb1
C. mkfs.xfs /dev/sdb1
D. xfscreate /dev/sdb1
Answer: C
Rationale: mkfs.xfs is the correct utility for creating an XFS
filesystem, which is the default filesystem in Red Hat
Enterprise Linux.
5. Which command resizes an XFS filesystem after
expanding the logical volume?
A. resize2fs
B. xfsresize
C. xfs_growfs
D. growfs
Answer: C
Rationale: XFS supports only online expansion using
xfs_growfs. resize2fs applies only to ext filesystems.
6. Which SELinux command restores default file security
contexts based on policy?
A. semanage restore
B. chcon --default
C. restorecon
, D. setenforce
Answer: C
Rationale: restorecon applies the default SELinux labels
defined by the policy. chcon changes labels manually and
does not survive relabeling.
7. Which SELinux mode logs policy violations without
enforcing them?
A. Disabled
B. Enforcing
C. Permissive
D. Relaxed
Answer: C
Rationale: Permissive mode records AVC denials while
allowing operations to proceed. This mode is commonly used
for troubleshooting.
8. Which command displays the UUIDs of block devices?
A. ls
B. fdisk -l
C. mount
D. blkid
Answer: D