Created
September 15, 2024 08:01
-
-
Save maple3142/aca6df002a5bc9765fd9b65b048fef1b to your computer and use it in GitHub Desktop.
Update WSL2 Kernel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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