We’ll break this down into structured learning with both theory and hands-on tasks to help you gain a deep understanding. Let's get started!
1️⃣ What is an OS? How Does It Manage Hardware & Software?
Theory:
An Operating System (OS) is system software that acts as an intermediary between hardware and software. It manages system resources (CPU, Memory, Storage, I/O devices) and provides a user interface.
Key Responsibilities of an OS:
- Process Management: Handles multitasking, scheduling, and execution.
- Memory Management: Allocates RAM for processes and ensures efficient memory usage.
- File System Management: Organizes, stores, and retrieves files on disk.
- Device Management: Controls hardware like keyboards, printers, and network adapters.
- Security & User Management: Implements authentication, permissions, and access control.
🔹 Hands-on Task 1: Check OS Details
✅ Windows:
Open Command Prompt (Win + R → cmd) and run:
✅ Linux/macOS:
Open a terminal and run:
📝 Observe the OS name, version, and kernel details.
2️⃣ Types of OS & Key Differences (Windows, Linux, macOS, Unix)
Theory:
Feature | Windows | Linux | macOS | Unix |
---|---|---|---|---|
Open Source? | No | Yes (Mostly) | No | Mostly |
Kernel Type | Hybrid (Windows NT) | Monolithic (Linux Kernel) | Hybrid (XNU) | Monolithic |
Command Shell | CMD/Powershell | Bash/Zsh/Fish | Bash/Zsh | Shell (csh, ksh) |
Filesystem | NTFS, FAT32 | EXT4, XFS, Btrfs | APFS, HFS+ | UFS, ZFS |
Security | Lower (More Malware) | High | Very High | High |
🔹 Hands-on Task 2: Check System Type & Kernel
✅ Windows:
✅ Linux/macOS:
📝 Compare the outputs of different OSes.
3️⃣ OS Architecture: Kernel, User Space, System Calls, Libraries
Theory:
🔹 Kernel: Core of the OS that directly interacts with hardware. ( learn about kernel by clicking here)
🔹 User Space: Applications and processes running outside the kernel.
🔹 System Calls: Interface between applications and the kernel (e.g., open()
, read()
, write()
).
🔹 Libraries: Precompiled functions that applications use (e.g., glibc
for Linux, ntdll.dll
for Windows).
🔹 Hands-on Task 3: Check Running Kernel & System Calls
✅ Windows:
✅ Linux/macOS:
📝 Compare kernel versions across different systems.
4️⃣ Boot Process (Windows vs. Linux)
Theory:
🔹 Windows Boot Process:
The Windows Boot Process follows a structured sequence of events that leads from powering on the system to loading the Windows operating system fully into memory.
- BIOS/UEFI → click here
- MBR/GPT → click here
- Bootloader (Windows Boot Manager) → click here
- NT Kernel (ntoskrnl.exe) → click here
- User Space (Explorer, Apps).
🔹 Linux Boot Process:
The Linux boot process involves several key steps, similar to the Windows boot process, but with a few distinctions due to the nature of Linux. Below is a detailed breakdown of each phase in the process.
BIOS/UEFI →- When the system is powered on, the BIOS (Basic Input/Output System) or UEFI (Unified Extensible Firmware Interface) firmware initializes the hardware components.
- Performs the Power-On Self-Test (POST) to check for hardware issues.
- Identifies the bootable device (HDD, SSD, USB, etc.).
- Loads the bootloader from the Master Boot Record (MBR) or EFI System Partition (ESP).
- The bootloader is responsible for loading the Linux kernel into memory.
- The most commonly used bootloader is GRUB (Grand Unified Bootloader).
- GRUB presents a boot menu where users can choose:
- Kernel versions
- Different operating systems (if dual-boot is configured)
- Recovery mode options
- GRUB loads the selected kernel into RAM and hands over control.
- The init system (older Linux distros) or systemd (modern Linux) takes over.
- Systemd is the most commonly used initialization system today.
- It starts services based on predefined configurations.
- Executes scripts to mount filesystems, enable networking, and launch essential daemons.
- Systemd organizes processes using targets instead of traditional runlevels.
🔹 Hands-on Task 4: Check Boot Process Logs
✅ Windows:
✅ Linux/macOS:
📝 Analyze how your system booted up.
5️⃣ Filesystem Structure & Permissions
Theory:
🔹 Windows: Uses NTFS, FAT32.
🔹 Linux/macOS: Uses EXT4, XFS, Btrfs, APFS.
🔹 Key Directories in Linux:
/home
→ User files/bin
→ Essential binaries/etc
→ Configuration files/var
→ Logs/boot
→ Kernel & bootloader files
🔹 File Permissions (Linux):
r
(read),w
(write),x
(execute)chmod
(change file permissions)chown
(change file ownership)
🔹 Hands-on Task 5: Check Filesystem & Modify Permissions
✅ Windows (Check File System):
✅ Linux/macOS (Check Filesystem & Permissions):
📝 Observe the file structure and change permissions.
6️⃣ Process & Memory Management
Theory:
🔹 Process: A running instance of a program.
🔹 Virtual Memory: Uses disk space as extra RAM (paging/swapping).
🔹 Context Switching: Switching between running processes.
🔹 Thread: A lightweight process (multiple threads run in a process).
🔹 Hands-on Task 6: Monitor Processes & Memory
✅ Windows (Check Processes & RAM Usage):
✅ Linux/macOS (Check Processes & RAM Usage):
📝 Observe running processes and memory usage.
💯 Conclusion & Next Steps
🔥 You've learned:
✅ What an OS is & how it manages hardware/software.
✅ Different OS types and their differences.
✅ OS architecture, boot process, and system calls.
✅ Filesystem structure & permissions.
✅ Process & memory management.
🎯 Next Steps:
- Experiment with boot logs & system monitoring.
- Deep dive into privilege escalation in OS security.
- Learn kernel exploitation and OS hardening techniques.
0 Comments