Skip to content

Instantly share code, notes, and snippets.

@fmoliveira
Forked from onomatopellan/wsl.conf
Last active June 12, 2020 05:16
Show Gist options
  • Save fmoliveira/0a263a65fb23b204121a08a17c99c358 to your computer and use it in GitHub Desktop.
Save fmoliveira/0a263a65fb23b204121a08a17c99c358 to your computer and use it in GitHub Desktop.
/etc/wsl.conf Avoid adding Windows Path to Linux $PATH

Right now access to /mnt folders in WSL2 is too slow and by default at launch the entire Windows PATH is added to the Linux $PATH so any Linux binary that scans $PATH will make things unbearably slow. #5159

The best for now is using appendWindowsPath=false and adding folders to the $PATH manually. For example for VSCode you only need: export PATH=$PATH:"/mnt/c/Users/onoma/AppData/Local/Programs/Microsoft VS Code/bin" replacing onoma with your Windows username.

Source: microsoft/WSL#4498 (comment)

[interop]
appendWindowsPath=false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment