Red Hat Certified System Administrator

Hey there! I'm currently working as an Associate DevOps Engineer, and I'm diving into popular DevOps tools like Azure Devops,Linux, Docker, Kubernetes,Terraform and Ansible. I'm also on the learning track with AWS certifications to amp up my cloud game. If you're into tech collaborations and exploring new horizons, let's connect!
Day 1: Introduction to RHCSA & Installation
What is RHCSA?
RHCSA stands for Red Hat Certified System Administrator.
Why RHCSA is Important
Industry-recognized Linux certification
Required for Linux system administration jobs
Builds strong foundation in:
Linux OS
Users & permissions
Filesystems
Networking
Services & processes
Useful for DevOps, SysAdmin, Cloud, and Server roles
How We Install Linux for Practice
We do not install Linux directly on our main system. Instead, we use Virtualization.
Virtual Machine (VM)
We use VMware (or VirtualBox)
A VM allows us to run an OS inside another OS
Example:
Host OS: Windows
Guest OS: RHEL / CentOS / Rocky Linux
Installation Steps (High Level)
Install VMware
Create a new Virtual Machine
Attach Linux ISO file
Allocate:
RAM
CPU
Disk
Install Linux OS inside VM
β This method is safe and widely used for learning and testing
Day 2: Linux Directory Structure & Basic Commands
Root Directory /
Linux has a single root directory /. Everything starts from here.
Important System Directories
| Directory | Purpose |
/ | Root of the filesystem |
/root | Home directory of root user |
/home | Home directories of normal users |
/bin | Essential user commands (ls, cp, mv) |
/sbin | System/admin commands |
/etc | Configuration files |
/var | Logs, mail, variable data |
/tmp | Temporary files |
/boot | Bootloader & kernel files |
Basic Commands Learned
whoami
β‘ Shows current logged-in user
ls
β‘ Lists files and directories
cd
β‘ Changes directory
Examples:
cd /etc
cd ..
cd ~
Linux Terminal Prompt Explained
Example:
hassan@server1:/home/hassan$
| Part | Meaning |
hassan | Username |
server1 | Hostname |
/home/hassan | Current directory |
$ | Normal user |
# | Root user |
β Correction:
$β normal user#β root (admin) user
Day 3: How Linux OS Boots + File Commands
How Operating System Works (Boot Process)
Correct boot order:
BIOS / UEFI
- Initializes hardware
Bootloader (GRUB2)
Loads the kernel
Allows selecting different OS
Kernel
Core of OS
Manages CPU, memory, devices
init / systemd
- Starts services
Login Screen
- OS is ready to use
β Correction:
BIOS does not load the OS directly
BIOS/UEFI loads the bootloader
Bootloader loads the kernel
Kernel starts the OS
Multiple OS Concept
If multiple OS are installed
GRUB menu allows choosing which OS to boot
π§ One-Line Memory Trick
Linux:
UEFI β GRUB β Kernel β systemd β Services β ReadyWindows:
UEFI β Boot Manager β Kernel β Services β Login β Ready
File Commands
cp source destination
β‘ Copy files or directories
Examples:
cp file1 file2
cp -r dir1 dir2
mv source destination
β‘ Move or rename files
Examples:
mv file1 /tmp
mv oldname newname
Change Hostname
Temporary:
hostname newname
Permanent (Recommended):
hostnamectl set-hostname newname
Day 4: BIOS vs UEFI, Editors & Practice Tasks
BIOS vs UEFI
| BIOS | UEFI |
| Old technology | Modern |
| Slow boot | Fast boot |
| MBR partition | GPT partition |
| Limited disk size | Supports large disks |
| Text-based | GUI support |
β UEFI is used in modern systems
Text Editors
Linux has command-line editors.
Nano (Easy)
nano file.txt
Easy to use
Shortcuts shown at bottom
Save:
CTRL + OExit:
CTRL + X
Vim (Advanced)
vim file.txt
Modes:
Normal mode (default)
Insert mode β
iCommand mode β
:
Common commands:
i # insert mode
:w # save
:q # quit
:wq # save and quit
:q! # quit without saving
Practice Tasks
Create files
Edit files using nano & vim
Copy and move files
Rename files
Change hostname
Navigate directories
β Summary
You learned:
RHCSA basics and importance
Linux installation using VMware
Linux directory structure
Basic Linux commands
Boot process (BIOS β GRUB β Kernel β OS)
BIOS vs UEFI
File operations
Nano & Vim editors
RHCSA β Class Notes (Day 5 & 6)
Day 5: File and Directory Management
Copying Directories
cp -r source_directory destination_directory
-rβ recursive (copy directory and all its contents)Example:
cp -r /home/hassan/docs /home/hassan/backup_docs
Deleting Files
rm filename
- Removes a file
rm -i filename
- Asks confirmation before deletion
Deleting Directories
rmdir directory_name
- Removes empty directories only
rm -r directory_name
- Removes directory and all contents recursively
rm -rf directory_name
Removes directory and contents without warning
β οΈ Use carefully! Can delete important data
Wildcard *
*is used to represent all files or directoriesExample:
rm *.txt
- Deletes all
.txtfiles in current directory
Command Structure
command [options] [arguments]
Command β what to do (
ls,cp,rm)Options β modify behavior (
-l,-r,-f)Arguments β files or directories to operate on
Example:
ls -l /home/hassan
Hidden Files
Files starting with
.are hiddenCreate a hidden file:
touch .hiddenfile
Clear Terminal
clear
- Clears the screen
Creating Directories
mkdir folder_name
Nested Directories
mkdir -p parent_folder/child_folder
-pβ create parent directories if they donβt exist
Creating Multiple Folders
mkdir folder{1..10}
- Creates
folder1,folder2, β¦folder10
Creating Multiple Files
touch file{1..10}.txt
- Creates
file1.txtβfile10.txt
Viewing Directory Tree
tree directory_name
Day 6: Reading File Content & Searching
View File Content
cat
cat /etc/services
- Displays entire file content
more
more /etc/fstab
- Shows file page by page (use space to scroll)
less
Better alternative to
moreScroll forward/backward
less /etc/fstab
head
head -n 10 /etc/services
- Shows first 10 lines of file
tail
tail -n 10 /etc/services
- Shows last 10 lines of file
nl
nl /etc/services
- Shows file content with line numbers
Search Inside Files β grep
grep "pattern" filename
Search for specific text in a file
Example:
grep "ftp" /etc/services
With options
-iβ ignore case-cβ show count of matching lines-vβ show non-matching lines-nβ show line numbers
Example:
grep -i "ftp" /etc/services
grep -c "ssh" /etc/services
Word Count β wc
wc filename
- Shows lines, words, characters
Options:
-lβ number of lines-wβ number of words-cβ number of bytes-mβ number of characters
Example:
wc -l /etc/services
wc -w /etc/services
Redirection & Operators
- Redirect output to a file
ls > file.txt
Overwrites
file.txtwith output oflsAppend output to a file
ls >> file.txt
Adds output to the end of
file.txtPipes (send output of one command to another)
cat /etc/services | grep ftp
β Correction:
>β overwrite>>β append|β pipe (send output to another command)
Summary β Day 5 & 6
You learned:
Copying, moving, deleting files and directories
Wildcards
*for multiple filesCommand structure (command β options β arguments)
Hidden files and creating them
Creating folders/files in bulk
Reading files (
cat,more,less,head,tail,nl)Searching in files (
grepwith options)Word count (
wc)Redirection (
>,>>) and pipes (|)
Day 7: Operators in Linux
Linux allows combining commands and controlling execution flow using operators.
1οΈβ£ Semicolon ;
Purpose: Run multiple commands sequentially, regardless of whether previous commands succeed or fail
Syntax:
command1; command2; command3
- Example:
echo "Hello"; ls; pwd
Output:
Prints βHelloβ
Lists files
Shows current directory
β Note: Commands run one by one even if one fails.
2οΈβ£ Single Pipe |
Purpose: Sends output of first command as input to second command
Syntax:
command1 | command2
- Example:
cat /etc/services | grep ftp
catprints file βgrepfilters only lines containing βftpβ
3οΈβ£ Double AND &&
Purpose: Run second command only if the first command succeeds
Syntax:
command1 && command2
- Example:
mkdir test && cd test
- Only enters
testfolder if folder creation succeeds
4οΈβ£ Single AND &
Purpose: Run command in background
Syntax:
command &
- Example:
gedit file.txt &
- Opens
geditin background, so terminal is free to use
5οΈβ£ Double Pipe ||
Purpose: Run second command only if the first command fails
Syntax:
command1 || command2
- Example:
cd nonexistfolder || echo "Folder does not exist"
- If
cdfails, prints warning
Summary of Operators
| Operator | Purpose |
; | Run commands sequentially, ignore errors |
&& | Run next command only if previous succeeds |
| ` | |
& | Run command in background |
| ` | ` |
User and Group Management
Linux manages users and groups for access control and permissions.
Types of Users
| User Type | Description | UID |
| Root user | Super admin, full privileges | 0 |
| System user | Used by OS services, limited login | 1β999 |
| Regular user | Normal human user, limited privileges | 1000+ |
Types of Groups
| Group Type | Description |
| Root group | Associated with root user, admin group |
| System group | For OS processes and services |
| Regular group | For normal users, sharing resources |
Commands (Basics)
- View current user
whoami
- View groups of a user
groups username
- View all users
cat /etc/passwd
- View all groups
cat /etc/group
β Corrections / Clarifications
UID ranges for system vs regular users:
System: 1β999
Regular: 1000+
Background operator: single
&runs command in background, not a chain.Pipes and logical operators (
&&,||) are different:|β sends output to input&&/||β controls execution flow
Examples
# Sequential execution
echo "Start"; ls; echo "End"
# Logical AND
mkdir demo && cd demo
# Logical OR
cd nofolder || echo "Folder not found"
# Background process
gedit file.txt &
# Pipe
cat /etc/services | grep ftp
This covers Day 7 operators + intro to user & group management.
RHCSA Day 8 β User and Group Management
User and group management is a core topic in RHCSA and very important for real-world Linux administration. On Day 8, we focused on creating users, managing passwords, understanding user IDs (UIDs), group IDs (GIDs), and how Linux stores user and group information internally.
1. Adding a New User
To create a new user in Linux, we use the useradd command.
useradd username
Example:
useradd ali
This command:
Creates the user
Assigns a UID automatically
Creates a home directory
/home/aliAssigns a default shell
β οΈ By default, the user does not have a password yet.
2. Setting or Changing User Password
To set or change a password, use:
passwd username
Example:
passwd ali
You will be prompted to enter and confirm the password.
3. Checking User ID and Group Information
Check UID and GID
id username
Example:
id ali
Output shows:
UID (User ID)
GID (Primary Group ID)
Secondary groups
Check Current Logged-in User
whoami
4. Types of Users in Linux
Linux has three main types of users:
| User Type | Description | UID Range |
| Root User | Superuser with full access | 0 |
| System User | Used by services and processes | 1β999 |
| Regular User | Normal human users | 1000+ |
5. Modifying a User (User Management)
The usermod command is used to modify user properties.
Example: Set Account Expiry Date
usermod -e 2026-12-31 ali
Lock a User Account
usermod -L ali
Unlock a User Account
usermod -U ali
6. Password Aging and Expiry
We can control password policies using chage.
chage username
Example:
chage ali
To view password aging info:
chage -l ali
You can:
Set password expiry
Force password change
Set warning days
7. Users vs Groups
What is a User?
An individual account
Has its own UID
Can log in
What is a Group?
Collection of users
Used to manage permissions easily
Identified by GID
Groups make permission management easier instead of assigning permissions user by user.
8. Adding Groups
groupadd groupname
Example:
groupadd developers
9. Primary and Secondary Groups
Primary Group
Each user has one primary group
Assigned at user creation
Used by default when creating files
Secondary Groups
Additional groups a user belongs to
Used for extra permissions
Add User to a Secondary Group
usermod -aG groupname username
Example:
usermod -aG developers ali
β οΈ
-ais very important. Without it, existing groups will be removed.
10. Checking User and Group Files
Linux stores user and group information in /etc directory.
/etc/passwd
cat /etc/passwd
Contains:
Username
UID
GID
Home directory
Shell
Passwords are not stored here.
/etc/shadow
cat /etc/shadow
Contains:
Encrypted passwords
Password expiry info
Only readable by root user.
/etc/group
cat /etc/group
Contains:
Group name
GID
Group members
11. Summary (Day 8)
On Day 8, we learned:
How to add users and set passwords
How to check UID, GID, and group membership
Difference between users and groups
Primary vs secondary groups
How to add users to groups
User modification and password expiry
Internal Linux files:
/etc/passwd,/etc/shadow,/etc/group
This topic is very important for RHCSA exam and real Linux administration.



