JavaScript operating system? Jsos

Greetings, Khabrovites!

Do you think it is possible to create a full-fledged operating system in the JavaScript programming language from which you can boot?

The correct answer is yes!


Today I want to tell you about the JsOS project .

JsOS is an operating system in JavaScript.
Initially, the project was created on the basis of the JS library and the runtime.js kernel , but, after closing the latter, it became an independent project.

Currently, the project is under development , so any input is welcome.

Consider the basic structure of the project.

JsOS consists of two parts (levels):

  • The low level (core) consists of parts written in C ++ and Assembler. Used for basic loading and transferring control to a high level. The kernel also provides an API for working with hardware.

  • The high level is completely written in JavaScript and implements the operation of the operating system.

Let's consider in more detail the high-level structure:

  • core- here is the core of the operating system (not to be confused with the core (kernel) of the low level) , which provides basic functionality;
  • driver - drivers and APIs for working with various devices;
  • apps - Additional user applications that are installed by the install command;

Key features of the operating system
  1. Full-fledged command interpreter.
  2. JavaScript Repl (commands starting with #).
  3. Support for PS / 2 mice and keyboards.
  4. Support for playing sounds on PCSpeaker.
  5. Support for Virtio (QEMU) and Realtek (rtl8139) network cards.
  6. Support for ATA hard drives.
  7. File System Support (FAT32).
  8. Support for VGA and BGA.
  9. Compatible with Node.js API (os, fs modules, etc.).
  10. Support for ASCII (UTF-8 in graphical mode).
  11. Support for graphical and pseudo-graphical ASCII interfaces.
  12. Support for PCI devices.

Now let's get to practice

There are 2 options on this score:

  1. Download the .iso image from the Releases section.
  2. Build and run the latest version.

Option 2 is strongly recommended, as it provides more options and is not much more difficult than the first.

This requires installed Node.js and QEMU.

# 1. Клонируем репозиторий:
git clone
# 2. Переходим в папку:
cd JsOS
# 3. Устанавливаем зависимости:
npm i
# 4. Устанавливаем JsOS-CLI:
sudo npm i -g jsos-cli
# 5. Запускаем:
jsos start


If you followed the instructions, a QEMU emulator window appears, in which JsOS boots.
If you have problems, create an issue and they will help you.

The main features of the operating system can be viewed by entering the command help.

At the time of writing, the team helplooked like this:

And additional functionality can be connected using the command install название_пакета.
Available packages can be viewed in the js / apps folder.

For example, the screenfetch package is a port of the Linux utility of the same name that displays information about the operating system.

You can install it with the command install screenfetch, and run it start screenfetch.


Read more about creating your packages here .

Now the package also includes packages that demonstrate the capabilities of the operating system:

  • brainfuck - port of the same programming language. For a quick Hello World write start brainfuck hw;
  • vim - port of the popular console text editor;
  • speakplay - music synthesizer on PCSpeaker;
  • composer - a program for playing tunes on PCSpeaker;
  • keylogger - a program showing information about a pressed key;
  • pgtest - demonstration of the capabilities of the pseudo-graphical ASCII interface;
  • example and other examples;

They all work through teams installand start.

Also, at the time of writing, work is underway to create a graphical interface (the graphics-mode and pseudo-graphics branches), support for various network cards, as well as support for USB (usb branch).

If you know C ++ or JavaScript well and want to contribute to the development of the operating system, write here .


GitHub repository of the JsOS project
GitHub repository of the JsOS-CLI utility
GitHub repository of the runtime.js project (project closed)

Also popular now: