Getting Started

Prerequisites

Windows

On Windows, you can either install Visual Studio, or use the command line. As MOSA currently targets .NET 7, you’ll need Visual Studio 2022 17.4 or newer.

Linux

On Linux, the following prerequisites are necessary:

If you’re using Ubuntu 22.04, you can use the following commands to quickly set everything up:

# Register Microsoft package repository
wget -q https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb

# Install the .NET Core SDK
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get -y install dotnet-sdk-7.0

# Intall QEMU and GIT
sudo apt-get -y install qemu qemu-system qemu-system-x86 git

All Platforms

If you don’t want to use any IDE, you can simply use the command line.

Tip

This page will assume you’re using the command line.

Download

NuGet

The easiest way to get started with MOSA is to install the NuGet templates:

dotnet new install Mosa.Templates

You can then create a new project based on one of the templates you’ve just installed:

dotnet new mosakrnl -o MyMosaKernel
cd MyMosaKernel

Tip

mosakrnl is a template for a cross-architecture kernel.

You may now want to build your newly created kernel using the following command:

dotnet build
cd bin

Finally, you can build your kernel using the GUI launcher tool copied to the Tools directory!

Tools/Mosa.Tool.Launcher MyMosaKernel.x86.dll

Clone and build manually

The MOSA project is available on GitHub and can be cloned via Git:

git clone https://github.com/mosa/MOSA-Project
cd MOSA-Project

In order to build the solution, you can execute the following command:

Warning

On Linux, you’d build the Mosa.Linux.sln solution instead of Mosa.sln. This is because some Windows-only tools haven’t been yet ported to other platforms.

dotnet build Source/Mosa.sln

If successful, it should show a message similar to the one below. Any warnings may be ignored.

[...compiler messages...]

Build succeeded.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:01.48

Finally, to launch one of the demo applications, simply execute the GUI launcher tool in the bin directory:

bin/Mosa.Tool.Launcher

You can then select the demo application of your choice as source, perhaps modify a few options, then build! You can learn more about this launcher tool here.