Make a .wslconfig
file in your C:\Users\username
folder.
In this file you can set mulitple parameters, see following options:
[wsl2]
kernel= # An absolute Windows path to a custom Linux kernel.
memory= # How much memory to assign to the WSL2 VM.
processors= # How many processors to assign to the WSL2 VM.