WSL Path
You can use WSLPath to convert a WSL Path to a Windows Path and vice versa
Implementation
Calls wslpath which is a Linux based utility created by Microsoft to convert Windows and Linux paths.
We call wslpath, pass arguments, perform a conversion and return the results to the user
Converting Windows Path to WSL Path
OUTPUT
Windows Path converted to WSL is /mnt/c/Users
Converting WSL Path to Windows Path
OUTPUT
WSL Path converted to Windows is C:/Users
Converting Windows Path to WSL Path with a specific distro
In this case we are using Ubuntu
OUTPUT
Windows Path converted to WSL is /mnt/c/Users
Converting WSL Path to Windows Path with a specific distro
In this case we are using Ubuntu
OUTPUT
WSL Path converted to Windows is C:/Users