whatisgithub

What is wsl2-linux-kernel?

microsoft/wsl2-linux-kernel — explained in plain English

Analysis updated 2026-06-24

10,390CAudience · ops devopsComplexity · 5/5LicenseSetup · hard

In one sentence

The Linux kernel source code that Microsoft ships with Windows Subsystem for Linux 2 (WSL2), the actual kernel running under your Linux terminal on Windows, based on upstream Linux with WSL-specific patches.

Mindmap

mindmap
  root((wsl2-linux-kernel))
    Purpose
      WSL2 Kernel Source
      Microsoft Patches
    Audience
      Kernel Developers
      Power WSL2 Users
    Customization
      Build Config
      Custom Modules
    Upstream
      Linux Kernel
      WSL Bug Tracker
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build a custom WSL2 kernel with different compile-time options to enable features not in the default configuration.

USE CASE 2

Inspect the kernel configuration Microsoft uses for WSL2 to understand what is included or excluded versus a standard Linux kernel.

USE CASE 3

Understand the WSL-specific patches Microsoft adds on top of upstream Linux when diagnosing WSL2 kernel issues.

What is it built with?

CLinuxMake

How does it compare?

microsoft/wsl2-linux-kernelcstack/db_tutoriallibgit2/libgit2
Stars10,39010,40610,447
LanguageCCC
Setup difficultyhardmoderatemoderate
Complexity5/53/53/5
Audienceops devopsdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1day+

Requires a Linux cross-compilation environment, Microsoft does not accept issues or pull requests in this repo.

Governed by the GPL like the upstream Linux kernel, you can use, study, and redistribute the code, but modifications must also be released under the GPL.

So what is it?

This repository contains the source code for the Linux kernel that runs inside Windows Subsystem for Linux 2, known as WSL2. WSL2 is a feature in Windows that lets you run a real Linux environment directly on your Windows computer, without needing a separate virtual machine or dual-boot setup. The kernel is the core of any Linux system: it manages hardware access, memory, processes, and communication between software and the underlying computer. Microsoft takes the standard Linux kernel from the official Linux project and adds the configuration and infrastructure needed to package it for WSL2. The result is what Windows actually runs under the hood when you open a Linux terminal on a Windows machine. Because it is based on the upstream Linux kernel, it gets the same updates and features as any other Linux system, with some WSL-specific adjustments on top. The repository is primarily a release and build infrastructure repo rather than an active development hub. Microsoft does not accept issues or pull requests here. If you have a problem with WSL2 or want to report a kernel-related bug, you are directed to the main WSL repository at github.com/microsoft/WSL. If you want to contribute to the Linux kernel itself, the project points you to the official Linux kernel contribution process. The README is sparse because this is a technical infrastructure repository, not a general-purpose project. Its audience is people who need to inspect, build, or understand the kernel configuration that ships with WSL2, not casual users or contributors.

Copy-paste prompts

Prompt 1
Show me how to compile a custom WSL2 kernel from the microsoft/wsl2-linux-kernel source and configure Windows to load it instead of the default.
Prompt 2
What WSL-specific kernel configuration options does Microsoft add that differ from a standard Linux kernel build?
Prompt 3
I want to enable a kernel module not included by default in WSL2. Walk me through editing .config, recompiling, and loading the module.
Prompt 4
How do I set up a build environment on Ubuntu or Debian to cross-compile the WSL2 Linux kernel from source?

Frequently asked questions

What is wsl2-linux-kernel?

The Linux kernel source code that Microsoft ships with Windows Subsystem for Linux 2 (WSL2), the actual kernel running under your Linux terminal on Windows, based on upstream Linux with WSL-specific patches.

What language is wsl2-linux-kernel written in?

Mainly C. The stack also includes C, Linux, Make.

What license does wsl2-linux-kernel use?

Governed by the GPL like the upstream Linux kernel, you can use, study, and redistribute the code, but modifications must also be released under the GPL.

How hard is wsl2-linux-kernel to set up?

Setup difficulty is rated hard, with roughly 1day+ to a first successful run.

Who is wsl2-linux-kernel for?

Mainly ops devops.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.