按下Windows + R 键,输入 %UserProfile% 并运行进入用户文件夹,新建文件 .wslconfig,文件内容格式如下
[wsl2] memory=2048MB # 限制最大使用内存 swap=2G # 限制最大使用虚拟内存 processors=1 # 限制最大使用cpu个数 localhostForwarding=true
然后运行cmd,输入 wsl --shutdown
来关闭当前的子系统,重新运行bash进入子系统
');mask-image:url('data:image/svg+xml;utf8,');mask-mode:alpha;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-position:center;mask-position:center;border-radius:0}}.wp-block-image :where(.has-border-color){border-style:solid}.wp-block-image :where([style*=border-top-color]){border-top-style:solid}.wp-block-image :where([style*=border-right-color]){border-right-style:solid}.wp-block-image :where([style*=border-bottom-color]){border-bottom-style:solid}.wp-block-image :where([style*=border-left-color]){border-left-style:solid}.wp-block-image :where([style*=border-width]){border-style:solid}.wp-block-image :where([style*=border-top-width]){border-top-style:solid}.wp-block-image :where([style*=border-right-width]){border-right-style:solid}.wp-block-image :where([style*=border-bottom-width]){border-bottom-style:solid}.wp-block-image :where([style*=border-left-width]){border-left-style:solid}.wp-block-image figure{margin:0}/*]]>*/
按下Windows + R 键,输入 %UserProfile% 并运行进入用户文件夹,新建文件 .wslconfig,文件内容格式如下
[wsl2] memory=2048MB # 限制最大使用内存 swap=2G # 限制最大使用虚拟内存 processors=1 # 限制最大使用cpu个数 localhostForwarding=true
然后运行cmd,输入 wsl --shutdown
来关闭当前的子系统,重新运行bash进入子系统