swapFilepath%USERPROFILE%\AppData\Local\Temp\swap.vhdx交换虚拟硬盘的绝对 Windows 路径。 pageReportingbooleantrue默认的true设置使 Windows 能够回收分配给 WSL 2 虚拟机的未使用内存。 guiApplicationsbooleantrue一个布尔值,用于在 WSL 中打开或关闭对 GUI 应用程序 (WSLg) 的支持。
swapFilepath%USERPROFILE%\AppData\Local\Temp\swap.vhdx交换虚拟硬盘的绝对 Windows 路径。 pageReportingbooleantrue默认的true设置使 Windows 能够回收分配给 WSL 2 虚拟机的未使用内存。 guiApplicationsbooleantrue一个布尔值,用于在 WSL 中打开或关闭对 GUI 应用程序 (WSLg) 的支持。
swapFilepath%USERPROFILE%\AppData\Local\Temp\swap.vhdx交换虚拟硬盘的绝对 Windows 路径。 pageReportingbooleantrue默认的true设置使 Windows 能够回收分配给 WSL 2 虚拟机的未使用内存。 guiApplicationsbooleantrue一个布尔值,用于在 WSL 中打开或关闭对 GUI 应用程序 (WSLg) 的支持。
swapsizeWindows 上 25% 的記憶體大小四捨五入至最接近的 GB要新增至 WSL 2 VM 的交換空間,0 表示沒有交換檔案。 交換儲存體是以磁碟為基礎的 RAM,在記憶體需求超過硬體裝置的限制時使用。 swapFilepath%USERPROFILE%\AppData\Local\Temp\swap.vhdx交換虛擬硬碟的絕對 Windows 路徑。
[wsl2]memory=<size>processors=<number>swap=<size>localhostForwarding=<bool> 在配置设置完之后,执行wsl --shutdown命令进行关闭,随后执行wsl命令再次启动即可。 memory:限制内存 swap:交换分区 processors:限制核心数 localhostForwarding:关闭默认连接,将WSL2本地主机绑定到Windows本地主机...
The Advanced tab is only available in Hyper-V mode, because Windows manages the resources in WSL 2 mode and Windows container mode. In WSL 2 mode, you can configure limits on the memory, CPU, and swap size allocated to theWSL 2 utility VM. ...
虚拟机分配的交换空间,0 表示没有交换空间swap=<size># 自定义交换虚拟磁盘 vhd 的绝对路径swapFile=<path># 是否允许将 WSL 2 的端口转发到主机(默认为 true)localhostForwarding=<bool># `<path>` 必须是带反斜杠的绝对路径,例如 `C:\\Users\\kernel`# `<size>` 必须在后面加上单位,例如 8 GB 或 ...
swap=<size> # How much swap space to add to the WSL2 VM. 0 for no swap file. swapFile=<path> # An absolute Windows path to the swap vhd. localhostForwarding=<bool> # Boolean specifying if ports bound to wildcard or localhost in the WSL2 VM should be connectable from the host ...
swap=<size> # How much swap space to add to the WSL2 VM. 0 for no swap file. swapFile=<path> # An absolute Windows path to the swap vhd. localhostForwarding=<bool> # Boolean specifying if ports bound to wildcard or localhost in the WSL2 VM should be connectable from the host ...
直接编译源码,会因为内存不足导致失败,通过free -m查看内存,只有4GB内存,swap空间只有2GB。可以通过设置WSL配置文件来修改相关配置属性。 在用户目录下新建.wslconfig文件,在文件管理器输入%USERPROFILE%可找到用户文件夹。注意这里新建.wslconfig文件不要用新建文本文件的方式,这样文件可能没法被正确识别。可以通过命令行...