WSL Config Generator

Frequently Asked Questions

What is WSL?

WSL stands for Windows Subsystem for Linux. It is a compatibility layer for Microsoft Windows that allows you to run a Linux distribution alongside your Windows installation.

You can read more about WSL on microsoft.com

What are the different WSL versions?

There are two major versions of WSL:

  1. WSL 1: This version uses a translation layer to convert Linux system calls into Windows NT kernel calls. While it allows you to run Linux utilities and some applications, it may not provide full compatibility with all Linux software due to the translation overhead.
  2. WSL 2: This is an updated version that provides a more complete Linux kernel environment running in a lightweight virtual machine (VM) on Windows. WSL 2 offers improved performance and better compatibility with a wider range of Linux software. It also allows for running Docker containers with Linux as the base OS.

What version of WSL am I running?

You can find your current version of WSL by running the following command: wsl --version

.wslconfig generator

Use the .wslconfig generator to generate a .wslconfig file. This is used to provide tweaks and assign limits to WSL2 environments.

Kernel

An absolute Windows path to a custom Linux kernel
Additional kernel command line arguments.

Resources

How much memory to assign to the WSL 2 VM. Default is 50%
How many logical processors to assign to the WSL 2 VM.

Safe mode

Run WSL in "Safe Mode" which disables many features and is intended to be used to recover distributions that are in bad states. Only available for Windows 11 and WSL version 0.66.2+.

Swap

How much swap space to add to the WSL 2 VM, 0 for no swap file. Swap storage is disk-based RAM used when memory demand exceeds limit on hardware device.
An absolute Windows path to the swap virtual hard disk.

Page reporting

Default true setting enables Windows to reclaim unused memory allocated to WSL 2 virtual machine.

Windows 11 only

Only check these options if you use Windows 11
Boolean to turn on or off support for GUI applications (WSLg) in WSL. Only available for Windows 11.
Boolean to turn on an output console Window that shows the contents of dmesg upon start of a WSL 2 distro instance. Only available for Windows 11.
Boolean to turn on or off nested virtualization, enabling other nested VMs to run inside WSL 2. Only available for Windows 11.
The number of milliseconds that a VM is idle, before it is shut down. Only available for Windows 11.
You must check this option to have Windows 11 features output.