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 路徑。
swapsizeWindows 上 25% 的記憶體大小四捨五入至最接近的 GB要新增至 WSL 2 VM 的交換空間,0 表示沒有交換檔案。 交換儲存體是以磁碟為基礎的 RAM,在記憶體需求超過硬體裝置的限制時使用。 swapFilepath%USERPROFILE%\AppData\Local\Temp\swap.vhdx交換虛擬硬碟的絕對 Windows 路徑。
Swap: Configure swap file size as needed. The default is 1 GB. Disk image size: Specify the size of the disk image. Disk image location: Specify the location of the Linux volume where containers and images are stored. You can also move the disk image to a different location. If you at...
swapFilepath%USERPROFILE%\AppData\Local\Temp\swap.vhdx交换虚拟硬盘的绝对 Windows 路径。 pageReportingbooleantrue默认的true设置使 Windows 能够回收分配给 WSL 2 虚拟机的未使用内存。 guiApplicationsbooleantrue一个布尔值,用于在 WSL 中打开或关闭对 GUI 应用程序 (WSLg) 的支持。
[wsl2] memory=4GB processors=2 localhostForwarding=true swap=6GB swapFile=D:\\Temp\\WslSwap.vhdx memory值配置了用于 WSL 第 2 版的轻量级实用虚拟机消耗的内存限制。默认情况下,这是系统内存的 80%。同样,processors允许您限制虚拟机使用的处理器数量(默认情况下没有限制)。这两个值可以帮助您平衡在 ...
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 ...
swapFile 字符串 %USERPROFILE%\AppData\Local\Temp\swap.vhdx 交换虚拟硬盘的绝对 Windows 路径。 pageReporting boolean true 默认设置 true 使 Windows 能够回收分配给 WSL 2 虚拟机的未使用的内存。 guiApplications 布尔* true 一个布尔值,用于在 WSL 中打开或关闭对 GUI 应用程序 (WSLg) 的支持。仅适用于...
swapFile 字符串 %USERPROFILE%\AppData\Local\Temp\swap.vhdx 交换虚拟硬盘的绝对 Windows 路径。 pageReporting boolean true 默认设置 true 使 Windows 能够回收分配给 WSL 2 虚拟机的未使用的内存。 guiApplications 布尔* true 一个布尔值,用于在 WSL 中打开或关闭对 GUI 应用程序 (WSLg) 的支持。仅适用于...
直接编译源码,会因为内存不足导致失败,通过free -m查看内存,只有4GB内存,swap空间只有2GB。可以通过设置WSL配置文件来修改相关配置属性。 在用户目录下新建.wslconfig文件,在文件管理器输入%USERPROFILE%可找到用户文件夹。注意这里新建.wslconfig文件不要用新建文本文件的方式,这样文件可能没法被正确识别。可以通过命令行...