Created
April 3, 2022 09:48
-
-
Save asgaut/6987214ebc751c7c023f61dd21fcf507 to your computer and use it in GitHub Desktop.
Shell script for removing Windows paths from WSL Linux $PATH variable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Shell script for removing Windows paths from WSL Linux $PATH variable | |
| # Save the script in the $HOME directory and run with | |
| # . $HOME/.remove-win-paths.sh | |
| # or create an alias: | |
| # alias rwp='source $HOME/.remove-win-paths.sh' | |
| PATH=$(grep -v '^/mnt/c/'<<<"${PATH//:/$'\n'}"|paste -sd:) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Download by running:
wget https://gist.githubusercontent.com/asgaut/6987214ebc751c7c023f61dd21fcf507/raw/.remove-win-paths.sh