.bashrc
: Will load all the windows environment variables to your bash environment variables. DO NOT JUST OVERWRITE YOUR.bashrc
powershell
: A helper script that should be set to execute permission and in a location in your path.wsl_helper.bash
: contains some helper functions for loading the environment variables, and converting from/to windows/wsl paths.env.ps1
: A powershell script that is executed via WSL->Windows interop to get the environment variables
Put powershell
file in a location that is in your path. I use ~/bin
and chmod +x powershell
.
Put .wsl_helper.bash
and .env.ps1
in your ~/
path.
Edit your ~/.bashrc
file and add:
source ~/.wsl_helper.bash
eval $(winenv)