OS Internals Overview (filesystems, processes, permissions) | Cyber Security Tutorial - Learn with VOKS
Back Next

OS Internals Overview (filesystems, processes, permissions)


An operating system mainly manages three very important things:

  1. Filesystems (how data is stored)
  2. Processes (running programs)
  3. Permissions (who can access what)

Think of it like a company:

  • Filesystem = Filing cabinet
  • Processes = Workers doing tasks
  • Permissions = Access rules for rooms and documents

Filesystems

What Is a Filesystem?

A filesystem is the method the operating system uses to:

  • Store files
  • Organize folders
  • Keep track of where data lives on the disk

Without a filesystem, your computer would not know:

  • Where your documents are
  • Where programs are installed
  • Where your photos are stored

How Files Are Organized

Operating systems use a tree structure.

Example:

Root
 ├── Users
 │    ├── Alice
 │    │     └── file.txt
 │    └── Bob
 └── Program Files

There is always a top-level folder:

  • Windows → C:\
  • Linux/macOS → /

This top is called the root.

Common Filesystems

Different operating systems use different filesystems:

  • Windows → NTFS
  • Linux → ext4
  • macOS → APFS

Each filesystem controls:

  • Maximum file size
  • File permissions
  • Disk performance
  • Security features

Viewing Files via Command Line

Linux/macOS:

ls

Windows:

dir

Change directory:

cd foldername

Processes

What Is a Process?

A process is a running program.

When you:

  • Open a browser
  • Run a game
  • Start a text editor

The OS creates a process.

Important:

A program is just a file.

A process is that program running in memory.

What the OS Does for Each Process

The OS gives each process:

  • Memory (RAM)
  • CPU time
  • Process ID (PID)
  • Access permissions

Think of it like giving each worker:

  • A desk
  • Electricity
  • An ID badge
  • Work rules

Viewing Processes

Linux/macOS:

ps

Or live monitoring:

top

Windows:

tasklist

To stop a process (Linux/macOS):

kill 1234

(1234 = Process ID)

Permissions

Why Permissions Exist

Imagine if every user could:

  • Delete system files
  • Read other users’ private data
  • Modify the operating system

That would be chaos.

Permissions protect:

  • System files
  • User data
  • Running services

Types of Users

Most systems have:

  • Regular users
  • Administrator (Windows)
  • root (Linux/macOS superuser)

The administrator/root has full control.

File Permissions (Linux/macOS Example)

Each file has three permission categories:

  1. Owner
  2. Group
  3. Others

And three permission types:

  • Read (r)
  • Write (w)
  • Execute (x)

Example:

-rwxr-xr--

Meaning:

  • Owner: read, write, execute
  • Group: read, execute
  • Others: read only

Changing Permissions

Linux/macOS:

chmod 755 file.txt

Windows (basic example):

icacls file.txt

How These Three Work Together

Let’s say you open a text editor and save a file.

Here’s what happens internally:

  1. A process is created for the editor.
  2. The OS checks your permissions.
  3. The filesystem stores the file on disk.
  4. The OS updates metadata (size, location, owner).

Everything is coordinated by the OS kernel.

Simplified Internal Flow

When you run a program:

User Action
   ↓
Shell / GUI
   ↓
Operating System
   ↓
Kernel
   ↓
CPU + Memory + Disk

The kernel is the core of the OS that controls everything.

Example Code:
# List files (Linux/macOS)
ls

# List files (Windows PowerShell)
dir

# Change directory
cd foldername

# View processes (Linux/macOS)
ps

# Live process monitor (Linux/macOS)
top

# View processes (Windows)
tasklist

# Kill a process (Linux/macOS)
kill 1234

# View file permissions (Linux/macOS)
ls -l

# Change permissions (Linux/macOS)
chmod 755 file.txt

# Check permissions (Windows)
icacls file.txt
Cyber Security
Introduction Types of Cyber Threats Cyber Security Domains CIA Triad (Confidentiality Integrity Availability) Career paths in Cyber Security Certifications Ethics and Responsible Disclosure Laws and Regulation (e.g. GDPR, NDPR) What is an OS? Types: Window, Linus, macOS Command-line vs GUI OS Internals Overview (filesystems, processes, permissions) Windows command prompt basics Linux Bash Basics File System Navigation Basic Scripting IP Addressing DNS, DHCP Mac Address OSI VS TCP/IP Models Ports and Protocols (TCP, UDP) Common Protocols (HTTPS, FTP, SSH, etc.) Packet structure Firewalls, IDS/IPS, VPNs Common attacks: MITM, Sniffing Secure Network Practices How the Web works HTTP vs HTTPS URLs, Headers, Cookies Client-Server Architecture Introduction To Web Security OWASP Top 10 Overview Common Threats (XSS, SQLi, CSRF) Inpute validation and authentication flow Basic Exploitation demo (e.g. XSS) Burp Suite Introduction Using a Browser For Testing Password security MFA-Antivirus Cyber Hygeine Practice Intro To Tools: Nmap, Wireshark, Netstat
All Courses
Advance AI Bootstrap C C++ Computer Vision Content Writing CSS Cyber Security Data Analysis Deep Learning Email Marketing Excel Figma HTML Java Script Machine Learning MySQLi Node JS PHP Power Bi Python Python for AI Python for Analysis React React Native SEO SMM SQL