Red Hat · linux

Red Hat RHCSA EX200

Essential Linux system administration: users, permissions, storage, networking, containers, and systemd services.

11Modules
35 hoursDuration
intermediateLevel

Course Modules

01
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]. Use man command for documentation, info command for detailed manuals, and command --help for quick usage summaries
  • Command History & Editing: Use the up/down arrows to cycle through history, history to list all previous commands, !n to re-run command number n, and Ctrl+R to 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 with export VAR. Key environment variables include PATH, HOME, USER, SHELL, and PS1. Use env or printenv to 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 -la lists files with permissions and hidden entries. cp -r copies directories recursively. mv moves or renames. rm -rf removes recursively and forcefully. mkdir -p creates nested directories in one command
  • Finding Files: find / -name "*.conf" -type f searches the filesystem in real time by name, type, size, permissions, or modification time. locate filename queries a pre-built database (updated via updatedb) for faster but potentially stale results
  • Archiving & Compression: tar -czf archive.tar.gz /path creates a gzip-compressed archive. tar -xzf archive.tar.gz extracts it. tar -cjf uses bzip2, tar -cJf uses xz. star is 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 file shows inode number, size, permissions, timestamps (access, modify, change). file filename identifies file type. du -sh /path shows disk usage for a directory, and df -h shows 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 file searches case-insensitively. grep -r pattern /dir searches 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' file performs global search-and-replace. sed -i edits files in place. awk '{print $1, $3}' file extracts specific fields from structured text. Both are essential for automated configuration changes in scripts
  • Text Filtering Tools: cut -d: -f1 /etc/passwd extracts the first field (usernames). sort orders lines alphabetically or numerically (-n). uniq removes adjacent duplicates (pipe from sort first). wc -l counts lines in a file
  • File Viewing: head -n 20 file shows the first 20 lines. tail -n 20 file shows the last 20. tail -f /var/log/messages follows a log file in real time. less provides paginated viewing with search (press /pattern to search forward)
  • Comparing Files: diff file1 file2 shows line-by-line differences. diff -u produces unified format output commonly used in patches. comm compares 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
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/sdb opens the interactive MBR partitioning tool. Use n to create, d to delete, t to change type (83 for Linux, 8e for LVM), p to print, and w to write changes. Run partprobe to inform the kernel of changes
  • Partitioning with gdisk: gdisk /dev/sdb is the GPT equivalent of fdisk. Supports the same workflow but with GPT partition types (8300 for Linux filesystem, 8e00 for LVM). Use sgdisk for scriptable non-interactive GPT partitioning
  • Parted: parted /dev/sdb supports both MBR and GPT. Use mklabel gpt to initialize, mkpart primary ext4 1MiB 500MiB to 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 resize2fs command. XFS is the default on RHEL, supports only growing (no shrink), has a maximum file size of 8 EB, and uses xfs_growfs. Both support journaling
  • Creating File Systems: mkfs.xfs /dev/sdb1 creates an XFS filesystem. mkfs.ext4 /dev/sdb1 creates ext4. Use -L label to assign a label. blkid displays the UUID, label, and filesystem type of block devices
  • Mounting Filesystems: mount /dev/sdb1 /mnt/data mounts temporarily. For persistent mounts, add an entry to /etc/fstab with the format: UUID=xxxx /mount/point xfs defaults 0 0. Run mount -a to test fstab entries without rebooting
  • UUID and Labels: Always use UUIDs in /etc/fstab instead of device names like /dev/sdb1, because device names can change between boots. Use blkid to find UUIDs and xfs_admin -L label /dev/sdb1 or tune2fs -L label /dev/sdb1 to set labels
  • Swap Space: Create swap partitions with mkswap /dev/sdb2 and activate with swapon /dev/sdb2. Add to /etc/fstab as UUID=xxxx swap swap defaults 0 0. Use swapon --show to 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/sdb1 initializes a PV. vgcreate myvg /dev/sdb1 /dev/sdc1 creates a VG from multiple PVs. lvcreate -n mylv -L 5G myvg creates a 5 GB LV. Then format with mkfs.xfs /dev/myvg/mylv and mount it
  • Extending LVM: Add a new PV to the VG with vgextend myvg /dev/sdd1. Extend the LV with lvextend -L +2G /dev/myvg/mylv or use -l +100%FREE to use all remaining space. Then grow the filesystem: xfs_growfs /mount/point for XFS or resize2fs /dev/myvg/mylv for ext4
  • Reducing LVM: Only ext4 supports shrinking. Unmount first, then e2fsck -f /dev/myvg/mylv, resize2fs /dev/myvg/mylv 3G, and finally lvreduce -L 3G /dev/myvg/mylv. XFS volumes cannot be reduced — only recreated
  • LVM Verification: pvs, vgs, lvs provide concise summaries. pvdisplay, vgdisplay, lvdisplay show detailed information. lsblk shows 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: pvcreatevgcreatelvcreatemkfs → 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
