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, 12:54:37 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

27 sources
Great job for bringing up new apple's silicon chip , m4 a18 to linux . I hope the project keep alive and maintained , and if you can't mainline it , remmber many other project do out-of-tree version well maintained [1] [2] [3] [4] [5] [6] [7] . [1]: https://github.com/Rust-for-Linux/linux Rust for Linux [2]: https://android.googlesource.com/kernel/common/ Android OS linux kernel [3]: https://github.com/openzfs/zfs OpenZFS kernel module [4]: https://github.com/awemorris/linux-pc98 Linux pc98 / 32 bit x86 [5]: https://github.com/OpenDingux/linux Linux on retro gaming device [6]: https://github.com/AsahiLinux/linux Linux on older apple silicon M1/M2/M3 chip [7]: https://github.com/microsoft/wsl2-linux-kernel Linux on Windows
In Building a Linux GPU Driver for the M4 Mac Mini in One Month
We're at the embrace stage right now, that's why you see it getting integrated. And if you run WSL, you usually end up with a special kernel, it's not just the upstream one without changes. Both my Arch and Ubuntu WSL is on kernel `Linux desktop 5.15.90.1-microsoft-standard-WSL2` rather the ones the distributions ship with by default if installed normally. This is the one they ship via Windows Update which you end up using on WSL: https://github.com/microsoft/WSL2-Linux-Kernel Watch them slowly make it different than the upstream one, without contributing patches upstream.
In GitHub code search is generally available
WSL2 is for the most part totally usable for everyday development, but it does have a handful of issues that either need workarounds or are just infeasible. USB passthrough isn't yet supported, so it's necessary to make use of something like VirtualHere[1] or some another TCPIP tunneling daemon running on the windows depending on what you're trying to do. There seems to sometimes be issues with resuming from S0ix sleep where the VM process is still "running" but it gets stuck in a state where new processes just will not spawn. It's been a while since I messed with it, but my "solution" was disabling a VM security measure, launching Process Hacker 2 as admin, searching for "lxss" in the process list and terminating the corresponding svchost. The actual linux kernel running inside WSL2 is interesting, it's microsofts own custom kernel[2] wi
Read the rest
th some magic sauce for making everything play nice. Unfortunately, it (still?) lacks a fully-functional SystemD so making some programs work can be a chore. Also all the kernel modules compiled in, and it doesn't allow loading them dynamically with modprobe. There are some alternative kernels out there that solve some of these issues, though I haven't bothered to try any since whenever I run into these sorts of issues it's less of a hassle to just switch to a dedicated linux box. For all of the issues that come with Windows 11, having WSLg make running graphical programs "just work" out of the box with rock-solid copy/paste, alt+tab, etc., really makes it a joy to work with. [1] - https://www.virtualhere.com/ [2] - https://github.com/microsoft/WSL2-Linux-Kernel
In Tell HN: The ThinkPad X1 Carbon is an excellent MacBook replacement
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

Showing the 15 most recent of 27 sources. Enable JavaScript to search and browse every indexed mention.

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.