The Ultimate RHCSA Cheat Sheet for Exam Day
Objective
Facing the RHCSA exam can be challenging, and a handy cheat sheet can ease the pressure. Facing the RHCSA exam can be challenging, and a handy cheat sheet can ease the pressure. Use this resource to reinforce your knowledge and approach the exam with confidence. Master the essential tools and concepts to excel.
1. Essential Commands
-
File Management:
-
ls:
-
List directory contents.
-
Use options like -l for detailed information, -a to include hidden files.
-
-
cp:
-
Copy files or directories.
-
Example: cp -r source/ destination/ to copy directories recursively.
-
-
mv:
-
Move or rename files or directories.
-
Example: mv oldname newname to rename.
-
-
rm:
-
Remove files or directories.
-
Use -r for recursive removal and -f to force deletion.
-
-
find:
-
Search for files and directories.
-
Example: find /path -name "filename" to locate files by name.
-
-
-
Text Processing:
-
grep:
-
Search text using patterns.
-
Example: grep "pattern" file to search for a pattern in a file.
-
-
awk:
-
Pattern scanning and processing language.
-
Example: awk '{print $1}' file to print the first column.
-
-
sed:
-
Stream editor for filtering and transforming text.
-
Example: sed 's/old/new/g' file to replace text.
-
-
vim or nano:
-
Text editors.
-
vim offers advanced features, while nano is simpler for quick edits.
-
-
-
System Monitoring:
-
top:
-
Display tasks and system status.
-
Use -u to view processes by user.
-
-
df:
-
Show disk space usage.
-
Example: df -h for human-readable format.
-
-
du:
-
Estimate file space usage.
-
Example: du -sh /directory for summary of directory size.
-
-
free:
-
Display memory usage.
-
Example: free -m for memory usage in megabytes.
-
-
2. System Configuration
-
Network Configuration:
-
nmcli:
-
NetworkManager command-line tool.
-
Use nmcli device status to check device status.
-
-
ifconfig:
-
Configure network interfaces.
-
Example: ifconfig eth0 up to activate an interface.
-
-
ip:
Show/manipulate routing, devices, policy routing, and tunnels.
-
Example: ip addr show to display IP addresses.
-
-
User and Group Management:
-
useradd:
-
Add a user to the system.
-
Example: useradd -m username to create a user with a home directory.
-
-
usermod:
-
Modify a user account.
-
Example: usermod -aG groupname username to add a user to a group.
-
-
groupadd:
-
Add a group to the system.
-
Example: groupadd groupname to create a new group.
-
-
passwd:
-
Change user password.
-
Example: passwd username to set a password for a user.
-
-
-
Service Management:
-
systemctl:
-
Control the systemd system and service manager.
-
Example: systemctl restart service to restart a service.
-
-
journalctl:
-
Query and display messages from the journal.
-
Example: journalctl -u service to view logs for a service.
-
-
3. Security Practices
-
SELinux:
-
sestatus:
-
Display SELinux status.
-
Example: sestatus to check if SELinux is enabled and its mode.
-
-
setenforce:
-
Change SELinux mode (Enforcing/Permissive).
-
Example: setenforce 0 to switch to Permissive mode.
-
-
semanage:
-
Manage SELinux policy components.
-
Example: semanage fcontext -a -t httpd_sys_content_t '/web(/.*)?' to manage file contexts.
-
-
-
Firewall:
-
firewall-cmd:
-
Manage firewall rules.
-
Example: firewall-cmd --add-service=http --permanent to allow HTTP traffic.
-
-
4. Storage and Filesystems
-
Partitioning:
-
fdisk:
-
Partition table manipulator.
-
Use fdisk /dev/sda to manage partitions on a disk.
-
-
parted:
-
A tool for managing disk partitions.
-
Example: parted /dev/sda to create or modify partitions.
-
-
-
Filesystem Management:
-
mkfs:
-
Create a filesystem.
-
Example: mkfs.ext4 /dev/sda1 to create an ext4 filesystem.
-
-
mount:
-
Mount a filesystem.
-
Example: mount /dev/sda1 /mnt to mount a partition.
-
-
umount:
-
Unmount a filesystem.
-
Example: umount /mnt to unmount a partition.
-
-
5. Backup and Recovery
-
Backup Tools:
-
tar:
-
Archive files.
-
Example: tar -cvf archive.tar /directory to create an archive.
-
-
rsync:
-
Synchronize files and directories.
-
Example: rsync -av /source/ /destination/ for syncing.
-
-
-
Recovery Tools:
-
fsck:
-
File system consistency check and repair.
-
Example: fsck /dev/sda1 to check and repair a filesystem.
-
-
6. Final Tips
-
Understand Exam Objectives: Familiarize yourself with the RHCSA exam objectives to ensure comprehensive preparation. For a detailed breakdown, check out our RHCSA exam guide.
-
Practice Mock Exams: Simulate the exam environment with practice tests to become comfortable with the format and time constraints.
-
Manage Your Time: Practice managing your time effectively across different exam sections to ensure you complete all tasks.
-
Use RHCSAGuru Labs: Leverage RHCSAGuru’s time-bounded labs and mock exams to develop effective time management skills and reinforce your practical knowledge.
By referring to this cheat sheet, you’ll have a quick and easy reference for essential commands and concepts. Good luck with your RHCSA certification—stay confident, and embrace the challenge!