- Your Windows build number:
Version 10.0.18922.1000
- What you're doing and what's happening:
The PATH environment variable contains both the Linux path and the Windows PATH in a single variable. On my machine, this makes PATH traversal extremely slow. The problem is very obvious when using auto-completion (type an incomplete command and press <TAB>).
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Users/Me/AppData/Local/Microsoft/WindowsApps
The AppendNtPath registry value suggested here, which disables this behavior on WSL1, does not work on WSL2.
- What's wrong / what should be happening instead:
There should be a way to disable this automatic appending of the Windows PATH.