User Management

Key Concepts

  • Creating Users: useradd username creates a user with defaults (home directory, shell, UID). Common options: -u UID sets a specific UID, -s /sbin/nologin prevents interactive login, -d /home/custom sets a custom home directory, -e 2026-12-31 sets an expiration date
  • Modifying & Deleting Users: usermod -aG groupname username adds a user to a supplementary group (-a appends; without it, all other groups are removed). usermod -L username locks an account. userdel -r username deletes the user and their home directory
  • Password Management: passwd username sets or changes a password. chage -l username lists password aging info. chage -M 90 username sets maximum password age to 90 days. chage -d 0 username forces a password change at next login
  • User Configuration Files: /etc/passwd stores user accounts (username:x:UID:GID:comment:home:shell). /etc/shadow stores encrypted passwords and aging data. /etc/login.defs defines 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/nologin as 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 groupname creates a new group. groupadd -g 5000 groupname sets a specific GID. groupmod -n newname oldname renames a group. groupdel groupname deletes 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/passwd GID field) and zero or more supplementary groups (listed in /etc/group). Files are created with the owner's primary group. Use newgrp groupname to temporarily switch the effective primary group
  • Group Administration: gpasswd -a user group adds a user to a group. gpasswd -d user group removes a user from a group. gpasswd -A user group makes a user a group administrator who can manage group membership without root access
  • Group Configuration Files: /etc/group stores group definitions (groupname:x:GID:members). /etc/gshadow stores group passwords and administrator lists. View effective group memberships with id username or groups 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
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, r lists contents, w allows creating/deleting files, x allows entering the directory
  • Chmod Numeric & Symbolic: chmod 755 file sets rwxr-xr-x. chmod u+x file adds execute for the owner. chmod go-w file removes write for group and others. chmod -R 750 /dir applies permissions recursively to a directory tree
  • Chown & Chgrp: chown user:group file changes both owner and group. chown -R user:group /dir applies recursively. chgrp groupname file changes 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/bashrc or ~/.bashrc. Use umask to view and umask 027 to set
  • Directory Permissions: Execute (x) on a directory means you can cd into it and access files by name. Read (r) means you can list its contents with ls. Without x, 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 file or 4xxx), the process runs with the file owner's privileges. Example: /usr/bin/passwd has SUID so regular users can modify /etc/shadow. SUID has no effect on directories
  • SGID (Set Group ID): On files (chmod g+s file or 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 /dir or 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 -l output, SUID appears as s in the owner execute position, SGID as s in the group execute position, and sticky bit as t in the others execute position. Uppercase S or T means 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 of ls -l output indicates an ACL is present
  • Setting ACLs: setfacl -m u:username:rwx /file grants a specific user rwx access. setfacl -m g:groupname:rx /file grants a specific group rx access. setfacl -x u:username /file removes a specific ACL entry. setfacl -b /file removes all ACLs
  • Default ACLs: setfacl -m d:u:username:rwx /dir sets 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 /file sets 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 /file displays all ACL entries including owner, group, mask, and other permissions. The output shows effective permissions when the mask restricts an entry. Use getfacl -R /dir to 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
Network Configuration

Key Concepts

  • NetworkManager & nmcli: NetworkManager is the default network management daemon on RHEL. nmcli con show lists 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 manual configures a static IP. nmcli con up "eth0" activates the connection
  • nmtui: A text-based user interface for NetworkManager. Run nmtui to 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 (or ip a) displays all interfaces and their IP addresses. ip route show displays the routing table and default gateway. ip link show displays link-layer information and interface state (UP/DOWN)
  • Hostname Configuration: hostnamectl set-hostname server1.example.com sets the static hostname persistently. The hostname is stored in /etc/hostname. Add local name resolution entries in /etc/hosts for 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.conf file controls name resolution order (files before dns means /etc/hosts is 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 host tests ICMP connectivity. traceroute host (or tracepath) shows the path packets take to a destination, identifying where connectivity fails. curl -v http://host tests HTTP connectivity at the application layer
  • Socket Statistics: ss -tlnp shows listening TCP sockets with process information. ss -ulnp shows listening UDP sockets. ss -an shows all connections with numeric addresses. This replaces the deprecated netstat command on RHEL
  • DNS Troubleshooting: dig example.com queries DNS and shows detailed response information. nslookup example.com provides simpler DNS lookup output. host example.com performs a quick DNS resolution check. Verify /etc/resolv.conf for correct nameserver entries
  • Firewall Basics: firewall-cmd --list-all shows 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
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-zone shows the current default
  • Adding Services & Ports: firewall-cmd --add-service=http --permanent allows HTTP traffic. firewall-cmd --add-port=8080/tcp --permanent opens a custom port. The --permanent flag 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 --reload or reboot. Permanent rules require --reload to take effect. Best practice: add rules with --permanent, then run firewall-cmd --reload to apply them
  • Rich Rules: firewall-cmd --add-rich-rule='rule family="ipv4" source address="192.168.1.0/24" service name="ssh" accept' --permanent creates granular rules based on source address, destination, service, port, and action (accept/reject/drop)
  • Verification: firewall-cmd --list-all displays all rules in the active zone. firewall-cmd --list-services shows allowed services. firewall-cmd --list-ports shows allowed ports. firewall-cmd --get-active-zones shows 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 with setenforce 1 or setenforce 0
  • Persistent SELinux Configuration: The file /etc/selinux/config controls the mode at boot. Set SELINUX=enforcing for 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 with ls -Z, process contexts with ps -eZ, and port contexts with semanage port -l
  • Common Context Types: httpd_sys_content_t for web content served by Apache, sshd_t for the SSH daemon process, user_home_t for 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_t can read httpd_sys_content_t but not user_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 /path resets 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 run restorecon -Rv /custom/web to 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 httpd lists all HTTP-related booleans. setsebool -P httpd_enable_homedirs on persistently enables a boolean (-P for 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 recent finds recent denials. Install setroubleshoot-server for sealert, which provides human-readable explanations and suggested fixes for each denial
  • Port Contexts: semanage port -l | grep http lists ports assigned to HTTP types. semanage port -a -t http_port_t -p tcp 8888 allows 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 Control

Key Concepts

  • Viewing Processes: ps aux lists all processes with user, PID, CPU/memory usage, and command. ps -ef provides a similar view with parent PID. top (or htop if installed) provides a real-time, interactive view of system resource usage sorted by CPU or memory
  • Killing Processes: kill PID sends SIGTERM (signal 15), which requests graceful termination. kill -9 PID sends SIGKILL, which forces immediate termination (cannot be caught or ignored). killall processname kills all processes with a given name. pkill -u username kills 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 command starts a process with lower priority. renice -n 5 -p PID changes the priority of a running process. Only root can set negative nice values
  • Job Control: Ctrl+Z suspends the foreground process. bg %1 resumes it in the background. fg %1 brings it to the foreground. jobs lists 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 httpd starts a service. systemctl stop httpd stops it. systemctl restart httpd restarts (stop + start). systemctl reload httpd reloads configuration without stopping. systemctl status httpd shows the current state, PID, and recent log entries
  • Enabling & Disabling: systemctl enable httpd creates symlinks so the service starts at boot. systemctl disable httpd removes those symlinks. systemctl enable --now httpd enables and starts in one command. systemctl is-enabled httpd checks the boot-time status
  • Masking Services: systemctl mask httpd prevents a service from being started by any means (manual or dependency). systemctl unmask httpd reverses 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.target is equivalent to runlevel 3 (text mode). graphical.target is equivalent to runlevel 5 (GUI). systemctl get-default shows the default target. systemctl set-default multi-user.target changes it
  • Journalctl: journalctl -u httpd shows logs for a specific unit. journalctl -f follows the log in real time. journalctl --since "1 hour ago" filters by time. journalctl -p err shows only error-level and above messages. The journal is stored in /run/log/journal by 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
YUM/DNF

Key Concepts

  • Core DNF Operations: dnf install httpd installs a package and its dependencies. dnf remove httpd uninstalls it. dnf update updates all packages. dnf update httpd updates a specific package. DNF is the replacement for YUM on RHEL 8+ and they share the same syntax
  • Searching & Querying: dnf search keyword finds packages by name or description. dnf info httpd shows package details (version, size, description). dnf list installed shows all installed packages. dnf provides /path/to/file identifies which package owns a specific file
  • Group Packages: dnf group list lists 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/*.repo files. Key fields: baseurl or mirrorlist, enabled=1, gpgcheck=1, gpgkey. dnf repolist shows enabled repos. dnf config-manager --add-repo URL adds a new repository
  • Module Streams: dnf module list shows available module streams (e.g., python36, python38, python39). dnf module enable python39 selects a stream. dnf module install python39 installs 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 -qa lists all installed packages. rpm -qi httpd shows detailed information about an installed package. rpm -ql httpd lists all files installed by a package. rpm -qf /usr/sbin/httpd identifies which package owns a file. rpm -qd httpd lists documentation files
  • RPM Installation: rpm -ivh package.rpm installs a local RPM file (i = install, v = verbose, h = hash progress). rpm -Uvh package.rpm upgrades (installs if not present). rpm -e packagename removes a package. RPM does not resolve dependencies — use DNF for that
  • GPG Key Verification: rpm --import https://url/RPM-GPG-KEY imports a GPG public key. rpm -K package.rpm verifies 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 list shows all available modules with their streams and profiles. dnf module reset modulename clears the selected stream. dnf module switch-to modulename:stream changes 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
Cron and at

Key Concepts

  • Crontab: crontab -e edits the current user's cron schedule. crontab -l lists it. crontab -e -u username edits 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.sh runs at 2:30 AM every Monday
  • System Cron: /etc/crontab is 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 minutes schedules a one-time job. Type commands, then press Ctrl+D to save. atq lists pending jobs. atrm jobnumber removes a scheduled job. Access control: /etc/at.allow and /etc/at.deny control which users can use at
  • systemd Timers: systemd timers are the modern replacement for cron. Each timer unit (.timer) triggers a corresponding service unit (.service). systemctl list-timers shows 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.conf defines 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/messages captures most system messages. /var/log/secure logs authentication events. /var/log/boot.log records boot messages. /var/log/cron logs cron job execution. /var/log/audit/audit.log stores SELinux and auditd events
  • journalctl Filtering: journalctl -u sshd filters by unit. journalctl --since "2026-04-01" --until "2026-04-02" filters by date range. journalctl -p err shows only errors and above. journalctl _PID=1234 filters 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/journal directory and restart systemd-journald, or set Storage=persistent in /etc/systemd/journald.conf
  • Log Rotation: logrotate automatically compresses, rotates, and removes old log files. Configuration in /etc/logrotate.conf and /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 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 with grub2-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.target provides a full multi-user text environment; graphical.target adds a GUI
  • Boot Targets: systemctl get-default shows the current default target. systemctl set-default multi-user.target changes it. systemctl isolate rescue.target switches 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 e to edit, append rd.break to the linux line, then Ctrl+X to boot. This drops you into initramfs before the real root is mounted. Remount with mount -o remount,rw /sysroot, chroot into /sysroot, run passwd root, then touch /.autorelabel and exit
  • Emergency & Rescue Targets: Append systemd.unit=emergency.target to the GRUB2 kernel line for the most minimal environment (root filesystem mounted read-only). Use systemd.unit=rescue.target for single-user mode with more services. Both require the root password
  • GRUB2 Editing at Boot: Press e at the GRUB2 menu to edit kernel parameters for the current boot only. Common uses: append rd.break for password reset, systemd.unit=rescue.target for rescue mode, or init=/bin/bash for 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/sdXn to check and repair the filesystem. Fix /etc/fstab errors that prevent mounting. Remount root as read-write with mount -o remount,rw / to make changes
  • SELinux Relabeling: After any rd.break password reset, touch /.autorelabel is 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.breakmount -o remount,rw /sysrootchroot /sysrootpasswd roottouch /.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
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/ubi downloads an image. podman images lists local images. Podman commands mirror Docker syntax
  • Running Containers: podman run -d --name myapp -p 8080:80 httpd runs a container in detached mode (-d), with a name (--name), mapping host port 8080 to container port 80 (-p). podman ps lists running containers. podman ps -a includes stopped containers
  • Container Lifecycle: podman stop myapp sends SIGTERM then SIGKILL after a timeout. podman start myapp restarts a stopped container. podman rm myapp removes a container. podman rmi image-id removes an image. podman exec -it myapp /bin/bash opens 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/ubi sets the base image. RUN dnf install -y httpd runs a command during build. EXPOSE 80 documents 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 with chmod +x script.sh. Use variables (NAME="server1"), command substitution (DATE=$(date +%F)), and meaningful comments. Always set set -e to exit on errors in production scripts
  • Conditionals: if [ -f /path/file ]; then ... fi tests if a file exists. if [ "$VAR" = "value" ]; then ... elif ... else ... fi handles 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; done iterates over a list. for i in $(seq 1 10); do ... done iterates over numbers. while read line; do ... done < file.txt processes 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. Use exit 0 for success and exit 1 for 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>&1 runs 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.
Start practicing →