Maintainer: Yang Jeong Hun (Nevuly)
Kernel Version | Status |
---|---|
Linux 6.12.x | Stable Support |
The WSL2-Linux-Kernel-Rolling repo contains the latest stable kernel source code and configuration files for the WSL2.
This kernel is automatically built via Github Actions CI whenever a newer stable kernel is released.
- Download kernel image from releases page.
- Place it to somewhere appropriate. (e.g.
D:\WSL2\Kernel\bzImage-x86_64
) - Save the
.wslconfig
in current user's home directory with following content:
[wsl2]
kernel=the\\path\\to\\bzImage
; e.g.
; kernel=D:\\WSL2\\Kernel\\bzImage-x86_64
;
; Note that all `\` should be escaped with `\\`.
- Reboot your WSL2 and check kernel version using
uname -a
in WSL2 terminal.
NOTICE
- You have to reboot your WSL2 system using
wsl --shutdown
after install or update kernel with using scoop.
Scoop is a command-line installer on windows. If you have scoop installed, then you can install this kernel with following commands:
scoop bucket add frostbite https://github.com/Nevuly/frostbite
scoop install frostbite/wsl2-rolling-kernel-stable
Scoop will automatically set kernel in .wslconfig
.
- If you installed kernel via scoop, you can use
scoop update *
in Powershell. - If you installed kernel manually, download kernel image from releases page, and replace it.
NOTICE
- This guide must be proceed in your WSL2 system.
- Kernel modules and kernel headers install are optional. If you don't need modules and headers, just skip this guide.
# Please change latest version of kernel and select your architecture
wget https://github.com/Nevuly/WSL2-Linux-Kernel-Rolling/releases/download/linux-wsl-stable-**x.x.x**/bzImage-**arch**-modules_install.tar.gz
tar -xzvf bzImage-**arch**-modules_install.tar.gz
cd bzImage-**arch**-modules_install
sudo ./modules-install.sh
After execute installation script, please reboot your WSL2 system to load kernel modules correctly.
NOTICE
- Before install kernel headers and documents, you must install kernel modules first!
# Please change latest version of kernel and select your architecture
wget https://github.com/Nevuly/WSL2-Linux-Kernel-Rolling/releases/download/linux-wsl-stable-**x.x.x**/bzImage-**arch**-optional_install.tar.gz
tar -xzvf bzImage-**arch**-optional_install.tar.gz
cd bzImage-**arch**-optional_install
sudo ./optionals-install.sh
After execute installation script, please reboot your WSL2 system to load kernel headers and documents correctly.
If you discover an issue relating to WSL or the WSL2 kernel, please report it on the Issues tab.
If you want to fix a bug or add new features, Please use the Pull Request.
Instructions for building WSL2 kernel with an Arch Linux distribution are as follows:
-
Install the build dependencies (Arch Linux):
$ sudo pacman -S aarch64-linux-gnu-gcc bc bison curl flex gcc git pahole python unzip wget zip
-
Build the kernel using the WSL2 kernel configuration (x86):
$ make KCONFIG_CONFIG=arch/x86/configs/config-wsl-x86
-
Build the kernel using the WSL2 kernel configuration (arm64):
$ export ARCH=arm64 && export CROSS_COMPILE=aarch64-linux-gnu-
$ make KCONFIG_CONFIG=arch/arm64/configs/config-wsl-arm64
-
Save the module to a separate folder (Optional. Only for local build):
$ sudo make modules_install
- The Linux community who created a awesome kernel.
- Microsoft which produced WSL2 and dxgkrnl patches.