Weekly Journal 61 - WSL

added by DotNetKicks
3/7/2022 4:32:16 PM

143 Views

I stumbled over an interesting little trick for using environment variables in both Powershell and WSL sessions. Windows has a special environment variable named WSLENV that is the source of the magic. You set WSLENV to a list of environment variable names separated by colons, and it will then take the values from Powershell and export them into a WSL session when it starts up.


0 comments