Access WSL files from cygwin
Oleksandr Gavenko
gavenkoa@gmail.com
Thu Mar 4 19:44:16 GMT 2021
On 2021-02-07, Cary Lewis via Cygwin wrote:
> Is there a way to access files from a WSL 2 Linux distro from Cygwin?
>
> From Windows:
>
> \\wsl$\Ubuntu is accessible from Windows Explorer, but cygwin does not seem
> to recogonize:
>
> //wsl\$
I use following fstab to get access to WSL 1:
//wsl$/debian /wsl/debian ntfs binary,posix=0,user,noacl,notexec 0 0
//wsl$/ubuntu /wsl/ubuntu ntfs binary,posix=0,user,noacl,notexec 0 0
//wsl$/alpine /wsl/alpine ntfs binary,posix=0,user,noacl,notexec 0 0
There are problems to access some files (their attributes) but they are
special like /dev...
I have never tried WSL 2. I believe it uses P9 network fs.
Probably you have to use full distro names as reported by:
wslconfig.exe /list
not just '//wsl$'.
See following:
https://devblogs.microsoft.com/commandline/whats-new-for-wsl-in-windows-10-version-1903/
Announce of P9 server for WSL compatible with UNC.
Cygwin works with UNC according to the doc, that's why I tried it with fstab.
--
http://defun.work/
More information about the Cygwin
mailing list