按下Windows + R 键,输入 %UserProfile% 运行进入用户文件夹
新建文件 .wslconfig ,使用VScode或记事本编辑
#.wslconfig
[wsl2]
memory=4GB
swap=5GB
localhostForwarding=true
保存后,powershell 执行 wsl --shutdown 关闭后,重启即可
按下Windows + R 键,输入 %UserProfile% 运行进入用户文件夹
新建文件 .wslconfig ,使用VScode或记事本编辑
#.wslconfig
[wsl2]
memory=4GB
swap=5GB
localhostForwarding=true
保存后,powershell 执行 wsl --shutdown 关闭后,重启即可