Skip to content

A Unix-like operating system simulator written in Python. PyOS provides a shell environment (bash-like) with file system and user management with Unix-style commands.

License

Notifications You must be signed in to change notification settings

artur3333/PyOs-Bash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7d036de · · Aug 27, 2025

History

15 Commits
Aug 20, 2025
Aug 20, 2025
Jun 20, 2025
Jun 22, 2025
Aug 21, 2025
Aug 27, 2025
Jul 16, 2025
Aug 20, 2025
Aug 20, 2025
Jul 22, 2025
Aug 20, 2025
Jul 20, 2025
Aug 20, 2025
Aug 20, 2025
Jul 24, 2025
Aug 20, 2025

Repository files navigation

PyOs-Bash

PyOS

A Unix-like operating system simulator written in Python. PyOS provides a shell environment (bash-like) with file system and user management with Unix-style commands.

Features

  • File system simulation: with directory structure within a virtual file system.
  • System setup: installation process, machine name setting, root password setting, user creation.
  • Package manager: with remote package installation.
  • Python: support with virtual environment (venv).
  • Permission and authentification system: owner-based access control and multi-user support

Available Commands

PyOS provides 36 commands in total: 34 are installed by default during system setup, and 2 additional commands (nano and neofetch) can be installed via the package manager:

Command Description Usage
cat Display file contents cat me>
cd Change directory cd ry>
clear Clear the terminal screen clear
cp Copy files/directories cp [-r] tination>
curl Transfer data from servers curl [-X , -H
, -d , -o , -i, -s] _file>, -i, -s] <url>
date Display current date and time date
echo Display text or write to file echo [text] > ename>
find Search for files find rn>
last Show last login information last
logout Log out current user logout
ls List directory contents ls [-a]
man Display manual pages man nd>
mkdir Create directories mkdir …ame2> …
mv Move/rename files mv tination>
nano* Text editor nano me>
neofetch* Display system information neofetch
passwd Change user password passwd []e>]
ping Network connectivity test ping [-c ] hostname>
pip Python package manager pip install/uninstall/list me>
ps Display running processes ps
pwd Print working directory pwd
python Python interpreter python py> / python -m venv th>
rm Remove files/directories rm [-r] …t; …
rmdir Remove directories rmdir …t; …
snakepkg System package manager sudo snakepkg age_name>
source Execute commands from file source th>
su Switch user su []e>]
sudo Execute as root sudo [args...]gs...]
touch Create empty files touch …ile2> …
tree Display directory tree tree [directory]
uptime Show system uptime uptime
useradd Add new user useradd me>
userdel Delete user userdel me>
wget Download files wget [-O , -P , -q] ;, -q] <url>
who Show logged in users who
whoami Display current username whoami

* These commands (nano and neofetch) are not pre-installed. They must be installed via the package manager (snakepkg) first.

Requirements

  • Python: 3.6 or higher
  • Dependencies: Install via requirements.txt
  • Internet connection: internet connection for package manager features

Installation (or you can use the .exe release)

  1. Clone the repository and navigate to the project folder:

    git clone https://github.com/artur3333/PyOs-Bash.git
    
    cd PyOs-Bash
  2. Install the required Python packages:

    pip install -r requirements.txt

Directory Tree

PyOs-Bash/
├── auth.py             # User authentication and session management module
├── bootloader.py       # System bootloader
├── filesystem.py       # File system module
├── os_setup.py         # First-boot system setup module
├── package_manager.py  # Remote package installation/managment system module
├── shell.py            # Command interpreter and shell interface module
├── assets/
│   ├── bin/            # Default commands (34) - installed during setup
│   └── boot/
│       └── kernel.py   # System "kernel"
├── commands/           # Complete command repository (36 total commands)
│                       # ├── 34 commands (copied from assets/bin during setup)
│                       # └── 2 additional commands (nano, neofetch) available via package manager
└── fs/                 # Virtual file system (created on first boot)
    ├── bin/
    ├── boot/
    ├── etc/
    ├── home/
    ├── root/
    ├── var/
    └── ...             # Standard Unix directory structure
 directory structure

Usage

Starting PyOS

python bootloader.py

Starting PyOS Release (.exe)

PyOS.exe

Package Management

PyOS includes a built-in package manager that can install additional commands from a remote server. Currently, 2 additional commands are available for download:

# List available packages
snakepkg available



# Install nano text editor
sudo snakepkg install nano



# Install neofetch system info display
sudo snakepkg install neofetch



# Upgrade packages
sudo snakepkg upgradee

About

A Unix-like operating system simulator written in Python. PyOS provides a shell environment (bash-like) with file system and user management with Unix-style commands.

Topics

Resources

License

Stars

Watchers

Forks

Languages