#关闭wsl的虚拟机
wsl --shutdown
%UserProfile% 并运行进入用户文件夹
新建文件 .wslconfig
[wsl2]
memory=2GB # Limits VM memory in WSL 2GB, also can be set to other values
swap=0
localhostForwarding=true
processors=2 # Makes the WSL 2 VM use two virtual processors, also can be set to other values