How to create an OS from scratch logo

How to create an OS from scratch

Free
FreeFree tier
Type
Open Source

About How to create an OS from scratch

This is a step-by-step tutorial on creating an operating system from scratch, hosted on GitHub at cfenollosa/os-tutorial. It covers everything from writing a boot sector to implementing a kernel, video driver, interrupts, a shell, and memory allocation. The course is code-focused, with minimal theory, and each lesson takes about 5–15 minutes to complete. It is designed for programmers comfortable with low-level computing who want practical OS development experience. Note: the project is old and abandoned, with known technical and design issues, but still serves as a useful learning resource.

Key Features

Step-by-step code tutorials from boot sector to kernel
Tiny lessons (5–15 minutes each)
Well-commented code examples
Practical approach with little theory
Builds incrementally (each lesson depends on previous)
Covers topics: boot sector, memory, stack, segmentation, disk, 32-bit mode, GDT, cross-compiler, kernel in C, video driver, interrupts, shell, malloc

Pros & Cons

Pros
  • Hands-on, practical learning with real code
  • Small, digestible lessons that respect your time
  • Well-structured and incremental progression
  • No unnecessary theory; focuses on implementation
  • Large community (30k+ stars) with active discussions
Cons
  • Project is old and abandoned, with known technical and design issues
  • Requires prior comfort with low-level computing and assembly
  • Minimal theoretical explanation; learners must supplement with external research
  • May not reflect modern OS development practices
  • Not suitable for complete beginners to programming

Best For

Learning operating system development from the ground upBuilding a hobby OSUnderstanding low-level computer architecture and assemblySelf-study for programmers interested in OS internals

FAQ

What are the prerequisites for this tutorial?
The tutorial is aimed at people who are comfortable with low-level computing, such as programmers curious about how an OS works. You should understand basic assembly and have some programming experience.
How should I use this tutorial?
Start with the first folder and go in order. Each lesson builds on previous code. Open the README, read the first line for prerequisite concepts, then the goals, then the rest of the README. Optionally, try to write the code yourself before looking at the examples.
Why is there so little theory?
The author believes excessive theory can make things seem more difficult than they really are. The tutorial is code-focused, and learners are encouraged to use Google or the OSDev wiki for theoretical background.
Is this project still maintained?
No, the project is old and abandoned. The README notes technical and design issues. It is still useful for learning but users should look for more modern and authoritative sources.