WSL 2 brings several new settings to WSL because of its architecture. As a lightweight VM, some of these settings may be familiar to users of other virtualization software, such as Hyper-V or VirtualBox, where you can define the amount of memory or processors for a specific VM. In WSL 2, you can define these parameters for the WSL 2 environment. The following settings require WSL 2 and are available in Windows 10 build 18980 or higher.
.wslconfig
WSL 2-specific settings are defined in a separate file. It is located in your Windows user home folder in a file named .wslconfig. The settings ...