Introduction: Make an Operating System in C#

Picture of Make an Operating System in C#

So, creating an operating system in Assembly is not easy!

This instructable will show you how to make your own C# operating system. If you are new to C#, consider doing some research first.

Step 1: Gather Resources

Picture of Gather Resources

First, you need to have Microsoft Visual Studio 2010 or higher installed. Then install Cosmos User Kit Milestone 4.

Link for Cosmos User Kit:

Cosmos Project Page:

If you have any problems with installing Cosmos, then comment it.

Let's move on to Step 2.

Step 2: Create the Project

Picture of Create the Project

Now that Cosmos is installed, let's create the project.

Select Cosmos Boot in the C# Template list. If you didn't find Cosmos Boot in the C# Template list, read the troubleshooting guide below:


If it didn't show up, try the following:

  • Try re-installing Cosmos as an Administrator.
  • Try installing Visual Studio 2010.
  • Select a different .NET Framework SDK.

Step 3: Coding [the Fun Part]

Picture of Coding [the Fun Part]

Now we can start coding!

NOTE: Do not delete any Cosmos-generated code except for Console.WriteLine("You just booted C# code");

An example of C# code:

Console.WriteLine("Cosmos Tutorial");

Console.ForegroundColor = ConsoleColor.Green;

string input;


input = Console.ReadLine();

if(input == "hw")


Console.WriteLine("Hello World!");


goto shell;

//End Code

So that was a shell example. Shells are easy to make (my opinion).

Let's move on to Step 4.

Step 4: Building the Operating System

Picture of Building the Operating System

Now that we have written the code, click the green play button in Visual Studio on the Tool Strip.

It should launch the Cosmos Builder.

You can experiment with it and do whatever you want. It will save it in an ISO file so you can burn it to a CD. The path of the image file is displayed on the builder.

If you don't want to burn it, you can emulate it using emulation software such as VirtualBox, Bochs, VMWare and many others.

Have fun with your Operating System!

Step 5: Tutorial Completed

You have completed this tutorial!

To support us, either like or share it! For more Instructables by Ralphsoft, visit our site.

Have fun,



TrevorO11 (author)2017-02-24

I get this everytime I try to debug

TrevorO11 (author)TrevorO112017-02-24

I have VM Virtualbox

ClxG (author)TrevorO112017-06-23

You need VMWare, not VM VirtualBox.

obinnaa (author)2016-06-23

is it possible to make it run on mobiles

thepcgeek (author)obinnaa2016-06-30

It isn't possible without emulation. Try Bochs on Android or try it on iOS (Jailbroken)

MichaëlS809 (author)2016-06-04


I'm using Visual Studio 2015 and when I try to install cosmos it says I need VS 2013. Is there a version or a patch I can find somewhere to run this with VS 2015?

Thank you,

thepcgeek (author)MichaëlS8092016-06-30

I don't think so. Anyway, the link I provided is Milestone 4. Milestone 4 is a stable build for Visual Studio. The newer ones have more to offer, but this one is very stable.

TristanS4 (author)2015-09-21

Hi i would like to know if using Mono on mac it is possible to do this in OS X without virtual machine?

thepcgeek (author)TristanS42015-09-21

I don't think so :(.

Anyway, you can check the cosmos project page for further information.

peppypickle (author)2015-01-21

fantastic, thanks so much for sharing!

thepcgeek (author)peppypickle2015-08-25

no problem :)

About This Instructable




More by thepcgeek:How to Create a Keyboard Light System Using VBScriptHow to Softmod Your Wii (4.3) U/E/K/JRun OS X Mavericks on your laptop [HACKINTOSH]
Add instructable to: