SerenityOS
SerenityOS is a free and open-source graphical operating system designed for desktop computers, featuring a custom Unix-like kernel and a user interface inspired by 1990s productivity software aesthetics combined with modern *nix functionality.[1] It supports 64-bit x86, ARM, and RISC-V architectures, with a focus on POSIX compatibility, pre-emptive multi-threading, and security features such as W^X memory protection and address space layout randomization.[1] The project was initiated in 2018 by Swedish programmer Andreas Kling as a solo hobby endeavor following his completion of a drug rehabilitation program, aimed at creating a from-scratch OS to channel his passion for computing.[2] Over time, it expanded to include a comprehensive desktop environment with system services like WindowServer for graphics and AudioServer for sound, alongside a suite of native applications including a text editor, image viewer (PixelPaint), and the Ladybird web browser, which supports JavaScript, WebAssembly, and web standards compliance.[1] In June 2024, Kling stepped down as the project's Benevolent Dictator for Life (BDFL) to focus on the independent Ladybird browser, forking it from SerenityOS, while the operating system continues under community stewardship.[2] SerenityOS is hosted on GitHub, where it has garnered contributions from over 100 developers, resulting in more than 300 ports of open-source software and ongoing development of unique components like the Jakt programming language and custom libraries for cryptography and graphics.[1] The OS emphasizes a retro visual style—complete with themable icons, fonts, and a pixel-art mascot—while incorporating power-user tools such as a terminal, package manager, and support for running in virtual machines like QEMU.[3] Its development philosophy prioritizes fun, learning, and sincerity in recreating beloved elements of past computing eras without relying on existing OS codebases.[4]History
Founding
SerenityOS was founded by Swedish programmer Andreas Kling as a solo hobby project, with its first commit occurring on October 10, 2018. Kling initiated development shortly after completing a three-month rehabilitation program for drug addiction earlier that year, seeking a therapeutic outlet to channel his energy into building a dream operating system from scratch.[5] The project's initial goals centered on recreating the aesthetic and usability of 1990s-era desktop computing while incorporating a robust Unix-like core for modern power-user functionality. Kling aimed to blend the nostalgic look and feel of late-1990s productivity software—such as pixelated interfaces and straightforward windowing—with the accessibility and efficiency of 2000s Unix systems, ensuring everything from the kernel to applications would be developed in-house using C++.[3][6] In the first months following the inaugural commit, Kling focused on foundational components to establish a bootable system. These included the AK utility library for core utilities, an ELF bootloader to initiate the kernel, a FAT filesystem parser for basic storage handling, and a rudimentary GUI toolkit to support graphical elements, all implemented in C++ to lay the groundwork for further expansion.[7] From its inception, SerenityOS was designed as an open-source project, hosted on GitHub and released under the permissive BSD-2-Clause license to encourage transparency and potential community involvement.[1]Key milestones and releases
SerenityOS achieved its first major milestone in early 2019 with a bootable kernel featuring preemptive multitasking and a basic shell, enabling initial userspace execution within a virtual machine environment.[7] By January 2019, the system booted into a rudimentary graphical user interface, marking the transition from bare-metal experiments to a functional desktop-like experience.[7] This foundational kernel, written primarily in C++, supported 64-bit x86 architecture and included essential components like a memory manager and process scheduler.[1] Between 2020 and 2021, development accelerated with the introduction of a full networking stack supporting IPv4, TCP, and UDP protocols, alongside initial audio capabilities through a custom sound server.[1] LibWeb, the project's web rendering engine, saw significant progress, enabling basic HTML rendering and CSS support by late 2020, which powered the integrated browser's early functionality.[8] These advancements were showcased in public demonstrations, including conference talks and video updates that highlighted the system's growing multimedia and connectivity features.[9] In February 2020, a bug bounty program was launched to encourage security research, offering rewards for kernel exploits and vulnerabilities.[10] In 2022, SerenityOS expanded hardware compatibility with initial support for ARM64 architecture, allowing compilation and basic execution on ARM-based systems. Concurrently, the Ladybird browser, originally an internal tool within SerenityOS, was announced as a cross-platform project, with plans to port LibWeb and LibJS engines beyond the OS's native environment.[11] The project's fifth anniversary in October 2023 celebrated sustained progress, including the completion of an experimental RISC-V port that enabled booting on RISC-V hardware targets.[5] This multi-architecture support—now encompassing x86-64, ARM, and RISC-V—underscored SerenityOS's portability goals.[1] During 2024, efforts focused on real-hardware booting experiments, with developers adapting drivers for physical x86-64 machines to move beyond virtualized environments.[12] In June, Ladybird was formally separated as an independent project, forking its codebase from SerenityOS to pursue standalone development on Linux and macOS platforms.[2] As of November 2025, SerenityOS has seen enhanced stability across x86-64, ARM, and RISC-V architectures, with recent changelogs emphasizing improvements in graphics rendering via LibGfx and networking reliability in the TCP/IP stack.[13] These updates include better support for modern display protocols and refined packet handling, contributing to more robust system performance in emulated and hardware contexts.Design and architecture
Kernel
SerenityOS employs a custom monolithic kernel written primarily in C++, emphasizing a from-scratch implementation without dependencies on existing kernels like those from Linux or BSD.[1] This design choice allows for tight integration between kernel components and the overall system architecture, supporting a 64-bit address space with preemptive multi-threading to enable concurrent execution of processes and threads.[1] The kernel's monolithic nature places most functionality, including drivers and system services, within a single address space for efficiency, while maintaining clear boundaries for modularity. Key components of the kernel include a process scheduler that manages thread priorities and time slices using a round-robin approach with priority inheritance to prevent indefinite blocking.[14] Virtual memory management relies on paging mechanisms to map virtual addresses to physical frames, enforcing write-XOR-execute (W^X) policies to prevent code execution in writable regions and incorporating kernel address space layout randomization (KASLR) for added protection against exploits.[1] Interrupt handling is facilitated through a dedicated subsystem that routes hardware interrupts via the Advanced Programmable Interrupt Controller (APIC) on x86-64, dispatching them to appropriate handlers while preserving process context.[15] Device drivers provide abstractions for hardware interaction, notably supporting storage via the ext2 filesystem for block I/O operations and input/output through PCI-based controllers like AHCI for disk access and USB for peripherals.[1] The kernel exposes system calls inspired by POSIX standards, invoked via a software interrupt (int 0x82 on x86) that passes arguments in registers and handles errors through errno conventions.[16] These syscalls cover essential operations such as process creation (fork, execve), file I/O (read, write), and signaling, with custom extensions like those for graphics buffer management to support seamless user interface integration.[16] POSIX compatibility extends to features like pseudoterminals and filesystem notifications, ensuring portability for Unix-like applications.[1] Hardware support centers on the x86-64 architecture, with ports to ARM (AArch64) and RISC-V for broader compatibility.[1] Booting typically occurs via GRUB, which loads the kernel image into memory before transferring control, though custom bootloaders are used in specialized environments like bare-metal setups.[17] Security is grounded in fundamental user/kernel space separation, where user processes operate in ring 3 and cannot directly access kernel memory or hardware.[18] Additional safeguards include capability-limiting syscalls such as pledge() for restricting process operations and unveil() for filesystem view isolation, both borrowed conceptually from OpenBSD to minimize attack surfaces.[18] Out-of-memory resistance is achieved through proactive process termination rather than aggressive swapping, prioritizing system stability.[1]User interface and graphics
SerenityOS features a custom windowing system known as WindowServer, which operates as a userspace service responsible for managing graphical output, window placement, and user interactions.[7] This system provides compositing capabilities to handle overlapping windows and visual effects, separating compositing logic from general window management for improved modularity.[19] It supports multiple virtual desktops, configurable via the Workspace Picker applet, allowing users to organize workspaces in customizable layouts such as grids or linear arrangements. The interface draws inspiration from 1990s productivity software, incorporating themeable widgets with pseudo-3D borders, beveled edges, and an icon-heavy desktop environment that evokes classic systems like Windows 95.[3][20] The graphics stack in SerenityOS relies on LibGfx, a native library that handles 2D rendering, font rasterization (including TTF/OTF support), and bitmap operations primarily through software rendering for broad compatibility across emulated and real hardware environments.[21] This approach enables efficient drawing of UI elements without depending on external graphics APIs, though ongoing experiments explore hardware acceleration via kernel-level display drivers to enhance performance in scenarios like browser rendering.[22] The system supports a range of display resolutions, including up to 4K, configurable through framebuffer adjustments in the boot process and WindowServer settings.[17] Input handling integrates mouse and keyboard events directly into the event-driven GUI framework, with WindowServer coordinating cursor movement and focus changes across applications.[20] Clipboard operations are managed system-wide, allowing seamless data sharing between GUI and terminal-based programs via a shared buffer accessible through LibGUI APIs. Accessibility features include dynamic font scaling, adjustable via system preferences to accommodate varying display sizes and user needs, ensuring readability on high-DPI screens.[23] Theming and customization center on the default "Serenity" theme, which utilizes pixel-art icons for applications and system elements, fostering a cohesive retro aesthetic while permitting overrides through configuration files and color palettes.[3] Developers interact with the GUI via LibGUI, a high-level library providing classes for windows, layouts (e.g., VerticalBoxLayout), and interactive widgets like buttons and labels, enabling the creation of native applications that adhere to the 1990s-inspired design paradigm without external dependencies.[20][23]Features
Core system capabilities
SerenityOS employs the ext2 filesystem as its primary storage mechanism, providing a reliable and straightforward structure for file and directory management on disk. This implementation supports essential operations such as reading, writing, and mounting partitions, ensuring compatibility with traditional Unix-like expectations for file handling.[7][4] For broader compatibility, the kernel includes drivers for the FAT filesystem, enabling access to removable media and legacy storage devices formatted in that scheme.[24] The networking subsystem features a custom TCP/IP stack that handles IPv4 traffic, including core protocols like TCP and UDP for reliable data transmission.[1] This stack integrates DHCP for automatic IP address assignment and DNS resolution for hostname lookups, facilitating seamless connectivity to local networks and the internet.[25] Hardware support encompasses Ethernet adapters through dedicated drivers, with partial Wi-Fi functionality available via compatible network interface controllers, though full wireless roaming remains under development. As of late 2025, IPv6 implementation is incomplete, offering basic connectivity like ICMPv6 pings but lacking comprehensive protocol support.[26] At the command-line level, SerenityOS provides a POSIX-compliant shell inspired by traditional Unix shells like bash, serving as the primary interface for executing commands and scripting tasks.[27] Built-in utilities mirror common Unix tools, includingls for directory listings, grep for pattern searching in text, and find for locating files, all designed to promote a familiar workflow for power users. Documentation is accessible through an integrated man system for detailed command references and a help utility for quick overviews, enhancing usability without relying on external resources.[4]
Multimedia capabilities emphasize foundational support rather than advanced processing. Audio handling is limited to basic PCM playback through the kernel's sound device interface, compatible with simple wave formats and allowing for low-level mixing on supported hardware.[28] Image viewing and manipulation cover standard raster formats such as PNG, BMP, JPEG, and GIF, with libraries enabling decoding and basic rendering operations. Video decoding is not fully implemented, restricting multimedia to static images and audio streams without temporal processing.[1]
Multi-user functionality includes basic user account management with permissions enforced via Unix-style user and group IDs, supporting commands like useradd and su for switching identities.[29] The system handles process isolation through standard Unix process controls, but its design prioritizes single-user scenarios, with per-user sessions managed by the LoginServer service to enable isolated desktop environments when multiple logins occur.[30]