WSL Subnet
Editing the Windows registry can potentially cause system instability if done incorrectly. Always create a backup of the registry before making changes.
To set up a new network in your NAT interface in WSL, you need to edit the registry.
The keys can be found under this path: βComputer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxssβ.
There are two keys that need to be changed. They can be updated to the following values:
- NatGatewayIpAddress =
192.168.0.1
- NatNetwork =
192.168.0.0/24
Afterwards, you need to restart your PC. When thatβs done, open a WSL window and check the network interfaces to verify they have been changed to the new network.
Windows Terminal
Gist to personal VSCode settings file
GitHub repo to personal dotfiles
Dotfile repo still work in progress
WSL Configuration dotfiles