Skip to main content
SerenityOS can be built and run under WSL Version 2. WSL Version 1 is not supported since it lacks ext2 filesystem support.

Prerequisites

WSL Version 2 requires:
  • Windows 10 version 2004 or higher
  • OS Build 19041 or greater

Installing WSL2

1

Install WSL2

Follow the official Microsoft guide: Get WSL2
2

Verify WSL version

Check your installed distributions and versions:
3

Convert to WSL2 (if needed)

If your distribution is using Version 1, convert it:
4

Set default version (optional)

To make WSL2 the default for all new distributions:

Install Build Dependencies

Once WSL2 is set up, follow the Linux build instructions for your chosen distribution:

Ubuntu/Debian

Most common choice for WSL2

Other Distributions

Arch, Fedora, and more

Filesystem Performance

Critical Performance Note:WSL2 filesystem performance for IO-heavy tasks (like compiling C++ projects) is significantly slower on the Windows filesystem compared to the Linux filesystem.
Store your project in the Linux filesystem:

Accessing Linux Files from Windows

You can access your Linux filesystem from Windows Explorer at:
For example:
This allows you to use Windows editors and tools while keeping the build fast.

Setting up QEMU

1

Download QEMU for Windows

Download the latest QEMU binaries from qemu.org
2

Install required components

During installation, select at minimum:
  • Tools
  • System emulators (i386 and x86_64)
  • DLL libraries QEMU Components
3

Build and run SerenityOS

Hardware Acceleration

By default, QEMU runs in software virtualization mode, which is very slow. Enable hardware acceleration for better performance:
1

Enable Windows Hypervisor Platform

  1. Open “Turn Windows features on or off”
  2. Check Windows Hypervisor Platform
  3. Click OK WHPX Feature
2

Reboot

You may need to reboot after enabling WHPX.
3

Run SerenityOS

QEMU will automatically use WHPX when available:

Advanced Filesystem Configuration

Using Native Windows Partitions

For better QEMU performance, you can copy the disk image to a native Windows partition:
Then configure SERENITY_DISK_IMAGE to point to the Windows path (e.g., D:\serenity\_disk_image).
This avoids the 9P network filesystem overhead when accessing WSL2 files from Windows QEMU.

WSL Network Path

The root of your WSL2 distribution is accessible from Windows at:

Troubleshooting

WSL Version Issues

If you’re unsure about your WSL version:

Performance Problems

If builds are very slow:
  1. Verify you’re using Linux filesystem (not /mnt/c/)
  2. Check current directory:

QEMU Launch Failures

If QEMU doesn’t start:
  1. Verify QEMU is in Windows PATH
  2. Check QEMU installation:
  3. Ensure hardware acceleration is enabled

File Permission Errors

If you encounter permission issues:

Best Practices

Always clone and build in /home/ or /root/, never in /mnt/c/ or other Windows mounts.
WHPX provides massive performance improvements. Always enable it.
Access your Linux files via \\wsl$\ to use VS Code, Sublime, or other Windows editors.
Configure WSL2 memory and CPU limits in .wslconfig:

Next Steps

Build System Overview

Learn about the SuperBuild system

Advanced Options

Explore CMake options and customization