文章目录
在windows用户目录下创建一个叫.wslconfig的文件:

文件内容如下:
# Settings apply across all Linux distros running on WSL 2
[wsl2]
# Limits VM memory to use no more than 4 GB, this can be set as whole numbers using GB or MB
memory=8GB # 根据你电脑配置来
# Sets the VM to use two virtual processors
processors=4 # 根据你电脑配置来
# Sets amount of swap storage space to 8GB, default is 25% of available RAM
swap=8GB # 根据你电脑配置来
# Sets swapfile path location, default is %USERPROFILE%\AppData\Local\Temp\swap.vhdx
swapfile=D:\\WSL\\wsl-swap.vhdx
# Turn off default connection to bind WSL 2 localhost to Windows localhost
localhostforwarding=true
然后重新打开wsl,再用hdocker拉镜像,快的起飞。
336

被折叠的 条评论
为什么被折叠?



