Skip to content

Instantly share code, notes, and snippets.

@asgaut
Created April 3, 2022 09:48
Show Gist options
  • Select an option

  • Save asgaut/6987214ebc751c7c023f61dd21fcf507 to your computer and use it in GitHub Desktop.

Select an option

Save asgaut/6987214ebc751c7c023f61dd21fcf507 to your computer and use it in GitHub Desktop.
Shell script for removing Windows paths from WSL Linux $PATH variable
# 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:)
@asgaut
Copy link
Author

asgaut commented Apr 3, 2022

Download by running:
wget https://gist.githubusercontent.com/asgaut/6987214ebc751c7c023f61dd21fcf507/raw/.remove-win-paths.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment