WSL-related Registry: A small dive

---
date: Jul 19, 2020
tags:
- WSL
- WSL2
language: English
---
This post is more than 5 years old. If this is a technical post, the post will most likely not working, but feel free to try it and see if it works.

Due to the lack of documentation, some of the information is possibly not complete or inaccurate. This is a updated version since WSLConf 2020.

Information of WSL distributions store here: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss.

Overview

Overview of the key
Overview of the key

Store Distribution Key

View of a sample store distribution key
View of a sample store distribution key

Here are the details of the key values:

Imported Distribution Key

View of a sample imported distribution key
View of a sample imported distribution key

As you can see, by default imported distribution do not have DefaultEnvironment‌, KernelCommandLine and PackageFamilyName. Also by default, DefaultUid will be 0 which is root.