Skip to content

An educational 32-bit linux-like Operating System, with public bachelor- and master-level course slides.

License

Notifications You must be signed in to change notification settings

mentos-team/MentOS

Repository files navigation

MentOS (Mentoring Operating System)

forthebadge forthebadge forthebadge

Ubuntu Documentation

📢 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

Understanding the Codebase

Development

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

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Make your changes following our coding guidelines
  4. Commit using Conventional Commits: git commit -m "feature(scope): description"
  5. 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! 🎉

About

An educational 32-bit linux-like Operating System, with public bachelor- and master-level course slides.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 10

Languages