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

8 sources
Microsoft already has a Linux kernel. https://github.com/microsoft/WSL2-Linux-Kernel If it were superior for containers, Windows containers wouldn't have withered on the vine. .NET Core being truly cross-platform is pretty much an official acknowledgement by Microsoft that Windows is not the be-all and end-all. To use their words, they're "meeting developers where they live" instead of insisting that one size fits all, if that size is Windows.
In WSL Getting GUI Support
Not really. Under HyperV both the Windows and Linux kernel run subsidiary to the HyperV hypervisor, so in that sense Windows itself is "just a virtual machine". The work in TFA describes patches to make the Linux kernel communicate with the hypervisor (sharing information like used memory pages). In my book that's pretty sophisticated. EDIT: The work appears to be available on Github https://github.com/microsoft/WSL2-Linux-Kernel/commits/linux...
In Microsoft submits Linux kernel patches to enable complete Hyper-V on Linux
I don't understand why WSL2 wouldn't support eBPF. It is a mostly vanilla[1] Linux kernel running under a hypervisor, so why couldn't a kernel with eBPF support be used? Indeed, Microsoft's WSL2 kernel has eBPF JIT support turned on – https://github.com/microsoft/WSL2-Linux-Kernel/blob/master/M... WSL1 yes I agree, it is just a translation layer between Linux and NT syscalls, and features such as eBPF would not be implemented in such a layer. [1] there may at times be various enhancements to HyperV paravirt drivers that haven't been upstreamed yet
In ProcMon for Linux
Hi. Microsoft PM working on WSL, Terminal and Windows. WSL2 literally runs user-mode distros (and their binaries) in containers atop a shared Linux kernel image (https://github.com/microsoft/WSL2-Linux-Kernel) inside a lightweight VM that can boot an image from cold in < 2s and which aggressively releases resources back to the host when freed. So when you run a binary/distro on WSL2, you are LITERALLY running on Linux in a VM alongside all your favorite Windows apps and tools. If some of the tools you run within WSL can take advantage of the machine's available GPUs etc. and integrate well with the Windows desktop & tools, then you benefit. As do the many Windows users who want/need to run Linux apps & tools but cannot dual-boot and/or who can't switch to Linux full-time. This will (and already has) resulted in MANY Windows users getting
Read the rest
access to Linux for the first time, or first time in a while, and are now enjoying the best of both worlds.
In DirectX is coming to the 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.