我知道有关 WSL/2 的大多数问题都是关于减少内存使用,但我的问题有点不同。我在 Windows 中拥有 32 GB 可用空间,但 WSL2 只允许我使用最多 24 GB。是否有办法确保 Windows 拥有的所有内存在 WSL 中也可用?或者是出于特定原因为系统保留的?
Windows 构建:
PS C:\Users\dakot> [System.Environment]::OSVersion.Version
Major Minor Build Revision
----- ----- ----- --------
10 0 19044 0
Run Code Online (Sandbox Code Playgroud)
wsl.confUbuntu WSL 实例中不存在:
dakota@DESKTOP-1KK3IBB:~$ cat /etc/wsl.conf
cat: /etc/wsl.conf: No such file or directory
dakota@DESKTOP-1KK3IBB:~$ ls /etc | grep wsl
dakota@DESKTOP-1KK3IBB:~$
Run Code Online (Sandbox Code Playgroud)
.wslconfig在我的目录中找不到%UserProfile%:
PS C:\Users\dakot> ls
Directory: C:\Users\dakot
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 3/2/2022 9:46 AM .aws
d----- 3/2/2022 …Run Code Online (Sandbox Code Playgroud)