- sudo git clone https://github.com/microsoft/WSL2-Linux-Kernel.git
- sudo apt install build-essential flex bison libssl-dev libelf-dev
- cd WSL2-Linux-Kernel
- cp Microsoft/config-wsl .config (if you’ve compiled previously, this may require sudo)
- sudo make -j $(expr $(nproc) - 1))
- From Windows, copy \wsl$\DISTRO\home\WSL_USERNAME\WSL2-Linux-Kernel\arch\x86\boot\bzimage to C:\Users\WIN10_USERNAME
- Create a file called .wslconfig in C:\Users\WIN10_USERNAME:
[wsl2]
kernel=C:\\Users\\WIN10_USERNAME\\bzimage
- From PowerShell, run wsl –shutdown
- Reopen your flavor of WSL2
Comments
No comments yet. Be the first to react!