This sheet maps to the Red Hat Certified System Administrator exam (EX200), Red Hat's performance-based credential for administering Red Hat Enterprise Linux. The current exam is built on RHEL 10, though nearly every objective applies unchanged to RHEL 9. You are graded on real tasks at a live shell, not multiple-choice recall, so command fluency and understanding why a command works matter far more than trivia. The single rule that sinks more candidates than any other: every configuration must survive a reboot without intervention, so favor persistent mechanisms like /etc/fstab, systemctl enable, and nmcli con mod over one-shot commands.
What This Cheat Sheet Covers
This topic spans 34 focused tables and 370 indexed concepts, 312 flashcards, 11 practice tests with 450 questions. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
A jump-to index of every table row in this cheat sheet.
An interactive map of every table and concept in this topic.
Table 1: Shell Basics and I/O Redirection
RHCSA exam area "Understand and use essential tools": access a shell prompt and issue commands with correct syntax, and use input-output redirection (>, >>, |, 2>, and friends). On RHEL the default interpreter is Bash, and redirecting the three standard streams is a daily, exam-graded skill.
| Concept | Example | Description | |
|---|---|---|---|
stdin = fd 0 (keyboard)stdout = fd 1 (normal output)stderr = fd 2 (errors) | Every process starts with three numbered channels (file descriptors). Normal output and errors both go to the terminal by default but are separate streams, so they can be redirected independently. | ||
command [options] [arguments]rsy[Tab] completesl[Tab][Tab] lists matches | • Bash is the default shell on RHEL • A command takes options then arguments • Press Tab once to complete a unique name, twice to list all matches, which cuts typos | ||
ls file* > out.txtecho hi 1> out.txt | Sends stdout to a file. > is the same as 1>. It truncates: an existing file is wiped to zero and rewritten, so a careless > over a real file destroys it. | ||
echo line >> log.txtdate >> /var/log/job.log | • Adds stdout to the end of a file instead of replacing it, and creates the file if it does not exist• Use it for logs and any file whose existing content must survive | ||
find / -name x 2> err.txtcmd 2>> err.txt (append) | • Captures only the error stream (fd 2). 2> truncates, 2>> appends• Lets you split a command's errors away from its normal output for separate review | ||
cmd > all.log 2>&1 both to filecmd 2>&1 > all.log only stdout to file | 2>&1 makes fd 2 point wherever fd 1 currently points. Order matters: it copies the current target, so > file 2>&1 captures both, but 2>&1 > file leaves errors on the terminal. | ||
cmd &> all.log (truncate)cmd &>> all.log (append) | Shorthand that sends stdout and stderr to one place. &> is the preferred Bash form and is equivalent to > file 2>&1. Use &>> to append both. | ||
cmd 2> /dev/null drop errorscmd &> /dev/null drop all | • /dev/null is a special "black hole" device: anything written there disappears• Redirect a stream to it to silence noise, commonly 2> /dev/null to suppress errors | ||
cat /etc/passwd | grep rootps -ef | grep chrome | wc -l | • Connects the stdout of one command to the stdin of the next, chaining tools• Only stdout travels the pipe• stderr still goes to the terminal unless merged first | ||
sort < names.txtmail user < body.txt | • Feeds a file into a command's stdin in place of the keyboard• Pipe ( |•) connects program to program• < connects a file to a program | ||
cat << EOF line oneEOFread a b <<< "x y" | • A here-document feeds inline text up to a delimiter as stdin• <<- strips leading tabs• A here-string <<< feeds a single string• Both supply stdin without a separate file |