Red Hat Linux Administration
By Himanshu Shekhar , 09 Jan 2022
π΄ Red Hat Linux Administration β Module 01
This module introduces the fundamentals of Linux and Red Hat Enterprise Linux (RHEL), explaining what Linux is, why it is used in enterprises, and how Red Hat fits into modern IT infrastructure.
1.1 What is Linux?
Linux is an open-source operating system kernel originally created by Linus Torvalds in 1991.
In simple terms, Linux is the core software that allows users and applications to communicate with computer hardware.
- π§ Manages CPU, memory, storage, and devices
- π₯ Used on servers, desktops, mobiles, cloud, and embedded systems
- π Open-source and community driven
Android, AWS servers, Google infrastructure, and supercomputers all run Linux.
1.2 Linux Distributions Overview
A Linux Distribution (Distro) is a complete operating system built around the Linux kernel.
| Distribution | Purpose |
|---|---|
| Ubuntu | Beginner-friendly desktop & server |
| Debian | Stable, community-driven |
| CentOS Stream | RHEL upstream testing |
| Red Hat Enterprise Linux | Enterprise-grade production OS |
1.3 What is Red Hat Enterprise Linux (RHEL)?
RHEL is a commercial Linux distribution developed by Red Hat for enterprise environments.
- π’ Used in banks, telecom, cloud, and government
- π Strong security & SELinux enabled by default
- π Long-term updates and patches
- π Official enterprise support
1.4 Linux vs Windows (Admin Perspective)
| Feature | Linux | Windows |
|---|---|---|
| Cost | Free / Subscription (RHEL) | Licensed |
| Security | Very High | Moderate |
| Server Usage | Dominant | Limited |
| Automation | Shell & Ansible | PowerShell |
1.5 Open Source Philosophy
Open-source software is built on the idea of collaboration, transparency, and freedom. It allows anyone to inspect, improve, and share software without vendor lock-in.
In open-source, the source code is publicly available. This enables developers, organizations, and security experts worldwide to contribute and audit the software.
- β Viewed β Anyone can examine how the software works internally
- β Modified β Code can be customized to meet specific business needs
- β Distributed β Software can be shared legally under open licenses
Linux follows the open-source model, which is why it evolves rapidly and remains highly secure.
π Why Open Source is Trusted
- π Security through visibility β Vulnerabilities are found and fixed faster
- β No vendor lock-in β Freedom to switch vendors or self-support
- π Rapid innovation β Thousands of contributors improve the software
- π° Cost-effective β No forced licensing fees
Companies often use open-source software with commercial support from vendors like :contentReference[oaicite:1]{index=1} to ensure reliability, updates, and compliance.
π’ Open Source in the Real World
Major organizations rely on open-source technologies every day:
- β Cloud platforms like :contentReference[oaicite:2]{index=2}
- π± Mobile operating systems like :contentReference[oaicite:3]{index=3}
- π Internet infrastructure powered by Linux servers
π Linux Administrator Career Path
| Level | Role |
|---|---|
| Beginner | Linux Support Engineer |
| Intermediate | Linux System Administrator |
| Advanced | DevOps / Cloud Engineer |
π΄ Module 02 β Installation & System Access
This module explains how Red Hat Enterprise Linux (RHEL) is installed, how the Linux boot process works, and how administrators access systems locally and remotely in real-world environments.
2.1 RHEL Installation Methods
Red Hat Enterprise Linux (RHEL) can be installed using multiple methods. The choice depends on the number of systems, automation needs, and whether the environment is local, data center, or cloud.
π Common RHEL Installation Methods (Explained Simply)
- DVD / ISO Installation β Used when installing RHEL on a single machine manually. Best for learning, labs, and small setups.
- USB Installation β A bootable USB drive created from an ISO file. Common for laptops, desktops, and standalone servers.
- Network Installation (PXE) β Systems boot over the network instead of local media. Widely used in data centers to install many servers quickly.
- Kickstart Installation β Fully automated installation using a configuration file. No manual input required once started.
- Cloud Images β Preconfigured RHEL images provided by cloud platforms like :contentReference[oaicite:1]{index=1}, :contentReference[oaicite:2]{index=2}, and :contentReference[oaicite:3]{index=3}.
You should understand DVD/ISO and Kickstart concepts clearly.
π’ Which Method Should You Use?
| Scenario | Recommended Method |
|---|---|
| Learning / Practice Lab | DVD or USB |
| Single Server | USB or ISO |
| Multiple Servers | PXE + Kickstart |
| Cloud Environment | Cloud Images |
Large enterprises use PXE + Kickstart to deploy hundreds of servers with the same configuration in minutes.
π§© Core Installation Components (What Happens During Install)
- Boot Loader (GRUB2) β Starts the operating system when the server powers on.
- Disk Partitioning β Can be automatic or manual (LVM is commonly used in enterprises).
- File System Selection β XFS is the default and recommended file system in RHEL.
- User & Root Configuration β Create admin users and secure the root account.
- Software Selection β Choose server, minimal, or GUI-based installations.
Minimal installations are preferred on servers to reduce attack surface and improve performance.
π§ Easy Way to Remember
- π¦ ISO / USB β Manual & learning
- β‘ PXE β Network-based install
- π€ Kickstart β Automation
- β Cloud Image β Instant VM
2.2 Linux Boot Process Explained
The Linux boot process is a step-by-step sequence that starts the operating system after the system is powered on. Understanding this process helps administrators troubleshoot boot failures quickly.
π Linux Boot Process (High-Level Flow)
Think of the boot process like starting a car: power β engine β systems β driver control. Each stage must complete successfully for the next one to start.
-
BIOS / UEFI
This is the first program that runs after power-on. It performs basic hardware checks (CPU, RAM, disks) and looks for a bootable device.
Example: Hard disk, SSD, USB, or network (PXE). -
GRUB2 Bootloader
GRUB2 loads the Linux kernel into memory and allows selecting different kernels or operating systems.
Admins can edit boot parameters here for recovery. -
Kernel Initialization
The Linux kernel takes control of the system, detects hardware, loads drivers, and mounts the root filesystem (/).
If the kernel cannot find the root filesystem, boot will fail. -
systemd (PID 1)
systemd is the first user-space process. It starts services, mounts filesystems, and reaches the required system target (multi-user or graphical). -
Login Prompt / GUI
Once all essential services are running, the system presents a text login or graphical login screen to the user.
BIOS β GRUB β Kernel β systemd β Login
π§© What Happens If Something Goes Wrong?
- β BIOS error β Hardware or boot device issue
- β GRUB missing β Bootloader corruption
- β Kernel panic β Driver or filesystem problem
- β systemd failure β Service or configuration issue
Most boot problems are caused by GRUB misconfiguration, disk issues, or incorrect /etc/fstab entries.
π― RHCSA Exam Focus
- Understand the boot order
- Know what GRUB2 does
- Know that systemd is PID 1
- Be able to identify boot-stage failures
2.3 Console vs GUI Login
Linux systems can be accessed using either a text-based console (command line) or a Graphical User Interface (GUI). Understanding both is essential for a Linux administrator.
π₯ Login Types Explained (Simple Way)
| Login Type | Description | Common Usage |
|---|---|---|
| Console (TTY) | Text-based login using username and password. No mouse or graphics. | Servers, cloud VMs, troubleshooting, remote access |
| GUI | Graphical desktop with windows, icons, and mouse. | Desktop systems, beginners, admin learning |
β¨ Console (TTY) Login β What You Should Know
A console login provides direct access to the system shell. It is fast, lightweight, and does not require graphical services.
- Uses very low system resources
- Works even if GUI fails to start
- Preferred for servers and production systems
- Required knowledge for RHCSA exam
π± GUI Login β What You Should Know
GUI login provides a desktop environment such as GNOME. It is user-friendly and helpful for beginners.
- Easy to use for new Linux users
- Helpful for visual configuration tools
- Consumes more CPU and memory
- Rarely used on production servers
π Switching Between Console and GUI
- Ctrl + Alt + F1 β F6 β Switch to text consoles (TTYs)
- Ctrl + Alt + F7 β Return to graphical interface (GUI)
Think of Console as talking directly to the system, and GUI as using the system through visuals.
π’ Server & Enterprise Reality
- Most servers run in console-only mode
- No GUI means better performance
- Lower attack surface improves security
- All administration is done via command line or SSH
If you can manage Linux from the console, you can manage it anywhere β servers, cloud, or containers.
2.4 Linux Boot Process Explained
The Linux boot process is a fixed sequence of steps that starts the operating system after power-on. Understanding this flow helps administrators identify and fix boot failures quickly.
π High-Level Boot Flow (Easy to Remember)
Think of the Linux boot process like a chain. Each step must complete successfully for the next one to begin.
- β‘ Power On
- π§ BIOS / UEFI
- π GRUB2 Bootloader
- π§ Linux Kernel
- β systemd (PID 1)
- π Login Prompt / GUI
BIOS β GRUB β Kernel β systemd β Login
π§ Step 1: BIOS / UEFI (Hardware Initialization)
BIOS or UEFI is the first program that runs when the system powers on. It checks hardware components and looks for a bootable device.
- Initializes CPU, RAM, disks
- Performs POST (Power-On Self Test)
- Selects boot device (HDD, SSD, USB, PXE)
π Step 2: GRUB2 Bootloader
GRUB2 loads the Linux kernel into memory and allows administrators to choose kernel versions or recovery mode.
- Located in /boot
- Reads configuration from /boot/grub2/grub.cfg
- Allows boot parameter editing
# View default boot target
systemctl get-default
# Regenerate GRUB config (RHEL)
grub2-mkconfig -o /boot/grub2/grub.cfg
π§ Step 3: Kernel Initialization
The Linux kernel takes control of the system. It detects hardware, loads drivers, and mounts the root filesystem (/).
- Kernel file: vmlinuz
- Temporary filesystem: initramfs
- Hardware drivers loaded
# Display kernel version
uname -r
# View kernel boot messages
dmesg | less
β Step 4: systemd (PID 1)
systemd is the first user-space process and always runs with PID 1. It starts services, mounts filesystems, and reaches the system target.
- Manages services and daemons
- Controls system targets
- Handles startup dependencies
# Check system boot time
systemd-analyze
# List failed services
systemctl --failed
# Check current target
systemctl get-default
π Step 5: Login Prompt / GUI
Once systemd completes startup, the system presents a login prompt or graphical login screen.
- Text login β Console (TTY)
- Graphical login β Desktop environment
- System is now ready for use
π¨ Common Boot Failure Points
- β BIOS error β Hardware or boot device issue
- β GRUB error β Bootloader misconfiguration
- β Kernel panic β Driver or filesystem issue
- β systemd failure β Service or config problem
Most boot issues are caused by GRUB, /etc/fstab, or disk problems.
π§ Easy Way to Remember (Admin View)
- β‘ Power β Hardware check
- π GRUB β Kernel loader
- π§ Kernel β Hardware + filesystem
- β systemd β Services
- π Login β User access
2.5 System Shutdown & Reboot
Linux provides several safe and controlled methods to shut down or reboot a system. Proper shutdown ensures data safety, service integrity, and file system consistency.
π Why Proper Shutdown Is Important
Shutting down a Linux system is not just turning off power. The operating system must safely stop running processes and write pending data to disk.
- π Prevents file system corruption
- πΎ Ensures all data is saved correctly
- β Allows services to stop gracefully
- π Maintains system stability and security
β» Safe Shutdown Methods (Recommended)
These methods allow Linux to safely stop services and power off the system.
- shutdown -h now β Gracefully shuts down the system immediately
- poweroff β Powers off the system safely
- systemctl poweroff β Modern systemd-based shutdown command
π Safe Reboot Methods
Rebooting restarts the system safely after stopping all services. Used during updates, kernel changes, or maintenance.
- reboot β Safely restarts the system
- shutdown -r now β Graceful reboot immediately
- systemctl reboot β Recommended reboot command on RHEL
β° Scheduled Shutdown & Reboot
Administrators can schedule shutdowns in advance, which is useful during maintenance windows.
- shutdown -h 10 β Shutdown after 10 minutes
- shutdown -r 23:00 β Reboot at 11:00 PM
- shutdown -c β Cancel a scheduled shutdown
π¨ Emergency Reboot (Last Resort)
Emergency reboot should be used only if the system is completely unresponsive. It does not stop services properly.
- reboot -f β Force reboot (unsafe)
- echo b > /proc/sysrq-trigger β Immediate reboot (very dangerous)
Never power off a server directly unless the system is completely frozen and no other option works.
π§ Easy Way to Remember
- β shutdown / systemctl β Safe & recommended
- β° shutdown -h time β Scheduled maintenance
- π¨ force reboot β Emergency only
π Real-World Administrator Notes
- Most enterprise Linux systems are installed via automation
- SSH is the backbone of Linux administration
- Understanding boot process is critical for troubleshooting
- Console access is mandatory skill for admins
A Linux administrator must know how to install, boot, access, and safely control systems before managing services or security.
π₯οΈ Red Hat Linux Administration β Module 03
This module explains how administrators access Linux systems using the command line. You will learn about shells, terminals, local and remote access, SSH basics, and command syntax.
3.1 Shell & Terminal
Linux is primarily managed using a command-line interface (CLI). The CLI allows administrators to control systems efficiently and remotely.
π§ What is a Shell?
A shell is a program that interprets commands typed by the user and communicates them to the Linux kernel.
- Acts as a bridge between user and OS
- Executes commands and scripts
- Most common shell: Bash
π₯οΈ What is a Terminal?
A terminal is the application that provides access to the shell. It is simply the interface where commands are typed.
# Check current shell
echo $SHELL
# Display shell name
ps
3.2 Console vs GUI
Linux systems can be accessed using either a text-based console or a Graphical User Interface (GUI).
β¨ Console (TTY)
- Text-only interface
- Low resource usage
- Used on servers and cloud systems
- Works even when GUI fails
π± GUI
- Mouse-based graphical desktop
- Higher memory and CPU usage
- Mainly for desktops and learning
# Switch to text consoles
Ctrl + Alt + F1 to F6
# Return to GUI
Ctrl + Alt + F7
3.3 Local & Remote Login
Linux allows administrators to log in locally or remotely depending on system access.
π Local Login
- Login directly on the machine
- Keyboard & monitor attached
- Common for physical servers
π Remote Login
- Login over a network
- No physical access required
- Uses SSH protocol
# Local login prompt example
login: user
password:
3.4 SSH (Secure Shell) & Remote Access
SSH (Secure Shell) is the standard and most secure method used by Linux administrators to access servers remotely over a network. It allows full system control without physical access.
π Why SSH Is Important in Linux
SSH replaces older, insecure remote access tools such as Telnet. All communication over SSH is encrypted, which protects credentials, commands, and data from attackers.
- π Encrypted communication (prevents data sniffing)
- π» Remote command execution
- π Secure file transfer using SCP and SFTP
- π Supports strong key-based authentication
Most Linux servers do not have a keyboard or monitor. SSH is the primary way administrators manage them.
π How SSH Works (Step-by-Step)
SSH follows a secure client β server communication model. Every SSH connection goes through a fixed sequence to ensure identity verification and encrypted data transfer.
-
Step 1: Client Initiates Connection
The administrator runs an SSH command from the local machine. -
Step 2: Server Identity Verification
The server sends its host key so the client can verify it is connecting to the correct server. -
Step 3: Encrypted Channel Creation
Encryption algorithms and session keys are negotiated. From this point onward, all traffic is encrypted. -
Step 4: User Authentication
The server authenticates the user using a password or an SSH key (recommended). -
Step 5: Secure Shell Session
Access is granted and the user can execute commands remotely. -
Step 6: Encrypted Session in Use
Commands, outputs, and file transfers remain encrypted. -
Step 7: Session Termination
When the user logs out, session keys are destroyed.
β¨ Essential SSH Commands (Must Know)
# Connect to a remote Linux server
ssh user@server_ip
# Connect using a custom SSH port
ssh -p 2222 user@server_ip
# Copy a file from local to remote
scp file.txt user@server:/path
# Copy a file from remote to local
scp user@server:/path/file.txt .
# Start a secure file transfer session
sftp user@server
π§ SSH Authentication Methods
| Method | Description | Security Level |
|---|---|---|
| Password Authentication | User enters account password | β Weak |
| SSH Key-Based Authentication | Uses public & private key pair | β Strong |
| Jump / Bastion Host | Intermediate secure access server | β Enterprise |
π’ SSH in Real-World Server Environments
- Cloud servers are accessed only via SSH
- Automation tools (Ansible) rely on SSH
- DevOps and security teams use SSH daily
- SSH logs are critical for auditing and compliance
β SSH Security Best Practices
- Disable root SSH login
- Disable password authentication
- Use SSH keys only
- Restrict SSH access using firewalls
- Monitor SSH logs regularly
π― RHCSA Exam Focus
- Understand what SSH is and why it is secure
- Know basic SSH, SCP, and SFTP commands
- Understand key-based authentication
- Know why root login is disabled
3.5 Command Syntax
Linux commands follow a standard structure. Understanding this structure prevents mistakes.
π Command Structure
A Linux command generally follows this pattern:
command [options] [arguments]
π§ Example
ls -l /etc
- ls β command
- -l β option
- /etc β argument
π΄ Module 04 β Linux File System & Navigation
This module explains how the Linux file system is organized, how administrators navigate directories, manage files, search data, and handle compression and archives in real-world Red Hat environments.
4.1 Linux Directory Structure
Linux follows a hierarchical file system, meaning all files and directories are organized in a tree-like structure. Everything starts from the root directory (/).
π³ Understanding the Linux File System (Easy Way)
Think of Linux directories like branches of a tree. The root directory / is the base, and all other directories grow from it.
- π Everything is a file (even devices)
- π No drive letters like C: or D:
- π Same structure across most Linux systems
π Important Linux Directories & Their Purpose
| Directory | Purpose (Simple Explanation) |
|---|---|
| / | Root of the entire file system |
| /home | Personal folders for users (documents, downloads) |
| /root | Home directory of the root (admin) user |
| /etc | System configuration files |
| /var | Log files, mail, databases, changing data |
| /bin | Essential user commands (ls, cp, mv) |
| /sbin | System administration commands |
| /usr | Installed software, libraries, documentation |
| /tmp | Temporary files (cleared on reboot) |
| /boot | Bootloader and kernel files |
| /dev | Device files (disks, USB, terminals) |
| /proc | Virtual files showing system & process info |
π§ How Admins Use These Directories
- π Check logs β /var/log
- β Edit configs β /etc
- π€ User data β /home
- π Commands β /bin and /sbin
- π§ͺ Temporary work β /tmp
β Important Safety Rules for Beginners
- β Never delete files randomly from /etc
- β Be careful inside /var, especially /var/log
- β Do not touch /boot unless you know what you are doing
- β Always double-check commands when using root
If you understand the Linux directory structure, navigating and troubleshooting systems becomes much easier.
4.2 File & Directory Operations
Linux administrators manage files and directories primarily using command-line tools. These commands are fast, powerful, and work the same on servers, desktops, and cloud systems.
π Basic Navigation Commands (Know Where You Are)
Before working with files, you must know your current location in the file system.
-
pwd β Shows the present working directory
Example: /home/user -
ls β Lists files and directories
Useful options: ls -l, ls -a, ls -lh -
cd β Changes directory
Example: cd /etc, cd .., cd ~
π Creating Files and Directories
These commands are used to create new files and folders.
- touch file.txt β Creates an empty file
- mkdir folder β Creates a directory
- mkdir -p dir1/dir2 β Creates parent and child directories together
π Copying and Moving Files
Copying and moving are common daily tasks for administrators.
- cp file1 file2 β Copies file1 to file2
- cp -r dir1 dir2 β Copies directories recursively
- mv file newname β Renames a file
- mv file /path/ β Moves file to another location
π Deleting Files and Directories (Be Careful)
Deleting in Linux is permanent. There is no recycle bin when using commands.
- rm file β Deletes a file
- rm -i file β Asks before deleting (safe option)
- rmdir folder β Deletes an empty directory
- rm -r folder β Deletes directory and its contents
rm -rf deletes files and directories without confirmation. One wrong command can destroy the entire system.
π§ Easy Way to Remember (Admin Mindset)
- π Where am I? β pwd
- π Whatβs here? β ls
- πΆ Move around β cd
- π Create β touch, mkdir
- π Copy / Move β cp, mv
- π Delete carefully β rm
Always run ls before and after file operations to confirm what changed.
4.3 Viewing File Content
Linux provides multiple command-line tools to read, inspect, and monitor file contents. These tools are heavily used when working with log files, configuration files, and troubleshooting system issues.
π Common File Viewing Commands (Simple Explanation)
-
cat β Displays the entire file content at once
Best for small files -
less β Scrolls through files page by page
Best for large files and logs -
more β Basic paged file viewer
Older and less flexible than less -
head β Shows the first few lines of a file
Default: first 10 lines -
tail β Shows the last few lines of a file
Default: last 10 lines
π§ When to Use Which Command
| Scenario | Recommended Command |
|---|---|
| Small configuration file | cat |
| Large log file | less |
| Check file header | head |
| Check recent log entries | tail |
| Monitor live logs | tail -f |
β¨ Useful Command Examples
- cat file.txt β View entire file
- less /var/log/messages β Scroll through system logs
- head -n 5 file.txt β View first 5 lines
- tail -n 20 file.txt β View last 20 lines
- tail -f /var/log/secure β Monitor security logs in real time
β Important Tips for Beginners
- Use less instead of cat for large files
- Press q to exit less or more
- tail -f keeps running until you press Ctrl + C
- Most system logs are stored inside /var/log
Linux administrators constantly use less and tail -f to troubleshoot live issues on servers.
4.4 File Searching Techniques
Searching files efficiently is a critical skill for Linux system administrators. Servers often contain thousands of files, and knowing how to locate them quickly saves time and prevents mistakes.
π Common Linux Search Tools (Easy Explanation)
-
find β Searches files and directories
by name, size, type, time, or permissions
Most powerful and accurate tool -
locate β Finds files quickly using a pre-built index
Very fast, but may not show recent files -
grep β Searches for specific text
inside files
Best for logs and configuration files
π§ When to Use Which Command
| Task | Recommended Command |
|---|---|
| Find a file by name | find |
| Quickly locate known files | locate |
| Search error messages in logs | grep |
| Find large files | find |
π Using find (Most Important)
The find command searches the file system in real time and gives accurate results.
- find / -name file.txt β Search file by name from root
- find /var -type f β Find all files inside /var
- find / -size +100M β Find files larger than 100 MB
- find / -perm 777 β Find files with specific permissions
β‘ Using locate (Fast but Limited)
locate searches a database instead of the disk, making it extremely fast.
- locate sshd_config β Quickly find configuration file paths
- updatedb β Update locate database manually
locate may not show newly created files until the database is updated.
π Using grep (Search Inside Files)
The grep command searches for text patterns inside files and logs.
- grep error /var/log/messages β Search for the word βerrorβ in logs
- grep -i failed /var/log/secure β Case-insensitive search
- grep -r keyword /etc β Search recursively inside directories
π§ Easy Way to Remember
- π File location β find
- β‘ Fast lookup β locate
- π Inside file text β grep
Combine commands like find + grep for powerful troubleshooting.
4.5 File Compression & Archiving
Linux administrators compress and archive files for backup, transfer, and storage optimization.
π¦ Common Archive Formats
| Format | Usage |
|---|---|
| .tar | Archive multiple files |
| .tar.gz | Compressed tar archive |
| .zip | Cross-platform archives |
π§ Why Compression Matters
- Reduces disk usage
- Speeds up file transfers
- Used in backups and migrations
Always verify archives after creation to avoid corrupted backups.
π΄ Module 07 β Users, Groups & Permissions
This module explains how Linux manages users and groups, how file permissions work, and how administrators control access using ownership, permissions, and sudo. These concepts are critical for system security and daily administration.
7.1 User & Group Concepts
Linux is a multi-user operating system. Every process, file, and command is executed on behalf of a user and controlled using permissions.
π€ Types of Users in Linux
- Root User (UID 0) β Superuser with full system control
- System Users β Used by services (nginx, sshd, mail)
- Normal Users β Human users with limited permissions
π₯ Groups in Linux (Easy Explanation)
Groups allow administrators to manage permissions for multiple users at once.
- Each user has one primary group
- A user can belong to multiple secondary groups
- Permissions are often granted to groups instead of users
All developers can be added to a dev group to share project files safely.
7.2 User Management Commands
Linux administrators manage users using standard system commands. These commands directly affect system security.
π Common User Management Commands
- useradd username β Create a new user
- usermod β Modify user properties
- userdel username β Delete a user
- passwd username β Set or change password
- id username β Display UID, GID, groups
π Important User Database Files
- /etc/passwd β User account information
- /etc/shadow β Encrypted passwords
- /etc/group β Group definitions
Never edit /etc/shadow manually. Always use system commands.
7.3 Linux Permissions Explained
Linux controls access using a permission-based security model. Permissions decide who can read, write, or execute a file.
π Permission Types
- r β Read
- w β Write
- x β Execute
π€ Permission Levels
- User (Owner)
- Group
- Others
7.4 Ownership & Access Control
Every file and directory in Linux has an owner, a group, and permission settings.
π§ Ownership Commands
- chown user file β Change file owner
- chgrp group file β Change group
π§© Permission Management Commands
- chmod 755 file β Numeric mode
- chmod u+x file β Symbolic mode
Wrong permissions can cause application failures or security vulnerabilities.
7.5 Sudo & Privilege Delegation
Linux administrators should avoid using the root account directly. Instead, controlled access is provided using sudo.
π‘ What is sudo?
- Allows users to run commands as root
- Logs all privileged actions
- Limits which commands users can run
π Sudo Configuration
- Configuration file β /etc/sudoers
- Always edit using visudo
Grant only the minimum privileges required (Principle of Least Privilege).
π΄ Module 05 β Package Management (YUM / DNF)
This module explains how software is installed, updated, removed, and managed in Red Hat Enterprise Linux using YUM and DNF. Package management is a core responsibility of every Linux administrator.
5.1 What is a Package?
A package is a compressed archive that contains:
- Application binaries
- Configuration files
- Libraries and dependencies
- Documentation
- Installation scripts
In RHEL, software is distributed primarily as RPM (Red Hat Package Manager) files.
Installing httpd installs Apache binaries, config files, and service scripts together.
5.2 YUM & DNF Basics
YUM (Yellowdog Updater Modified) and DNF (Dandified YUM) are package managers used to manage RPM packages.
π YUM vs DNF
| Feature | YUM | DNF |
|---|---|---|
| Default in RHEL | RHEL 7 | RHEL 8+ |
| Performance | Slower | Faster |
| Dependency handling | Good | Better |
| Future support | Deprecated | Actively developed |
Learn DNF β it fully replaces YUM in modern RHEL.
5.3 Installing & Removing Software
Administrators use package managers to safely manage software with automatic dependency resolution.
π¦ Common Package Operations
- Install new packages
- Update existing packages
- Remove unused software
- Search for packages
- List installed packages
Removing system packages may break services or the OS.
5.4 Repository Management
A repository is a storage location that contains packages and metadata used by YUM/DNF.
π Types of Repositories
- BaseOS
- AppStream
- Supplementary
- Third-party repositories
π Repository Configuration Location
- /etc/yum.repos.d/*.repo
Many organizations use local or internal repositories for security and control.
5.5 Package Troubleshooting
Package-related issues are common and must be resolved carefully.
π§© Common Problems
- Dependency conflicts
- Broken repositories
- Network or DNS issues
- Corrupted cache
π Troubleshooting Techniques
- Cleaning metadata cache
- Checking repository availability
- Verifying installed package versions
- Reviewing error messages carefully
π Real-World Administrator Notes
- DNF is one of the most-used admin tools in RHEL
- Repositories must be secure and trusted
- Always test updates before production rollout
- Package issues can impact system stability
Mastering package management ensures systems remain secure, updated, and reliable.
π΄ Module 06 β Process & System Monitoring
This module explains how Linux processes work, how administrators monitor system performance, manage running processes, and troubleshoot high CPU, memory, or load issues in Red Hat systems.
6.1 Understanding Linux Processes
A process is a running instance of a program. Every command or application running on Linux is a process.
π§ Key Process Concepts
- Each process has a unique PID (Process ID)
- Every process has a parent process (PPID)
- All processes originate from systemd (PID 1)
- Processes can run in foreground or background
When you run a command, the shell creates a child process to execute it.
6.2 Process Management Commands
Linux provides powerful command-line tools to view and control running processes.
π§ Common Process Commands
- ps β View process status
- top β Real-time process monitoring
- htop β Enhanced interactive process viewer
- kill β Send signals to processes
- pkill β Kill process by name
Killing critical system processes may crash services or the OS.
6.3 System Resource Monitoring
Monitoring system resources helps administrators identify performance bottlenecks and prevent outages.
π Key System Metrics
- CPU utilization
- Memory usage
- Disk I/O
- System load average
π Common Monitoring Tools
- top / htop β CPU & memory
- free β Memory usage
- uptime β Load average
- vmstat β Memory and process stats
- iostat β Disk performance
High load does not always mean high CPU usage.
6.4 Job Control
Job control allows administrators to manage foreground and background tasks in the shell.
π§© Job Control Concepts
- Foreground job β Active and attached to terminal
- Background job β Running without terminal control
- Stopped job β Temporarily paused
β¨ Job Control Shortcuts
- Ctrl + Z β Suspend current job
- bg β Resume job in background
- fg β Bring job to foreground
- jobs β List active jobs
6.5 Performance Tuning Basics
Performance tuning focuses on optimizing system behavior without compromising stability.
β Common Performance Issues
- High CPU usage
- Memory exhaustion
- Disk I/O bottlenecks
- Zombie or runaway processes
π Basic Tuning Practices
- Identify resource-hungry processes
- Restart misbehaving services
- Schedule heavy jobs during off-peak hours
- Monitor trends over time
Always monitor before tuning. Guessing leads to downtime.
π Real-World Administrator Notes
- Process monitoring is a daily admin task
- Top and htop quickly reveal system issues
- Understanding load average is critical
- Job control improves productivity
Effective process and system monitoring allows administrators to detect problems early and maintain system stability.
π΄ Module 07 β Storage & File Systems
This module explains how storage works in Linux, including disks, partitions, file systems, mounting, Logical Volume Management (LVM), swap space, and disk quotas. Storage management is a critical skill for Red Hat Linux administrators.
7.1 Disk & Partition Concepts
Linux storage begins with physical or virtual disks, which are divided into partitions.
π½ Types of Disks
- HDD (Hard Disk Drive)
- SSD / NVMe
- Virtual disks (Cloud / VM)
π Disk Naming in Linux
- /dev/sda β First disk
- /dev/sda1 β First partition
- /dev/vda β Virtual disk
- /dev/nvme0n1 β NVMe disk
Always identify disks carefully before partitioning to avoid data loss.
7.2 File System Types
A file system defines how data is stored and retrieved on a disk or partition.
π¦ Common Linux File Systems
| File System | Description |
|---|---|
| XFS | Default RHEL file system, high performance |
| EXT4 | Stable and widely used |
| VFAT | USB and cross-platform compatibility |
| SWAP | Used for virtual memory |
RHEL uses XFS by default for most partitions.
7.3 Mounting & Unmounting File Systems
Linux does not use drive letters. Instead, file systems are mounted to directories.
π Mount Concepts
- Mount point = directory
- Unmount before removal
- Temporary or permanent mounts
π Permanent Mount Configuration
- /etc/fstab defines persistent mounts
- Incorrect entries can prevent boot
Always test /etc/fstab entries carefully.
7.4 LVM (Logical Volume Manager) Basics
LVM allows flexible disk management, enabling resizing without downtime.
π§± LVM Components
- Physical Volume (PV) β Disk or partition
- Volume Group (VG) β Pool of storage
- Logical Volume (LV) β Usable volume
LVM allows dynamic resizing without reinstalling the OS.
7.5 Swap & Disk Quotas
Swap and disk quotas help manage system memory and control disk usage by users.
π Swap Space
- Acts as overflow for RAM
- Improves system stability
- Can be partition or file
π Disk Quotas
- Limit disk usage per user/group
- Prevents single user from filling disk
- Used heavily in shared systems
π Real-World Administrator Notes
- Storage mistakes can cause system downtime
- LVM is standard in enterprise environments
- Always backup before disk operations
- Monitor disk usage regularly
Understanding storage and file systems allows administrators to manage data safely, efficiently, and at scale.
π΄ Module 08 β Networking Fundamentals
This module introduces Linux networking fundamentals, including IP addressing, network configuration, troubleshooting tools, hostname resolution, DNS, and firewall basics using firewalld. Networking is a core skill for every Linux administrator.
8.1 Network Basics
Networking allows Linux systems to communicate with other systems on local networks and the internet.
π Key Networking Concepts
- IP Address β Unique system identifier
- Subnet Mask β Defines network range
- Gateway β Exit point to other networks
- DNS β Resolves names to IPs
- Ports & Protocols β Define communication rules
Web servers commonly use TCP port 80 (HTTP) and 443 (HTTPS).
8.2 IP Configuration
Linux systems can use either static or dynamic (DHCP) IP addressing.
π‘ IP Address Types
- Static IP β Manually configured, fixed
- Dynamic IP β Assigned automatically via DHCP
π Common Network Tools
- ip β Show and configure network interfaces
- nmcli β NetworkManager CLI tool
- ifconfig β Legacy (deprecated)
ip and nmcli are preferred over ifconfig in modern RHEL.
8.3 Network Troubleshooting
Network troubleshooting is essential when systems cannot communicate or access services.
π Common Troubleshooting Commands
- ping β Test connectivity
- traceroute β Trace network path
- ss β View open ports and sockets
- curl β Test application-level access
- tcpdump β Packet capture (advanced)
Always check IP, gateway, and DNS before assuming a service failure.
8.4 Hostname & DNS
Hostnames make systems easier to identify, while DNS translates names into IP addresses.
π₯ Hostname Management
- Each Linux system has a unique hostname
- Used in logs, networking, and authentication
π Important Files
- /etc/hostname β System hostname
- /etc/hosts β Local name resolution
- /etc/resolv.conf β DNS servers
/etc/hosts is often used for testing before DNS changes.
8.5 Firewalld Basics
firewalld is the default firewall management service in RHEL.
π₯ Firewall Concepts
- Controls inbound and outbound traffic
- Uses zones to define trust levels
- Rules can be temporary or permanent
π§± Common Zones
- public β Default zone
- trusted β All traffic allowed
- internal β Internal networks
- drop β All incoming traffic dropped
Always allow required services before enabling strict firewall rules.
π Real-World Administrator Notes
- Networking issues are among the most common admin problems
- DNS misconfiguration breaks many services
- Firewall rules should be minimal and documented
- Always test connectivity after changes
Strong networking fundamentals allow Linux administrators to deploy, secure, and troubleshoot systems effectively.
π΄ Module 09 β Services & Daemons (systemd & Logs)
This module explains how Linux services (daemons) work, how to manage them using systemd, and how to analyze system logs using journalctl. Service and log management are core skills for Red Hat Linux administrators.
9.1 What are Services & Daemons?
A daemon is a background process that starts automatically and provides system or network services.
π§ Key Characteristics
- Run in the background
- Usually start at boot time
- Listen for requests or perform scheduled tasks
- Often end with the letter d (sshd, httpd)
sshd allows remote login using SSH.
9.2 systemd & Service Management
systemd is the default service manager in RHEL. It controls system startup, services, and dependencies.
β systemd Responsibilities
- System boot process
- Service start/stop/restart
- Dependency management
- Logging integration
π Common systemctl Commands
- systemctl status β View service status
- systemctl start β Start a service
- systemctl stop β Stop a service
- systemctl restart β Restart a service
- systemctl reload β Reload config without restart
Always check service status after starting or restarting it.
9.3 Enabling & Disabling Services
Services can be configured to start automatically when the system boots.
π Boot-Time Control
- enable β Start service at boot
- disable β Prevent service from starting at boot
- is-enabled β Check boot status
Disabling critical services may prevent system access.
9.4 Log Files & journalctl
Logs are essential for troubleshooting system and service issues. RHEL uses journald for centralized logging.
π Log Sources
- Kernel messages
- Service logs
- Authentication events
- Boot and shutdown logs
π journalctl Capabilities
- View logs by service
- Filter by time
- View boot logs
- Analyze errors and failures
Logs are the first place to check when a service fails.
9.5 Troubleshooting Services
Service failures are common and require a structured troubleshooting approach.
π Troubleshooting Steps
- Check service status
- Review logs using journalctl
- Verify configuration files
- Check port conflicts and permissions
- Restart or reload the service
π Real-World Administrator Notes
- systemd replaces older init systems
- journalctl is a powerful centralized log tool
- Logs explain failures better than guesswork
- Service monitoring prevents downtime
Mastering systemd and logs allows administrators to control, troubleshoot, and secure Linux services efficiently.
π΄ Module 10 β Security, SELinux & Hardening
This module focuses on securing Red Hat Linux systems. It covers Linux security fundamentals, SELinux concepts, modes and policies, firewall protection, and system hardening best practices. Security is a top responsibility of every Linux administrator.
10.1 Linux Security Basics
Linux security is built on multiple layers that work together to protect systems from unauthorized access and misuse.
π‘ Core Security Layers
- User & group permissions
- File ownership and access controls
- Firewall rules
- SELinux mandatory access control
- System updates and patching
Defense in depth β never rely on a single security control.
10.2 SELinux Concepts
SELinux (Security-Enhanced Linux) provides Mandatory Access Control (MAC) on top of traditional permissions.
π Why SELinux Matters
- Restricts what processes can do
- Limits damage from compromised services
- Protects even if file permissions are weak
π§ Key SELinux Terms
- Context β Security label on files/processes
- Policy β Rules defining allowed actions
- Type Enforcement β Core SELinux mechanism
SELinux should be enabled and understood, not disabled.
10.3 SELinux Modes & Policies
SELinux operates in different modes that control how strictly policies are enforced.
β SELinux Modes
- Enforcing β Policies enforced (default)
- Permissive β Violations logged only
- Disabled β SELinux turned off
π Policy Types
- Targeted β Protects key services (default)
- MLS β Multi-Level Security (advanced)
Disabling SELinux reduces system security significantly.
10.4 Firewall & Security Rules
Firewalls control network access and reduce the systemβs attack surface.
π₯ Firewall Responsibilities
- Allow required services only
- Block unused ports
- Protect against unauthorized access
π§± Firewalld Best Practices
- Use zones appropriately
- Open ports only when needed
- Make rules permanent after testing
A closed port is more secure than a monitored open port.
10.5 System Hardening Best Practices
System hardening reduces vulnerabilities by minimizing attack vectors and enforcing best practices.
π Hardening Techniques
- Disable unused services
- Apply regular security updates
- Use strong authentication policies
- Limit root access and use sudo
- Enable auditing and logging
π Monitoring & Auditing
- Review logs regularly
- Monitor failed login attempts
- Track configuration changes
Security hardening is an ongoing process, not a one-time task.
π Real-World Administrator Notes
- Most breaches exploit misconfiguration, not bugs
- SELinux prevents silent privilege abuse
- Hardening improves compliance and stability
- Security must be balanced with usability
A secure Linux system relies on SELinux, firewalls, and continuous hardening to protect against threats.
π΄ Module 11 β Shell Scripting Basics
This module introduces Shell Scripting, a powerful skill that allows Linux administrators to automate repetitive tasks, manage systems efficiently, and reduce human error. Shell scripting is essential for real-world administration and RHCSA preparation.
11.1 What is Shell Scripting?
A shell script is a text file containing a sequence of Linux commands that are executed automatically by the shell.
π§ Why Shell Scripting?
- Automates repetitive admin tasks
- Saves time and reduces mistakes
- Ensures consistency across systems
- Essential for DevOps and sysadmins
A script can check disk usage on multiple servers automatically.
11.2 Variables & Conditions
Variables store data, while conditions allow scripts to make decisions based on logic.
π¦ Variables
- Store values like numbers, strings, or command output
- No spaces around
= - Accessed using
$variable
π Conditional Statements
- if β execute based on condition
- if-else β choose between two paths
- elif β multiple conditions
Always test conditions carefully to avoid logic errors.
11.3 Loops & Functions
Loops and functions allow scripts to repeat tasks and organize code efficiently.
π Loops
- for β iterate over a list
- while β loop while condition is true
- until β loop until condition becomes true
π§© Functions
- Reusable blocks of code
- Improve readability
- Reduce duplication
Use functions to organize large scripts logically.
11.4 Automating Admin Tasks
Shell scripts are widely used to automate daily administrative operations.
β Common Automation Use Cases
- User creation and cleanup
- Log rotation and backups
- Service health checks
- System monitoring scripts
β° Scheduling Scripts
- Use cron for recurring jobs
- Automate tasks at fixed intervals
Automation reduces downtime and operational costs.
11.5 Script Debugging
Debugging helps identify errors and improve script reliability.
π Debugging Techniques
- Use
bash -x script.sh - Add echo statements
- Check exit codes (
$?) - Validate input values
π Real-World Administrator Notes
- Shell scripting is expected for Linux admins
- Simple scripts can save hours of manual work
- Readable scripts are easier to maintain
- Automation improves system reliability
Shell scripting empowers Linux administrators to automate tasks, enforce consistency, and manage systems efficiently.
π΄ Module 12 β RHCSA / Real-World Practice
This module bridges the gap between theory and real-world Linux administration. It focuses on hands-on scenarios, troubleshooting, and RHCSA exam-oriented tasks that system administrators face daily in production environments.
12.1 Common Admin Scenarios
Linux administrators solve real problems every day. RHCSA tests your ability to think like an admin, not just remember commands.
π§ Typical Admin Scenarios
- User cannot log in due to permission issues
- Service fails to start after reboot
- Disk is full and system becomes unstable
- Network connectivity suddenly stops
- SELinux blocks a legitimate service
Always diagnose the root cause before applying fixes.
12.2 Hands-on Lab Exercises
RHCSA is a performance-based exam. You must practice real commands on real systems.
π§ͺ Essential Lab Tasks
- Create users, groups, and assign permissions
- Configure static IP and hostname
- Manage services using systemctl
- Create and mount file systems
- Configure SELinux contexts
- Set up firewall rules
If you canβt do it without notes, practice again.
12.3 Troubleshooting Case Studies
Troubleshooting is a core skill tested heavily in RHCSA and used constantly in real jobs.
π Troubleshooting Methodology
- Identify the problem clearly
- Check logs and error messages
- Verify configurations
- Test one change at a time
- Confirm the fix
π Example Cases
- Service fails due to incorrect SELinux context
- System fails to boot due to bad fstab entry
- User denied access because of group misconfiguration
Logs almost always explain what went wrong.
12.4 RHCSA Exam Tips
The RHCSA exam tests speed, accuracy, and confidence under time pressure.
π― Exam Strategy
- Read tasks carefully before executing
- Do easy tasks first
- Verify every task before moving on
- Use man pages when unsure
- Do not panic if stuck
If the task works, it passes β method doesnβt matter.
12.5 Linux Admin Career Path
RHCSA is the foundation of a strong Linux career. It opens doors to enterprise system administration roles.
π Career Progression
- Linux System Administrator
- Senior Linux Engineer
- DevOps Engineer
- Cloud Administrator
- Site Reliability Engineer (SRE)
π§© Skills That Matter Most
- Troubleshooting under pressure
- Automation with shell scripting
- Security awareness
- Clear documentation
Good admins are valued not for knowing commands, but for keeping systems running.
π― Final Takeaway β Think Like an Administrator
- Practice daily on real systems
- Understand why things work
- Learn from mistakes
- Focus on stability and security
You have completed the Red Hat Linux Administration learning path. You now have the foundation to pass RHCSA and succeed as a Linux system administrator.