【问题标题】:RAM access on wsl2-linux [closed]wsl2-linux上的RAM访问[关闭]
【发布时间】:2021-12-30 05:57:31
【问题描述】:

机器

我有一台运行 ubuntu 20.05 LTS 的带有 wsl2 的戴尔 XPS15 windows 11 笔记本电脑。

窗口

当我打开settings > system > about 时,我看到了:

Installed RAM: 32.0 GB (31.8 GB usable)

WSL2

当我在我的 wsl2-linux(ubuntu 20.04 LTS) 终端中运行 htop 时,我看到了:

Mem 15.5 G
Swp 4.00 G 

问题

  1. 我可以让 wsl2-linux 访问我所有的 RAM 吗?

  2. 如果可以,我该怎么做?

  3. 如果不是,技术问题是什么?

【问题讨论】:

    标签: ram wsl-2 windows-11


    【解决方案1】:

    50% 内存是默认值。你可以改变它。

    https://docs.microsoft.com/en-us/windows/wsl/wsl-config#global-configuration-options-with-wslconfig

    运行 wsl --shutdown 以关闭所有活动实例。 在您的个人资料目录中编辑.wslconfig,例如

    [wsl2]
    memory=30GB
    

    然后重新启动wsl。

    【讨论】:

      猜你喜欢
      • 2016-05-20
      • 2021-05-26
      • 2021-02-05
      • 1970-01-01
      • 2012-08-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-09
      • 1970-01-01
      相关资源
      最近更新 更多