2

I've tried making some changes in various .conf files in my Ubuntu WSL2 install, such as editing /etc/sysctl.conf with nano, adding vm.max_map_count=262144 at the end of it, saving, then rebooting Windows, and finally checking if vm.max_map_count still = 262144 ...

When I do a sysctl vm.max_map_count it still ends up showing the default 65530.

However, if I do a cat /etc/sysctl.conf I'm still seeing that new line that I added to it, with 262144?

2 Answers2

0

I have the same problem. That doesn't work because /etc/sysctl.conf is not read when WSL2 starts up.

There's a workaround for that: https://github.com/shayne/wsl2-hacks

GxFlint
  • 305
  • 1
  • 2
  • 9
0

This github issue appears to be the same problem and has just been elevated to a feature:

https://github.com/microsoft/WSL/issues/4232

N-ate
  • 101