Skip to content

WSL configurations

wsl-configs – a repository containing a curated collection of configuration files for Windows Subsystem for Linux (WSL).

Main configurations


.wslconfig

.wslconfig – a fully documented global WSL 2 configuration file.

Copy the configuration to :

C:\Users\<UserName>\.wslconfig

Where <UserName> is a Windows username.

Make configuration changes and shut down WSL:

wsl --shutdown

Start it again, and after this, the configuration will be applied.

Info

More information about the configuration is available on the .wslconfig reference page.

wsl.conf

wsl.conf – a fully documented per-instance configuration file used by both WSL 1 and WSL 2 instances.

Copy the configuration to:

/etc/wsl.conf

Make configuration changes and shutdown an instance:

wsl --terminate <InstanceName>

Start it again, and after this, the configuration will be applied.

Info

More information about the configuration is available on the wsl.conf reference page.

wsl-distribution.conf

wsl-distribution.conf – a fully documented per-distribution configuration file used during installation and except OOBE script during import of the distribution.

Info

More information about the configuration is available on the wsl-distribution.conf reference page.

distributions.json

distributions.json – a manifest template used to add additional WSL distributions.

Additional configurations


Distributions

Distributions – an unofficial, ready-to-use registerable list of additional WSL distributions.

Info

More information about the additional WSL distributions list is available on the Additional WSL distributions list page.

Or from the repository using commands (run as administrator):

Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss" `
  -Name DistributionListUrlAppend `
  -Value "https://raw.githubusercontent.com/greengorych/wsl-configs/main/distributions/distributions.json" `
  -Type String -Force
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss" ^
/v "DistributionListUrlAppend" ^
/t REG_MULTI_SZ ^
/d "https://raw.githubusercontent.com/greengorych/wsl-configs/main/distributions/distributions.json" ^
/f

After adding the manifest, additional distributions will appear in the list of available distributions.

wsl --list --online

To remove an additional list, use the following commands (run as administrator):

Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss" `
  -Name "DistributionListUrlAppend"  `
  -Force
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss" ^
/v "DistributionListUrlAppend" ^
/f