Python OS Simulator

A command-line operating system simulator that mimics core Linux-style behaviors including file management, process handling, and command execution. Built in Python to demonstrate how operating systems interpret commands and manage system resources.

CLI Shell File System Ops Process Handling Command Parsing

Core Features

Command Interface


File System Operations


Process & Memory Simulation

Command System

Command Description
ls List directory contents
mkdir folder Create new directory
touch file.txt Create new file
rm file.txt Delete file
cd folder Change directory

System Architecture

The simulator uses a command parser that interprets user input and maps each command to its corresponding system function, similar to how real shells operate.


Command Parser     → interprets user input
File Manager       → handles file & directory operations
Process Manager    → simulates running processes
Memory Handler     → allocates memory to tasks
Logger             → tracks system activity

System Rules & Constraints

Example Terminal Output

Sample interaction with the OS simulator:


┌───────────────────────────┐
  Python OS Simulator
└───────────────────────────┘

> mkdir projects
Directory created

> touch main.py
File created

> ls
projects
main.py

> rm main.py
File deleted

Technologies Used

Why This Project?

This project demonstrates how operating systems interpret commands, manage files, and simulate processes.