Skip to content

Instantly share code, notes, and snippets.

@asizikov
Created February 3, 2021 09:58
Show Gist options
  • Save asizikov/a6ff67d8ce4b18acf77e14ca32771a32 to your computer and use it in GitHub Desktop.
Save asizikov/a6ff67d8ce4b18acf77e14ca32771a32 to your computer and use it in GitHub Desktop.
Configure global WSL options.
#C:\Users\<yourUserName>\.wslconfig
# https://blog.cloud-eng.nl/2021/02/03/wsl2-limits-vmmem/
[wsl2]
memory=6GB # How much memory to assign to the WSL 2 VM.
processors=4 # How many processors to assign to the WSL 2 VM.
swap=1GB # How much swap space to add to the WSL 2 VM, 0 for no swap file.
localhostForwarding=true # ports bound to wildcard or localhost in the WSL 2 VM should be connectable from the host via localhost:port.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment