Skip to content

Instantly share code, notes, and snippets.

@Pierstoval
Last active March 14, 2021 18:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pierstoval/c454c3321b34bdffff51630afa00b69c to your computer and use it in GitHub Desktop.
Save Pierstoval/c454c3321b34bdffff51630afa00b69c to your computer and use it in GitHub Desktop.
Remove Windows directories from WSL's PATH
# Remove Windows directories from WSL's PATH
export PATH=$(echo $PATH \
| sed 's/:/\n/g' \
| sort -u \
| grep -v -e'/mnt/[a-z]/' \
| sed -z 's/\n/:/g' \
| sed 's/:$//'
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment