Skip to content

Advanced settings configuration in WSL (.wslconfig and wsl.conf) — by Microsoft Learn

intermediatepageLink only (©)WSL 2; systemd needs a current Store version of WSL

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

  1. Create %UserProfile%\.wslconfig with a [wsl2] section, e.g. memory=4GB and processors=2
  2. Enable systemd per distro by adding [boot] systemd=true to /etc/wsl.conf
  3. Run wsl --shutdown, then relaunch the distro

Paraphrased from the source. Menus can differ by version, so check the original for full details.

Read the full article on learn.microsoft.com

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

wslwslconfigsystemdmemory

More in Sandbox & Virtualization