MentOS (Mentoring Operating System)
January 28, 2026 ยท View on GitHub
๐ข Note: The default branch is
main
What is MentOS?
MentOS (Mentoring Operating System) is an open-source educational operating system designed for learning OS development. It provides a realistic yet understandable environment that follows Linux design patterns.
Why MentOS?
- โ Follows Linux guidelines - Similar data structures and algorithms
- โ Beginner-friendly - Well-documented, easy to understand
- โ Fully functional - Real processes, filesystems, drivers, and syscalls
- โ Fast to compile - Builds in seconds on modern hardware
- โ Hands-on learning - Modify and extend real OS features
Quick Start
# Clone the repository
git clone https://github.com/mentos-team/MentOS.git
cd MentOS
# Build
mkdir build && cd build
cmake ..
make
# Create filesystem
make filesystem
# Run in QEMU
make qemu
Login: Use root or user (from filesystem/etc/passwd)
๐ Documentation
All documentation is in the Wiki:
Getting Started
- Getting Started - Set up your environment
- Building MentOS - Compile the OS
- Running MentOS - Boot in QEMU or GRUB
Understanding the Codebase
- Architecture - Project structure
- Kernel - Kernel components and data structures
- C Library - Standard library implementation
- System Calls - 60+ syscall reference
- Filesystem - VFS, EXT2, and ProcFS
- IPC - Semaphores, message queues, shared memory
- Programs - Userspace utilities (40+)
Development
- Development Guide - Add programs and features
- Debugging - GDB and kernel logging
- Contributing - Contribution guidelines
- Features - Feature roadmap with priorities
Project Structure
mentos/
โโโ boot/ โ Bootloader (first code executed)
โโโ kernel/ โ Core OS (processes, memory, drivers, syscalls)
โโโ lib/ โ C library + system call wrappers
โโโ userspace/ โ User programs (40+) and tests (60+)
โโโ filesystem/ โ Root filesystem content (becomes rootfs.img)
โโโ iso/ โ GRUB boot configuration
โโโ doc/ โ Documentation
โโโ CMakeLists.txt โ Build configuration
Features
- โ Process management (fork, exec, wait, signals)
- โ Memory management (paging, buddy system, slab allocator)
- โ File systems (VFS, EXT2, procfs)
- โ Device drivers (keyboard, ATA, RTC, video)
- โ System calls (60+ POSIX-like syscalls)
- โ IPC (semaphores, message queues, shared memory)
- โ Multiple schedulers (RR, Priority, CFS, EDF, RM, AEDF)
- โ User/group management (passwd, shadow, permissions)
- โ Shell with pipes and job control
- โ 40+ userspace programs (ls, cat, ps, etc.)
- โ 60+ test programs
See Features for the complete list of implemented features and roadmap.
Debugging
# GDB debugging (two terminals needed)
make qemu-gdb # Terminal 1: Start QEMU
gdb --command=gdb.run # Terminal 2: Attach GDB
See the Debugging Guide for details.
Contributing
We welcome contributions! Please see the Contributing Guide.
Quick contribution steps
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes following our coding guidelines
- Commit using Conventional Commits:
git commit -m "feature(scope): description" - Push and open a Pull Request
Contributors
Project Manager: Enrico Fraccaroli
Developers: Alessandro Danese, Luigi Capogrosso, Mirco De Marchi, Andrea Cracco, Linda Sacchetto, Marco Berti, Daniele Nicoletti, Filippo Ziche, and many valuable contributors.
Credits
Parts of MentOS are inherited or inspired by DreamOS by Ivan Gualandri.
License
See LICENSE.md for details.
Happy hacking! ๐