Advertisement

HexaGuard: Mastering the Art of Digital Shadows

Understanding Operating Systems (Theory & Hands-on)

🟢 1. What is an OS? How does it manage hardware & software?

An Operating System (OS) is a software layer between the hardware and user applications. It manages:
Hardware: CPU, RAM, Disk, Network, Peripherals.
Software: Applications, Processes, Security, User Interface.

🛠 Hands-on Task: Check OS Details   [ detailed explanation with output and breakdowns : click here ]

Windows: Open Command Prompt (cmd) and run:

cmd

systeminfo

Linux: Open Terminal and run:

bash

uname -a lsb_release -a

🟢 2. Types of OS: Windows, Linux, macOS, Unix – Key Differences

FeatureWindowsLinuxmacOSUnix
Source CodeClosedOpen SourceClosedOpen (BSD, AIX)
File SystemNTFS, FAT32EXT4, XFS, BtrfsAPFSUFS, ZFS
SecurityWeak (by default)StrongStrongStrong
User InterfaceGUI-BasedCLI & GUIGUICLI & GUI

🛠 Hands-on Task: Find OS Type [ detailes explanation with output and break down : click here ]

Windows:

cmd

echo %OS%

Linux:

bash

cat /etc/os-release

🟢 3. OS Architecture: Kernel, User Space, System Calls, Libraries

Kernel – Core of the OS (controls hardware). [ for detailed content : click here ]
User Space – Where applications run. [ for detailed content : click here ]
System Calls – Bridge between user space & kernel. [ for detailed content : click here ]
Libraries – Pre-written code apps use. [ for detailed content : click here ]

🛠 Hands-on Task: Check Kernel Details [ for detailed explanation with output and breakdown : click here ]

Windows:

powershell

Get-ComputerInfo | Select-Object OsName, OsArchitecture, WindowsVersion, OsBuildNumber

Linux:

bash

uname -r # Kernel version

🟢 4. Boot Process

Windows Boot Process

🔹 BIOS/UEFI → MBR/GPT → Bootloader → Kernel Load → Login
Check Boot Configuration in Windows:

cmd

bcdedit

List Startup Services in Windows:

cmd

wmic startup get caption,command

Linux Boot Process

🔹 GRUB → Init/Systemd → Kernel → User Space
Check Boot Logs in Linux:

bash

dmesg | less systemctl list-units --type=service --state=running

List Systemd Services in Linux:

bash

systemctl list-units --type=service

🟢 5. Filesystem Structure & Permissions

Windows File System

  • Uses NTFS, FAT32.
  • Supports ACL (Access Control List) for permissions.

Check File System in Windows:

cmd

fsutil fsinfo drives

Check NTFS Permissions:

cmd

icacls C:\Users\YourUser

Linux File System

  • Uses EXT4, XFS, Btrfs.
  • File permissions: chmod, chown, umask.

Check Linux File System:

bash

df -Th

Change File Permissions in Linux:

bash

chmod 755 myfile.txt chown user:group myfile.txt

🟢 6. Process & Memory Management

Windows:

  • Uses Task Manager to monitor processes.
  • Virtual Memory (Pagefile.sys) for swapping.

Check Running Processes in Windows:

cmd

tasklist wmic process list brief

Kill a Process in Windows:

cmd

taskkill /IM notepad.exe /F

Linux:

  • Uses Virtual Memory, Paging, Swapping.
  • Manage processes with ps, top, htop.

Check Running Processes in Linux:

bash

ps aux top htop # (If installed)

Kill a Process in Linux:

bash

kill -9 <PID>

🚀 Final Hands-on Tasks (Complete These)

Install Windows 10/11 and Linux (Kali, Ubuntu, Arch) in VirtualBox or VMware.
Experiment with Windows Services:

cmd

sc query wmic service get name, state

Use Linux Commands:

bash

ls -l cat /etc/passwd find / -name "*.conf" grep "root" /etc/passwd awk '{print $1}' /etc/passwd sed 's/root/admin/g' /etc/passwd tmux new -s hacking-session

Post a Comment

0 Comments