Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save aahung/ac7553985d8af872d45d15e0b00f7580 to your computer and use it in GitHub Desktop.
Save aahung/ac7553985d8af872d45d15e0b00f7580 to your computer and use it in GitHub Desktop.
How to remove Windows paths from WSL path

after Build 17093

  • can override settings by edit "/etc/wsl.conf"
  • normally this file is not exists at first
$ sudo vi /etc/wsl.conf

[interop]
appendWindowsPath = false

$ exit
c:\Users\user> wsl

$ echo $PATH

to take effect you should exit and relaunch shell

see also

default wsl.conf settings

[automount]
enabled = true
mountFsTab = true
root = "/mnt/"
options =

[network]
generateHosts = true
generateResolvConf = true

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