Advanced settings configuration in WSL (.wslconfig and wsl.conf) — by Microsoft Learn
Explains the two config files: .wslconfig in your Windows profile for global WSL 2 VM limits (memory, CPUs, swap, networking mode) and /etc/wsl.conf inside each distro (automount, systemd, default user). Changes only apply after WSL fully stops, so run wsl --shutdown and wait a few seconds.
Quick steps
- Create %UserProfile%\.wslconfig with a [wsl2] section, e.g. memory=4GB and processors=2
- Enable systemd per distro by adding [boot] systemd=true to /etc/wsl.conf
- Run wsl --shutdown, then relaunch the distro
Paraphrased from the source. Menus can differ by version, so check the original for full details.
Source: Advanced settings configuration in WSL (.wslconfig and wsl.conf) by Microsoft Learn. Licence: Link only (©).
- Source reviewed
- 2026-11-02
- Link checked
- 2026-11-02
- Tested hands-on
- Not by Oddbyte.Me