Skip to content

Instantly share code, notes, and snippets.

@maple3142
Created September 15, 2024 08:01
Show Gist options
  • Save maple3142/aca6df002a5bc9765fd9b65b048fef1b to your computer and use it in GitHub Desktop.
Save maple3142/aca6df002a5bc9765fd9b65b048fef1b to your computer and use it in GitHub Desktop.
Update WSL2 Kernel
curl -LJO 'https://github.com/microsoft/WSL2-Linux-Kernel/archive/refs/tags/linux-msft-wsl-6.6.36.6.tar.gz'
tar xzf WSL2-Linux-Kernel-linux-msft-wsl-6.6.36.6.tar.gz
cd WSL2-Linux-Kernel-linux-msft-wsl-6.6.36.6
# current kernel: 5.15.153.1-microsoft-standard-WSL2
cat /proc/config.gz | gzip -d > .config
make oldconfig # press ENTER for every question to use default config
make -j8 # Compile kernel
cp arch/x86/boot/bzImage /mnt/c/Windows/YOUR_USERNAME/bzImage
# In Windows $HOME/.wslconfig, `[wsl2]` section, set `kernel=C:\\Users\\YOUR_USERNAME\\bzImage`
# then `wsl --shutdown` and `wsl`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment