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)
Installation Steps (High Level)
Install VMware
Create a new Virtual Machine
Attach Linux ISO file
Allocate:
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
Bootloader (GRUB2)
Kernel
init / systemd
Login Screen
✅ Correction:
BIOS does not load the OS directly
BIOS/UEFI loads the bootloader
Bootloader loads the kernel
Kernel starts the OS
Multiple OS Concept
🧠 One-Line Memory Trick
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
Vim (Advanced)
vim file.txt
Modes:
Normal mode (default)
Insert mode → i
Command mode → :
Common commands:
i # insert mode
:w # save
:q # quit
:wq # save and quit
:q! # quit without saving
Practice Tasks
✅ 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
cp -r /home/hassan/docs /home/hassan/backup_docs
Deleting Files
rm filename
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
Wildcard *
rm *.txt
- Deletes all
.txt files 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
touch .hiddenfile
Clear Terminal
clear
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
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
grep "ftp" /etc/services
With options
Example:
grep -i "ftp" /etc/services
grep -c "ssh" /etc/services
Word Count – wc
wc filename
- Shows lines, words, characters
Options:
Example:
wc -l /etc/services
wc -w /etc/services
Redirection & Operators
- Redirect output to a file
ls > file.txt
ls >> file.txt
cat /etc/services | grep ftp
✅ Correction:
Summary – Day 5 & 6
You learned:
Copying, moving, deleting files and directories
Wildcards * for multiple files
Command 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 (grep with options)
Word count (wc)
Redirection (>, >>) and pipes (|)
Day 7: Operators in Linux
Linux allows combining commands and controlling execution flow using operators.
1️⃣ Semicolon ;
command1; command2; command3
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 |
command1 | command2
cat /etc/services | grep ftp
cat prints file → grep filters only lines containing “ftp”
3️⃣ Double AND &&
command1 && command2
mkdir test && cd test
- Only enters
test folder if folder creation succeeds
4️⃣ Single AND &
command &
gedit file.txt &
- Opens
gedit in background, so terminal is free to use
5️⃣ Double Pipe ||
command1 || command2
cd nonexistfolder || echo "Folder does not exist"
- If
cd fails, 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)
whoami
groups username
cat /etc/passwd
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:
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:
⚠️ 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.
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?
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
Add User to a Secondary Group
usermod -aG groupname username
Example:
usermod -aG developers ali
⚠️ -a is 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.