Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSL ignores environment path #8976

Closed
ezxpro opened this issue Oct 9, 2022 · 2 comments
Closed

WSL ignores environment path #8976

ezxpro opened this issue Oct 9, 2022 · 2 comments
Labels

Comments

@ezxpro
Copy link

ezxpro commented Oct 9, 2022

Long story short, I installed anaconda and added it to path using putting export PATH=$PATH:/path/to/anaconda in .bashrc, didn't work. on ZSH, I added it to .zshrc, didn't work either. These always work on a live distro, but not inside wsl. I then tried adding it to /etc/profile, didn't work either.

Then someone told me about this ask ubuntu issue, which basically says you should add paths to /etc/environment.

I did it and it worked, until I restarted WSL and it no longer worked.

I have none of this issues when running a full linux distro on my pc, not sure what's happening, it's looks like a WSL issue.

@tusharsnx
Copy link

Can you share your $PATH so that we can have a look. May be some other program is modifying the values.

I am assuming none of the windows path is getting added if its disabled.

@OneBlue
Copy link
Collaborator

OneBlue commented Oct 11, 2022

Thanks for reporting this @ezxpro. WSL doesn't edit the $PATH after the shell is started, so changing the interop settings shouldn't affect this.

This is probably a configuration issue. I'd recommend validating that the changes you made to .zshrc / .bashrc are correctly applied by running echo $PATH (also FYI you need to restart your shell to apply your changes in those files).

More info here

Closing since this isn't a WSL issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants