public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Oleksandr Gavenko <gavenkoa@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Access WSL files from cygwin
Date: Thu, 04 Mar 2021 21:44:16 +0200	[thread overview]
Message-ID: <vriu1rcuiu0f.fsf@gavenkoa.example.com> (raw)
In-Reply-To: <CAEF1h+VM8hHaf_ncb99udUewWz03LuZ6O2b-L6_134Qvn4V2jw@mail.gmail.com>

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/


      parent reply	other threads:[~2021-03-04 19:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-07 14:40 Cary Lewis
2021-02-07 18:08 ` Eliot Moss
2021-03-04 19:44 ` Oleksandr Gavenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vriu1rcuiu0f.fsf@gavenkoa.example.com \
    --to=gavenkoa@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).