Check your path, echo $PATH. WSL2 normally imports Windows path there. To fix this create file /etc/wsl.conf
in WSL2:
[interop]
appendWindowsPath = false
Then restart WSL2 with wsl --shutdown
. Then check your path is shorter now and doesn't include any Windows dependencies:
echo $PATH
source: github
Add follwing to ~/.zshrc
:
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
source: stack overflow