HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
microsoft
WSL2-Linux-Kernel
C2019–2026
microsoft / WSL2-Linux-Kernel

WSL2-Linux-Kernel

The source for the Linux kernel used in Windows Subsystem for Linux 2 (WSL2)

25Distinct people
27Mentions
0Explicit recommenders
10.6KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

The source for the Linux kernel used in Windows Subsystem for Linux 2 (WSL2)

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 6:01:08 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year27 dated mentions

Observed mentions: 2019-07-01 02:34:12 UTC to 2026-09-16 02:13:35 UTC.

02468102019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 8 mentions; 0 submissions, 8 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 9 mentions; 1 submissions, 8 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC404
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC808
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC918
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC312
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC000
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC101
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC101

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
Introduction The WSL2-Linux-Kernel repo contains the kernel source code and configuration files for the WSL2 kernel. Reporting Bugs If you discover an issue relating to WSL or the WSL2 kernel, please report it on the WSL GitHub project. It is not possible to report issues on the WSL2-Linux-Kernel project. If you're able to determine that the bug is present in the upstream Linux kernel, you may want to work directly with the upstream developers. Please note that there are separate processes for reporting a normal bug and a security bug. Feature Requests Is there a missing feature that you'd like to see? Please request it on the WSL GitHub project. If you're able and interested in contributing kernel code for your feature request, we encourage you to submit the change upstream. Build Instructions Instructions for building an x86_64 WSL2 kernel with an Ubuntu distribution using bash are as follows: Install the build dependencies: sudo apt install build-essential flex bison dwarves libssl-dev libelf-dev cpio qemu-utils rsync Modify WSL2 kernel configs (optional): make menuconfig KCONFIG_CONFIG=Microsoft/config-wsl Build the kernel using the WSL2 kernel configuration and put the modules in a modules folder under the current working directory: make KCONFIG_CONFIG=Microsoft/config-wsl && make INSTALL_MOD_PATH="$PWD/modules" modules_install You may wish to include -j$(nproc) on the first make command to build in parallel. Install the kernel's UAPI headers into a headers folder: make headers_install INSTALL_HDR_PATH="$PWD/headers" Build the perf tooling into a perf folder: make -C tools/perf NO_JEVENTS=1 NO_JVMTI=1 NO_LIBTRACEEVENT=1 install DESTDIR="$PWD/perf" prefix=/ Then, you can use a provided script to create a VHDX containing the modules, headers, and perf tooling: ./Microsoft/scripts/gen_artifacts_vhdx.sh "$PWD/modules" "$PWD/headers" "$PWD/perf" $(make -s kernelrelease) modules.vhdx To save space, you can now delete the compilation artifacts: make clean && rm -r "$PWD/modules" "$PWD/headers" "$PWD/perf" If you prefer, you can also build the VHDX manually as follows. WSL expects the artifacts laid out under <kernelrelease>/{modules,linux-headers,perf}, so first assemble a staging directory: Stage the modules, headers, and perf tooling under the kernel release directory: release=$(make -s kernelrelease) mkdir -p "$PWD/staging/$release/linux-headers" cp -r "$PWD/modules/lib/modules/$release" "$PWD/staging/$release/modules" rm -f "$PWD/staging/$release/modules/build" "$PWD/staging/$release/modules/source" cp -r "$PWD/headers/." "$PWD/staging/$release/linux-headers" cp -r "$PWD/perf" "$PWD/staging/$release/perf" Calculate the image size (plus 256MiB for slack): image_size=$(du -bs "$PWD/staging" | awk '{print $1;}'); image_size=$((image_size + (256 * (1<<20)))); Build a populated ext4 image: mke2fs -L '' -d "$PWD/staging" -N $(( $(find "$PWD/staging" | wc -l) + 4096 )) -b 1024 -t ext4 "$PWD/modules.img" $((image_size / 1024)) Convert the img to VHDX: qemu-img convert -O vhdx "$PWD/modules.img" "$PWD/modules.vhdx" Clean up: rm "$PWD/modules.img" # optionally the $PWD/staging, $PWD/modules, $PWD/headers, and $PWD/perf dirs too Install Instructions Please see the documentation on the .wslconfig configuration file for information on using a custom built kernel.
Read the full README on GitHub

What Hacker News says

9 sources
Am I misreading? It looks like they ported the DirectX runtime to Linux under GPL 2. >> "This is the real and full D3D12 API, no imitations, pretender or reimplementation here… this is the real deal. libd3d12.so is compiled from the same source code as d3d12.dll on Windows but for a Linux target. It offers the same level of functionality and performance (minus virtualization overhead). The only exception is Present(). There is currently no presentation integration with WSL as WSL is a console only experience today. The D3D12 API can be used for offscreen rendering and compute, but there is no swapchain support to copy pixels directly to the screen (yet )." https://github.com/microsoft/WSL2-Linux-Kernel/tree/e445d061... https://github.com/microsoft/WSL2-Linux-Kernel/blob/e445d061... >> "SPDX-License-Identifier: GPL-2.0" They're also workin
Read the rest
g on supporting all the standard Linux equivalents according to your link. I don't see the third E here.
In Android Apps on Windows 11
That's exactly what I mean by misinformed. WSL 2 isn't using a simple virtual machine the way it is generally understood. It is instead using a lightweight VM using Hyper-V, there is no booting time. IO in itself isn't slow if you move files to the Linux FS. What is slow is the communication between Windows <—> Linux filesystems. Edit: regarding the custom kernel, you can create your own if you want, nothing is blocking you from doing so https://kumekay.com/compiling-custom-kernel-for-wsl2/. Microsoft's kernel is also available on github: https://github.com/microsoft/WSL2-Linux-Kernel.
In Part of Windows 11 is a revamped Windows Subsystem for Linux

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.