Course Modules
01
Essential Linux Commands
3 lessons
Essential Linux Commands
3 lessons
Shell Basics
Key Concepts
- Bash Shell Fundamentals: Bash is the default shell on RHEL. Commands follow the structure
command [options] [arguments]. Useman commandfor documentation,info commandfor detailed manuals, andcommand --helpfor quick usage summaries - Command History & Editing: Use the up/down arrows to cycle through history,
historyto list all previous commands,!nto re-run command number n, andCtrl+Rto reverse-search history. Tab completion finishes commands, file names, and paths automatically - Input/Output Redirection:
>redirects stdout and overwrites the file,>>appends.2>redirects stderr,&>redirects both stdout and stderr.<feeds a file as stdin. These operators are essential for scripting and log capture - Piping & Command Chaining: The pipe
|sends stdout of one command as stdin to the next (e.g.,ps aux | grep httpd). Chain commands with&&(run next only if previous succeeds),||(run next only if previous fails), or;(run sequentially regardless) - Shell Variables & Environment: Set variables with
VAR=value, export them withexport VAR. Key environment variables includePATH,HOME,USER,SHELL, andPS1. Useenvorprintenvto list all environment variables
The RHCSA is a hands-on, performance-based exam where you type real commands on a live system. Mastering the shell is not optional — it is the foundation for every task. Practice tab completion and history shortcuts to save time during the exam. Know how to redirect both stdout and stderr to the same file with
&> file.log, as log redirection tasks appear frequently.
File Management
Key Concepts
- Core File Operations:
ls -lalists files with permissions and hidden entries.cp -rcopies directories recursively.mvmoves or renames.rm -rfremoves recursively and forcefully.mkdir -pcreates nested directories in one command - Finding Files:
find / -name "*.conf" -type fsearches the filesystem in real time by name, type, size, permissions, or modification time.locate filenamequeries a pre-built database (updated viaupdatedb) for faster but potentially stale results - Archiving & Compression:
tar -czf archive.tar.gz /pathcreates a gzip-compressed archive.tar -xzf archive.tar.gzextracts it.tar -cjfuses bzip2,tar -cJfuses xz.staris an alternative archiver that preserves extended attributes and SELinux contexts - Hard & Soft Links: Hard links (
ln file link) share the same inode and data blocks — deleting the original does not affect the link. Soft links (ln -s target link) are pointers to a path — if the target is deleted, the symlink breaks. Hard links cannot cross filesystems or link to directories - File Metadata:
stat fileshows inode number, size, permissions, timestamps (access, modify, change).file filenameidentifies file type.du -sh /pathshows disk usage for a directory, anddf -hshows filesystem disk space usage
On the RHCSA exam you will be asked to create, copy, move, and archive files under specific constraints. Practice
find with multiple criteria such as find / -user student -size +1M -type f. Know the difference between hard and soft links cold — exam tasks often require creating both and understanding which survives file deletion. Always use star when you need to preserve SELinux contexts during backup and restore operations.
Text Processing
Key Concepts
- Grep & Regular Expressions:
grep -i pattern filesearches case-insensitively.grep -r pattern /dirsearches recursively.grep -E "regex"enables extended regex. Basic patterns:^(start of line),$(end of line),.*(any characters),[a-z](character class) - Sed & Awk:
sed 's/old/new/g' fileperforms global search-and-replace.sed -iedits files in place.awk '{print $1, $3}' fileextracts specific fields from structured text. Both are essential for automated configuration changes in scripts - Text Filtering Tools:
cut -d: -f1 /etc/passwdextracts the first field (usernames).sortorders lines alphabetically or numerically (-n).uniqremoves adjacent duplicates (pipe fromsortfirst).wc -lcounts lines in a file - File Viewing:
head -n 20 fileshows the first 20 lines.tail -n 20 fileshows the last 20.tail -f /var/log/messagesfollows a log file in real time.lessprovides paginated viewing with search (press/patternto search forward) - Comparing Files:
diff file1 file2shows line-by-line differences.diff -uproduces unified format output commonly used in patches.commcompares two sorted files and shows lines unique to each or common to both
Text processing is a critical RHCSA skill because many exam tasks require you to extract, filter, or modify configuration data. Practice chaining commands together:
grep -v "^#" /etc/ssh/sshd_config | grep -v "^$" strips comments and blank lines to show only active directives. Master sed -i for in-place file edits — the exam often requires modifying configuration files without a text editor.
02
File Systems & Storage
3 lessons
File Systems & Storage
3 lessons
Disk Partitioning
Key Concepts
- MBR vs GPT: MBR (Master Boot Record) supports up to 4 primary partitions and disks up to 2 TB. GPT (GUID Partition Table) supports 128 partitions and disks larger than 2 TB. UEFI systems require GPT; BIOS systems traditionally use MBR
- Partitioning with fdisk:
fdisk /dev/sdbopens the interactive MBR partitioning tool. Usento create,dto delete,tto change type (83 for Linux, 8e for LVM),pto print, andwto write changes. Runpartprobeto inform the kernel of changes - Partitioning with gdisk:
gdisk /dev/sdbis the GPT equivalent of fdisk. Supports the same workflow but with GPT partition types (8300 for Linux filesystem, 8e00 for LVM). Usesgdiskfor scriptable non-interactive GPT partitioning - Parted:
parted /dev/sdbsupports both MBR and GPT. Usemklabel gptto initialize,mkpart primary ext4 1MiB 500MiBto create partitions with precise sizing. Parted makes changes immediately without a write step - Partition Types: Primary partitions are bootable and limited to 4 per MBR disk. Extended partitions act as containers for logical partitions, allowing more than 4 partitions on MBR. Linux LVM type (8e) marks partitions for use as physical volumes
Disk partitioning is a core RHCSA objective. The exam may provide additional disks that you must partition, format, and mount. Always run
lsblk or fdisk -l first to identify available disks. Remember that parted writes changes immediately (no undo), while fdisk and gdisk only write when you press w. After partitioning, run partprobe /dev/sdb to update the kernel partition table without rebooting.
File Systems
Key Concepts
- ext4 vs XFS: ext4 supports shrinking and growing, has a maximum file size of 16 TB, and uses the
resize2fscommand. XFS is the default on RHEL, supports only growing (no shrink), has a maximum file size of 8 EB, and usesxfs_growfs. Both support journaling - Creating File Systems:
mkfs.xfs /dev/sdb1creates an XFS filesystem.mkfs.ext4 /dev/sdb1creates ext4. Use-L labelto assign a label.blkiddisplays the UUID, label, and filesystem type of block devices - Mounting Filesystems:
mount /dev/sdb1 /mnt/datamounts temporarily. For persistent mounts, add an entry to/etc/fstabwith the format:UUID=xxxx /mount/point xfs defaults 0 0. Runmount -ato test fstab entries without rebooting - UUID and Labels: Always use UUIDs in
/etc/fstabinstead of device names like/dev/sdb1, because device names can change between boots. Useblkidto find UUIDs andxfs_admin -L label /dev/sdb1ortune2fs -L label /dev/sdb1to set labels - Swap Space: Create swap partitions with
mkswap /dev/sdb2and activate withswapon /dev/sdb2. Add to/etc/fstabasUUID=xxxx swap swap defaults 0 0. Useswapon --showto verify active swap devices
Persistent mounting via
/etc/fstab is a guaranteed RHCSA topic. A misconfigured fstab entry can prevent the system from booting, so always test with mount -a and verify with df -h before rebooting. Use UUIDs rather than device names. Remember that XFS cannot be shrunk — if a task requires reducing a filesystem, it must be ext4. The exam checks that mounts survive a reboot, so temporary mounts will not earn points.
Logical Volume Manager
Key Concepts
- LVM Architecture: Physical Volumes (PVs) are partitions or whole disks initialized for LVM. Volume Groups (VGs) pool one or more PVs into a single storage pool. Logical Volumes (LVs) are carved from VGs and used like regular partitions for filesystems
- Creating LVM:
pvcreate /dev/sdb1initializes a PV.vgcreate myvg /dev/sdb1 /dev/sdc1creates a VG from multiple PVs.lvcreate -n mylv -L 5G myvgcreates a 5 GB LV. Then format withmkfs.xfs /dev/myvg/mylvand mount it - Extending LVM: Add a new PV to the VG with
vgextend myvg /dev/sdd1. Extend the LV withlvextend -L +2G /dev/myvg/mylvor use-l +100%FREEto use all remaining space. Then grow the filesystem:xfs_growfs /mount/pointfor XFS orresize2fs /dev/myvg/mylvfor ext4 - Reducing LVM: Only ext4 supports shrinking. Unmount first, then
e2fsck -f /dev/myvg/mylv,resize2fs /dev/myvg/mylv 3G, and finallylvreduce -L 3G /dev/myvg/mylv. XFS volumes cannot be reduced — only recreated - LVM Verification:
pvs,vgs,lvsprovide concise summaries.pvdisplay,vgdisplay,lvdisplayshow detailed information.lsblkshows the block device hierarchy including LVM mappings
LVM is one of the most heavily tested RHCSA topics. You will almost certainly need to create, extend, or troubleshoot logical volumes on the exam. Memorize the full lifecycle:
pvcreate → vgcreate → lvcreate → mkfs → mount → fstab. When extending, always remember to grow both the LV and the filesystem — lvextend -r can do both in one step. Practice the -l +100%FREE syntax for using all available space.
03
Users & Groups
2 lessons
Users & Groups
2 lessons
User Management
Key Concepts
- Creating Users:
useradd usernamecreates a user with defaults (home directory, shell, UID). Common options:-u UIDsets a specific UID,-s /sbin/nologinprevents interactive login,-d /home/customsets a custom home directory,-e 2026-12-31sets an expiration date - Modifying & Deleting Users:
usermod -aG groupname usernameadds a user to a supplementary group (-aappends; without it, all other groups are removed).usermod -L usernamelocks an account.userdel -r usernamedeletes the user and their home directory - Password Management:
passwd usernamesets or changes a password.chage -l usernamelists password aging info.chage -M 90 usernamesets maximum password age to 90 days.chage -d 0 usernameforces a password change at next login - User Configuration Files:
/etc/passwdstores user accounts (username:x:UID:GID:comment:home:shell)./etc/shadowstores encrypted passwords and aging data./etc/login.defsdefines system-wide defaults for UID ranges, password aging, and home directory creation - System Users vs Regular Users: System users (UID below 1000 on RHEL) are created for services and daemons with
useradd -r. They typically have/sbin/nologinas their shell and no home directory. Regular users start at UID 1000
User management tasks appear on every RHCSA exam. Pay close attention to the exact requirements: specific UIDs, specific shells, password policies, and group memberships. The most common mistake is using
usermod -G without -a, which removes the user from all other supplementary groups. Always verify with id username after making changes. Practice chage for password aging — the exam frequently requires setting expiration dates and maximum password ages.
Group Management
Key Concepts
- Creating & Modifying Groups:
groupadd groupnamecreates a new group.groupadd -g 5000 groupnamesets a specific GID.groupmod -n newname oldnamerenames a group.groupdel groupnamedeletes a group (fails if it is any user's primary group) - Primary vs Supplementary Groups: Each user has one primary group (set at creation, stored in
/etc/passwdGID field) and zero or more supplementary groups (listed in/etc/group). Files are created with the owner's primary group. Usenewgrp groupnameto temporarily switch the effective primary group - Group Administration:
gpasswd -a user groupadds a user to a group.gpasswd -d user groupremoves a user from a group.gpasswd -A user groupmakes a user a group administrator who can manage group membership without root access - Group Configuration Files:
/etc/groupstores group definitions (groupname:x:GID:members)./etc/gshadowstores group passwords and administrator lists. View effective group memberships withid usernameorgroups username - Collaborative Directories: Set the SGID bit on a shared directory (
chmod g+s /shared) so that new files inherit the directory's group rather than the creator's primary group. This is essential for team collaboration on shared project directories
Group management works hand-in-hand with permissions. On the exam, you may be asked to create a collaborative directory where multiple users can read and write files. The typical pattern is: create a group, add users to it, create the directory, set group ownership with
chgrp, and apply SGID with chmod g+s. Verify group membership changes with id username — note that users must log out and back in for new supplementary group memberships to take effect.
04
Permissions & Access Control
3 lessons
Permissions & Access Control
3 lessons
Standard Permissions
Key Concepts
- Permission Triplets (rwx): Each file has three permission sets: owner (u), group (g), and others (o).
r(read = 4),w(write = 2),x(execute = 1). On directories,rlists contents,wallows creating/deleting files,xallows entering the directory - Chmod Numeric & Symbolic:
chmod 755 filesets rwxr-xr-x.chmod u+x fileadds execute for the owner.chmod go-w fileremoves write for group and others.chmod -R 750 /dirapplies permissions recursively to a directory tree - Chown & Chgrp:
chown user:group filechanges both owner and group.chown -R user:group /dirapplies recursively.chgrp groupname filechanges only the group. Only root can change file ownership; group members can change group ownership - Umask: The umask subtracts permissions from the default (666 for files, 777 for directories). A umask of 022 creates files with 644 and directories with 755. Set in
/etc/bashrcor~/.bashrc. Useumaskto view andumask 027to set - Directory Permissions: Execute (
x) on a directory means you cancdinto it and access files by name. Read (r) means you can list its contents withls. Withoutx, even if you know a file's name, you cannot access it. This distinction is a common exam topic
Permissions are fundamental to every RHCSA task. The exam expects you to set exact permissions using both numeric and symbolic modes. Remember that directory permissions control access differently than file permissions —
x on a directory is the gatekeeper. A common trap: setting r without x on a directory lets users list file names but not read their contents or metadata. Practice until numeric-to-symbolic conversion is automatic: 750 = rwxr-x---.
Special Permissions
Key Concepts
- SUID (Set User ID): When set on an executable file (
chmod u+s fileor 4xxx), the process runs with the file owner's privileges. Example:/usr/bin/passwdhas SUID so regular users can modify/etc/shadow. SUID has no effect on directories - SGID (Set Group ID): On files (
chmod g+s fileor 2xxx), the process runs with the file's group privileges. On directories, new files and subdirectories inherit the directory's group ownership instead of the creator's primary group — essential for shared collaborative directories - Sticky Bit: When set on a directory (
chmod +t /diror 1xxx), only the file owner, directory owner, or root can delete or rename files within it. The classic example is/tmp(permissions drwxrwxrwt), which prevents users from deleting each other's files - Identifying Special Permissions: In
ls -loutput, SUID appears assin the owner execute position, SGID assin the group execute position, and sticky bit astin the others execute position. UppercaseSorTmeans the underlying execute bit is not set - Security Implications: SUID executables are a security risk — find them with
find / -perm -4000. SGID on binaries is less common. Never set SUID on shell scripts (the kernel ignores it for security). Regularly audit SUID/SGID files on production systems
The exam frequently combines SGID and sticky bit in collaborative directory scenarios: create a shared directory with SGID so all files belong to the team group, and add the sticky bit so users cannot delete each other's work. The numeric representation adds a fourth digit:
chmod 2770 /shared sets SGID + rwxrwx---. Verify with ls -ld /shared and look for the s in the group position and t in the others position.
Access Control Lists (ACLs)
Key Concepts
- Why ACLs: Standard Linux permissions only support one owner and one group. ACLs extend this to grant specific permissions to multiple users and groups. A
+at the end ofls -loutput indicates an ACL is present - Setting ACLs:
setfacl -m u:username:rwx /filegrants a specific user rwx access.setfacl -m g:groupname:rx /filegrants a specific group rx access.setfacl -x u:username /fileremoves a specific ACL entry.setfacl -b /fileremoves all ACLs - Default ACLs:
setfacl -m d:u:username:rwx /dirsets a default ACL on a directory so that new files and subdirectories automatically inherit the specified permissions. Default ACLs only apply to directories, not files - ACL Mask: The mask defines the maximum effective permissions for named users and groups (not the owner).
setfacl -m m::rx /filesets the mask to rx, limiting all named users/groups to at most rx regardless of their individual ACL entries. The mask is recalculated automatically when ACLs change - Viewing ACLs:
getfacl /filedisplays all ACL entries including owner, group, mask, and other permissions. The output shows effective permissions when the mask restricts an entry. Usegetfacl -R /dirto recursively view ACLs on a directory tree
ACLs are tested on the RHCSA when a task requires granting permissions that cannot be expressed with standard owner/group/other permissions. For example: "User alice should have read-write access and user bob should have read-only access to the same file." Default ACLs on directories are critical for ensuring inherited permissions on newly created files — without them, each new file would need manual ACL configuration. Always verify with
getfacl after setting ACLs.
05
Networking
2 lessons
Networking
2 lessons
Network Configuration
Key Concepts
- NetworkManager & nmcli: NetworkManager is the default network management daemon on RHEL.
nmcli con showlists connections.nmcli con mod "eth0" ipv4.addresses 192.168.1.10/24 ipv4.gateway 192.168.1.1 ipv4.dns 8.8.8.8 ipv4.method manualconfigures a static IP.nmcli con up "eth0"activates the connection - nmtui: A text-based user interface for NetworkManager. Run
nmtuito edit connections, activate/deactivate connections, and set the system hostname. Useful when you need a quick visual interface during the exam - IP Address Verification:
ip addr show(orip a) displays all interfaces and their IP addresses.ip route showdisplays the routing table and default gateway.ip link showdisplays link-layer information and interface state (UP/DOWN) - Hostname Configuration:
hostnamectl set-hostname server1.example.comsets the static hostname persistently. The hostname is stored in/etc/hostname. Add local name resolution entries in/etc/hostsfor hosts that do not have DNS records - DNS Configuration: DNS servers are configured through NetworkManager (preferred) or directly in
/etc/resolv.conf. The/etc/nsswitch.conffile controls name resolution order (files before dns means/etc/hostsis checked first)
Network configuration with
nmcli is a critical RHCSA skill. The exam requires persistent network settings that survive a reboot. Always use nmcli rather than editing connection files directly. After making changes, run nmcli con up "connection-name" to apply them. Verify with ip a and test connectivity with ping. Set the hostname early in the exam with hostnamectl — it is often one of the first tasks.
Network Troubleshooting
Key Concepts
- Connection Testing:
ping -c 4 hosttests ICMP connectivity.traceroute host(ortracepath) shows the path packets take to a destination, identifying where connectivity fails.curl -v http://hosttests HTTP connectivity at the application layer - Socket Statistics:
ss -tlnpshows listening TCP sockets with process information.ss -ulnpshows listening UDP sockets.ss -anshows all connections with numeric addresses. This replaces the deprecatednetstatcommand on RHEL - DNS Troubleshooting:
dig example.comqueries DNS and shows detailed response information.nslookup example.comprovides simpler DNS lookup output.host example.comperforms a quick DNS resolution check. Verify/etc/resolv.conffor correct nameserver entries - Firewall Basics:
firewall-cmd --list-allshows the current zone configuration including allowed services and ports. If connectivity fails, check whether the required service or port is allowed through the firewall before investigating other causes - Network Teaming & Bridging: Network teams bond multiple NICs for redundancy or load balancing using
nmcli con add type team. Network bridges connect virtual machines to the physical network. Both are configured through NetworkManager and tested at an awareness level on the RHCSA
When troubleshooting network issues on the exam, follow a systematic approach: (1) Check the interface is up with
ip link, (2) verify IP configuration with ip a, (3) test gateway connectivity with ping, (4) check DNS resolution with dig, (5) verify the firewall with firewall-cmd --list-all, (6) check if the service is listening with ss -tlnp. This layered approach prevents wasted time on the wrong problem.
06
Firewall & SELinux
3 lessons
Firewall & SELinux
3 lessons
firewalld
Key Concepts
- Zones & Default Zone: firewalld organizes rules into zones (public, work, home, dmz, trusted, etc.). Each network interface is assigned to a zone. The default zone (usually public) applies to interfaces not explicitly assigned.
firewall-cmd --get-default-zoneshows the current default - Adding Services & Ports:
firewall-cmd --add-service=http --permanentallows HTTP traffic.firewall-cmd --add-port=8080/tcp --permanentopens a custom port. The--permanentflag writes the rule to disk; without it, rules are runtime-only and lost on reload - Runtime vs Permanent: Runtime rules take effect immediately but are lost on
firewall-cmd --reloador reboot. Permanent rules require--reloadto take effect. Best practice: add rules with--permanent, then runfirewall-cmd --reloadto apply them - Rich Rules:
firewall-cmd --add-rich-rule='rule family="ipv4" source address="192.168.1.0/24" service name="ssh" accept' --permanentcreates granular rules based on source address, destination, service, port, and action (accept/reject/drop) - Verification:
firewall-cmd --list-alldisplays all rules in the active zone.firewall-cmd --list-servicesshows allowed services.firewall-cmd --list-portsshows allowed ports.firewall-cmd --get-active-zonesshows zone-to-interface assignments
firewalld is tested on every RHCSA exam. The most common mistake is forgetting
--permanent and losing rules after a reboot. Always use both: --permanent to persist, then --reload to activate. The exam verifies your rules survive a reboot, so runtime-only rules earn zero points. Know the predefined service names (http, https, ssh, nfs, samba, dns) — they map to specific ports defined in /usr/lib/firewalld/services/.
SELinux Fundamentals
Key Concepts
- SELinux Modes: Enforcing (actively blocks policy violations and logs them), Permissive (logs violations but does not block — useful for troubleshooting), Disabled (SELinux is completely off). Check the current mode with
getenforce. Toggle between enforcing and permissive withsetenforce 1orsetenforce 0 - Persistent SELinux Configuration: The file
/etc/selinux/configcontrols the mode at boot. SetSELINUX=enforcingfor production systems. Changing from disabled to enforcing requires a reboot and filesystem relabel, which can be time-consuming - SELinux Contexts: Every file, process, and port has a security context in the format
user:role:type:level. The type field is the most important for policy enforcement. View file contexts withls -Z, process contexts withps -eZ, and port contexts withsemanage port -l - Common Context Types:
httpd_sys_content_tfor web content served by Apache,sshd_tfor the SSH daemon process,user_home_tfor user home directories. When a process type does not have permission to access a file type, SELinux denies the access - Type Enforcement: SELinux policy rules define which process types (domains) can access which file types. For example,
httpd_tcan readhttpd_sys_content_tbut notuser_home_t. This Mandatory Access Control (MAC) operates on top of standard Linux DAC permissions
SELinux must be in enforcing mode for the RHCSA exam — disabling or setting it to permissive will cost you points. The exam tests your ability to work with SELinux, not around it. Understand that SELinux contexts are the key to troubleshooting: if a service cannot access a file, compare the process context (
ps -eZ | grep httpd) with the file context (ls -Z /path) to identify the mismatch. The type field is what matters most in day-to-day administration.
SELinux Troubleshooting
Key Concepts
- Restoring Contexts:
restorecon -Rv /pathresets file contexts to the policy defaults. This is the most common fix when files have been copied or moved and their contexts are wrong. Moving a file preserves its original context; copying inherits the destination context - Managing File Contexts:
semanage fcontext -a -t httpd_sys_content_t "/custom/web(/.*)?"adds a permanent context rule for a custom directory. Then runrestorecon -Rv /custom/webto apply. This is required when serving web content from non-default directories - SELinux Booleans: Booleans are on/off switches for specific policy behaviors.
getsebool -a | grep httpdlists all HTTP-related booleans.setsebool -P httpd_enable_homedirs onpersistently enables a boolean (-Pfor permanent). Without-P, the change is lost on reboot - Audit Log Analysis: SELinux denials are logged in
/var/log/audit/audit.log.ausearch -m avc -ts recentfinds recent denials. Installsetroubleshoot-serverforsealert, which provides human-readable explanations and suggested fixes for each denial - Port Contexts:
semanage port -l | grep httplists ports assigned to HTTP types.semanage port -a -t http_port_t -p tcp 8888allows httpd to listen on a custom port. Without this, SELinux blocks the service from binding to non-standard ports
SELinux troubleshooting follows a repeatable pattern: (1) identify the denial with
ausearch -m avc or sealert, (2) determine the cause (wrong file context, missing boolean, or non-standard port), (3) apply the fix (restorecon, setsebool -P, or semanage), (4) verify the fix works. On the exam, always check SELinux when a properly configured service fails to work — it is the most common hidden cause of access denied errors on RHEL systems.
07
Process Management
2 lessons
Process Management
2 lessons
Process Control
Key Concepts
- Viewing Processes:
ps auxlists all processes with user, PID, CPU/memory usage, and command.ps -efprovides a similar view with parent PID.top(orhtopif installed) provides a real-time, interactive view of system resource usage sorted by CPU or memory - Killing Processes:
kill PIDsends SIGTERM (signal 15), which requests graceful termination.kill -9 PIDsends SIGKILL, which forces immediate termination (cannot be caught or ignored).killall processnamekills all processes with a given name.pkill -u usernamekills all processes owned by a user - Process Priority (Nice): Nice values range from -20 (highest priority) to 19 (lowest priority). Default is 0.
nice -n 10 commandstarts a process with lower priority.renice -n 5 -p PIDchanges the priority of a running process. Only root can set negative nice values - Job Control:
Ctrl+Zsuspends the foreground process.bg %1resumes it in the background.fg %1brings it to the foreground.jobslists all background jobs.nohup command &runs a command immune to hangup signals, so it continues after logout - Signal Types: SIGTERM (15) — polite termination request. SIGKILL (9) — forced termination, cannot be caught. SIGHUP (1) — often used to reload configuration. SIGSTOP (19) — pauses a process. SIGCONT (18) — resumes a paused process. List all signals with
kill -l
Process management on the RHCSA is practical: you need to find resource-heavy processes, adjust their priority, and terminate them when necessary. Always try SIGTERM before SIGKILL — SIGKILL does not allow the process to clean up (close files, release locks). For the exam, know how to use
top to identify the most CPU- or memory-intensive process, and how to change its nice value with renice. Practice nohup for long-running tasks that must survive a logout.
systemd Services
Key Concepts
- Service Management:
systemctl start httpdstarts a service.systemctl stop httpdstops it.systemctl restart httpdrestarts (stop + start).systemctl reload httpdreloads configuration without stopping.systemctl status httpdshows the current state, PID, and recent log entries - Enabling & Disabling:
systemctl enable httpdcreates symlinks so the service starts at boot.systemctl disable httpdremoves those symlinks.systemctl enable --now httpdenables and starts in one command.systemctl is-enabled httpdchecks the boot-time status - Masking Services:
systemctl mask httpdprevents a service from being started by any means (manual or dependency).systemctl unmask httpdreverses the mask. Masking creates a symlink to/dev/null. This is stronger than disabling, which only prevents automatic startup at boot - systemd Targets: Targets replace SysVinit runlevels.
multi-user.targetis equivalent to runlevel 3 (text mode).graphical.targetis equivalent to runlevel 5 (GUI).systemctl get-defaultshows the default target.systemctl set-default multi-user.targetchanges it - Journalctl:
journalctl -u httpdshows logs for a specific unit.journalctl -ffollows the log in real time.journalctl --since "1 hour ago"filters by time.journalctl -p errshows only error-level and above messages. The journal is stored in/run/log/journalby default (volatile)
systemd service management is one of the most frequently tested RHCSA topics. Every service you configure on the exam (httpd, sshd, chronyd, etc.) must be both started and enabled to earn full marks. Use
systemctl enable --now to do both in a single command. If a service fails to start, check systemctl status servicename and journalctl -u servicename for error details. Remember that masking is the only way to completely prevent a service from starting.
08
Package Management
2 lessons
Package Management
2 lessons
YUM/DNF
Key Concepts
- Core DNF Operations:
dnf install httpdinstalls a package and its dependencies.dnf remove httpduninstalls it.dnf updateupdates all packages.dnf update httpdupdates a specific package. DNF is the replacement for YUM on RHEL 8+ and they share the same syntax - Searching & Querying:
dnf search keywordfinds packages by name or description.dnf info httpdshows package details (version, size, description).dnf list installedshows all installed packages.dnf provides /path/to/fileidentifies which package owns a specific file - Group Packages:
dnf group listlists available package groups.dnf group install "Development Tools"installs a full group of related packages. Groups bundle common tools (compilers, libraries, server components) for convenient installation - Repository Management: Repos are configured in
/etc/yum.repos.d/*.repofiles. Key fields:baseurlormirrorlist,enabled=1,gpgcheck=1,gpgkey.dnf repolistshows enabled repos.dnf config-manager --add-repo URLadds a new repository - Module Streams:
dnf module listshows available module streams (e.g., python36, python38, python39).dnf module enable python39selects a stream.dnf module install python39installs the module profile. Streams allow multiple versions of software to coexist in the same repository
The RHCSA exam frequently requires configuring a YUM/DNF repository from a given URL and installing packages from it. Practice creating
.repo files manually in /etc/yum.repos.d/ with the correct syntax. Module streams are a newer RHCSA topic — know how to list, enable, and install modules. If dnf install fails, verify the repo is enabled with dnf repolist and check network connectivity to the repository URL.
RPM
Key Concepts
- RPM Queries:
rpm -qalists all installed packages.rpm -qi httpdshows detailed information about an installed package.rpm -ql httpdlists all files installed by a package.rpm -qf /usr/sbin/httpdidentifies which package owns a file.rpm -qd httpdlists documentation files - RPM Installation:
rpm -ivh package.rpminstalls a local RPM file (i = install, v = verbose, h = hash progress).rpm -Uvh package.rpmupgrades (installs if not present).rpm -e packagenameremoves a package. RPM does not resolve dependencies — use DNF for that - GPG Key Verification:
rpm --import https://url/RPM-GPG-KEYimports a GPG public key.rpm -K package.rpmverifies the signature and integrity of an RPM file. GPG keys ensure packages have not been tampered with and come from a trusted source - RPM vs DNF: RPM operates on individual package files without dependency resolution. DNF wraps RPM, adding repository support, automatic dependency resolution, and group/module management. Use RPM for querying installed packages and DNF for installing, updating, and removing
- Module Streams with DNF:
dnf module listshows all available modules with their streams and profiles.dnf module reset modulenameclears the selected stream.dnf module switch-to modulename:streamchanges to a different stream version. Stream conflicts must be resolved before switching
RPM query commands are invaluable for the RHCSA exam. When you need to find which package provides a specific command or file, use
rpm -qf $(which command). When you need to find where a package installed its configuration files, use rpm -qc packagename. DNF handles installations, but RPM queries are faster and work offline. Know both tools and when to use each — the exam tests practical Linux administration, and experienced admins use both daily.
09
Scheduling & Logging
2 lessons
Scheduling & Logging
2 lessons
Cron and at
Key Concepts
- Crontab:
crontab -eedits the current user's cron schedule.crontab -llists it.crontab -e -u usernameedits another user's crontab (as root). The format is:minute hour day-of-month month day-of-week command. Example:30 2 * * 1 /scripts/backup.shruns at 2:30 AM every Monday - System Cron:
/etc/crontabis the system-wide crontab with an additional user field. Drop-in files in/etc/cron.d/follow the same format. Directories/etc/cron.hourly/,/etc/cron.daily/,/etc/cron.weekly/, and/etc/cron.monthly/run scripts placed within them at the named interval - Anacron: Anacron runs missed cron jobs that were scheduled while the system was off. Configured in
/etc/anacrontab. Unlike cron, anacron does not assume the system is running 24/7, making it suitable for desktops and laptops - at Command:
at now + 5 minutesschedules a one-time job. Type commands, then pressCtrl+Dto save.atqlists pending jobs.atrm jobnumberremoves a scheduled job. Access control:/etc/at.allowand/etc/at.denycontrol which users can useat - systemd Timers: systemd timers are the modern replacement for cron. Each timer unit (
.timer) triggers a corresponding service unit (.service).systemctl list-timersshows all active timers. Timers offer calendar-based scheduling, monotonic intervals, and better logging via journalctl
Scheduling tasks is a common RHCSA exam objective. Practice writing cron expressions until they are second nature:
*/5 * * * * means every 5 minutes, 0 9-17 * * 1-5 means every hour from 9 AM to 5 PM on weekdays. Remember that cron uses the user's environment, which may not include the full PATH — always use absolute paths in cron commands (e.g., /usr/bin/tar instead of tar). The at command is tested less frequently but know its syntax for one-time scheduled tasks.
System Logging
Key Concepts
- rsyslog: The default logging daemon on RHEL. Configuration in
/etc/rsyslog.confdefines rules that route messages by facility (auth, kern, mail, cron) and priority (emerg, alert, crit, err, warning, notice, info, debug) to log files. Most logs go to/var/log/ - Key Log Files:
/var/log/messagescaptures most system messages./var/log/securelogs authentication events./var/log/boot.logrecords boot messages./var/log/cronlogs cron job execution./var/log/audit/audit.logstores SELinux and auditd events - journalctl Filtering:
journalctl -u sshdfilters by unit.journalctl --since "2026-04-01" --until "2026-04-02"filters by date range.journalctl -p errshows only errors and above.journalctl _PID=1234filters by process ID. Combine filters for precise log queries - Persistent Journal Storage: By default, the systemd journal is stored in
/run/log/journal(volatile, cleared on reboot). To make it persistent, create/var/log/journaldirectory and restart systemd-journald, or setStorage=persistentin/etc/systemd/journald.conf - Log Rotation:
logrotateautomatically compresses, rotates, and removes old log files. Configuration in/etc/logrotate.confand/etc/logrotate.d/. Settings include rotation frequency (daily, weekly), number of old files to keep, compression, and post-rotation scripts
The RHCSA may ask you to configure persistent journal storage so that logs survive a reboot. The steps are:
mkdir -p /var/log/journal, then systemctl restart systemd-journald. Verify with journalctl --disk-usage. When troubleshooting any service, always check both journalctl -u servicename and the service's own log files in /var/log/. Practice journalctl filtering extensively — it is faster and more powerful than manually searching through log files with grep.
10
Boot Process & Troubleshooting
2 lessons
Boot Process & Troubleshooting
2 lessons
Boot Sequence
Key Concepts
- BIOS/UEFI Firmware: The first stage of boot. BIOS uses MBR to locate the bootloader. UEFI reads the GPT and loads the bootloader from the EFI System Partition (ESP, typically mounted at
/boot/efi). UEFI supports Secure Boot, which verifies bootloader signatures - GRUB2 Bootloader: GRUB2 loads the kernel and initramfs into memory. Configuration is in
/boot/grub2/grub.cfg(generated, do not edit directly). Defaults are set in/etc/default/grub. After changes, regenerate withgrub2-mkconfig -o /boot/grub2/grub.cfg - Kernel & initramfs: The kernel initializes hardware, mounts the root filesystem (initially from initramfs, a temporary RAM-based filesystem containing essential drivers), then pivots to the real root filesystem. Kernel parameters can be passed via GRUB2
- systemd Initialization: Once the kernel starts PID 1 (systemd), it reads the default target and starts all units required to reach that target in parallel.
multi-user.targetprovides a full multi-user text environment;graphical.targetadds a GUI - Boot Targets:
systemctl get-defaultshows the current default target.systemctl set-default multi-user.targetchanges it.systemctl isolate rescue.targetswitches to rescue mode (single-user, root shell, minimal services). Targets replace the older SysVinit runlevels
Understanding the boot sequence is critical because the RHCSA exam may require you to interrupt the boot process for troubleshooting. Know the order: firmware (BIOS/UEFI) → GRUB2 → kernel + initramfs → systemd → default target. If you modify
/etc/default/grub (e.g., to add kernel parameters), you must regenerate grub.cfg. Do not edit grub.cfg directly — changes will be overwritten on the next kernel update.
Boot Troubleshooting
Key Concepts
- Root Password Reset (rd.break): At the GRUB2 menu, press
eto edit, appendrd.breakto the linux line, thenCtrl+Xto boot. This drops you into initramfs before the real root is mounted. Remount withmount -o remount,rw /sysroot, chroot into/sysroot, runpasswd root, thentouch /.autorelabeland exit - Emergency & Rescue Targets: Append
systemd.unit=emergency.targetto the GRUB2 kernel line for the most minimal environment (root filesystem mounted read-only). Usesystemd.unit=rescue.targetfor single-user mode with more services. Both require the root password - GRUB2 Editing at Boot: Press
eat the GRUB2 menu to edit kernel parameters for the current boot only. Common uses: appendrd.breakfor password reset,systemd.unit=rescue.targetfor rescue mode, orinit=/bin/bashfor an emergency shell without systemd - Filesystem Repair: If the system fails to boot due to a corrupt filesystem, boot into emergency mode. Run
fsck /dev/sdXnto check and repair the filesystem. Fix/etc/fstaberrors that prevent mounting. Remount root as read-write withmount -o remount,rw /to make changes - SELinux Relabeling: After any
rd.breakpassword reset,touch /.autorelabelis mandatory to trigger a full SELinux relabel on the next boot. Without it, the new password file will have the wrong SELinux context and login will fail. The relabel process can take several minutes
Root password reset via
rd.break is a classic RHCSA exam task. Memorize the full procedure: edit GRUB → add rd.break → mount -o remount,rw /sysroot → chroot /sysroot → passwd root → touch /.autorelabel → exit → reboot. Forgetting touch /.autorelabel is the most common mistake — SELinux will prevent login because /etc/shadow has the wrong context. Practice this procedure multiple times before the exam.
11
Containers & Automation
2 lessons
Containers & Automation
2 lessons
Podman Containers
Key Concepts
- Podman Basics: Podman is a daemonless container engine that runs OCI containers. Unlike Docker, it does not require a running daemon.
podman pull registry.access.redhat.com/ubi9/ubidownloads an image.podman imageslists local images. Podman commands mirror Docker syntax - Running Containers:
podman run -d --name myapp -p 8080:80 httpdruns a container in detached mode (-d), with a name (--name), mapping host port 8080 to container port 80 (-p).podman pslists running containers.podman ps -aincludes stopped containers - Container Lifecycle:
podman stop myappsends SIGTERM then SIGKILL after a timeout.podman start myapprestarts a stopped container.podman rm myappremoves a container.podman rmi image-idremoves an image.podman exec -it myapp /bin/bashopens a shell inside a running container - Rootless Containers: Podman runs containers as a regular user without root privileges. Rootless containers use user namespaces for isolation. This is a key security advantage over Docker and is the expected mode on the RHCSA exam. Rootless containers cannot bind to ports below 1024
- Building Images: A
Containerfile(equivalent to Dockerfile) defines the image build.FROM ubi9/ubisets the base image.RUN dnf install -y httpdruns a command during build.EXPOSE 80documents the port.podman build -t myimage .builds the image from the Containerfile
Podman is a newer addition to the RHCSA exam. Practice running rootless containers as a regular user — not as root. The exam may ask you to pull an image, run a container with port mapping, and ensure it starts automatically. For auto-start, generate a systemd user service:
podman generate systemd --new --name myapp > ~/.config/systemd/user/myapp.service, then systemctl --user enable --now myapp and loginctl enable-linger username to allow user services to run after logout.
Automating with Shell Scripts
Key Concepts
- Bash Script Structure: Start with
#!/bin/bash(the shebang). Make scripts executable withchmod +x script.sh. Use variables (NAME="server1"), command substitution (DATE=$(date +%F)), and meaningful comments. Always setset -eto exit on errors in production scripts - Conditionals:
if [ -f /path/file ]; then ... fitests if a file exists.if [ "$VAR" = "value" ]; then ... elif ... else ... fihandles multiple conditions. Use[[ ]]for pattern matching and regex. Common test operators:-d(directory),-r(readable),-z(empty string),-eq(numeric equal) - Loops:
for user in alice bob charlie; do useradd $user; doneiterates over a list.for i in $(seq 1 10); do ... doneiterates over numbers.while read line; do ... done < file.txtprocesses a file line by line. Loops are essential for batch user creation and configuration tasks - Exit Codes: Every command returns an exit code: 0 = success, non-zero = failure.
$?holds the last command's exit code. Useexit 0for success andexit 1for failure in your scripts.&&runs the next command only if the previous succeeded;||runs it only if the previous failed - Cron + Scripts: Combine shell scripts with cron for automated administration: backup scripts, log cleanup, user provisioning, system health checks. Example:
0 2 * * * /root/scripts/backup.sh >> /var/log/backup.log 2>&1runs a backup at 2 AM daily and logs output
While the RHCSA does not require advanced scripting, you must be comfortable writing basic scripts that automate common tasks. Practice creating scripts that: create multiple users from a list, set up directories with specific permissions, and schedule tasks with cron. Remember that scripts executed by cron run in a minimal environment — always use absolute paths for commands and files. Test scripts manually before scheduling them, and redirect output to log files for troubleshooting.