1

In the blog post by Windows, they happily say

In the past, creating and changing Linux files from Windows resulted in losing files or corrupting data. Making this possible has been a highly requested and long anticipated feature.

Does that mean that it is now possible and safe to change files that you created in your Linux distro in Windows, or the other way around? That would be huge!

0

2 Answers 2

1

Does that mean that it is now possible and safe to change files that you created in Windows from within WSL.

This was actually always possible. This is the reason /mnt/c exists. This functionality was later updated to automatically mount all local drives.

Mount points for hard drives on the local machine are automatically created and provide easy access to the Windows filesystem.

/mnt/[Drive Letter Here]

Source: How do I access my C: drive?

To facilitate interoperability with Windows, WSL uses the DrvFs file system. WSL automatically mounts all fixed drives with supported file systems under /mnt, such as /mnt/c, /mnt/d, etc. Currently, only NTFS and ReFS volumes are supported.

Source: WSL File System Support

Does that mean that it is now possible and safe to change files that you created in your Linux distro in Windows

You must be running Windows 10 version 1903 for this to be possible. One of the new features is the ability to view the contents of the WSL instance from within File Explorer. The article you quoted explains how this new functionality actually works.

To put it briefly: a 9P protocol file server facilitates file related requests, with Windows acting as the client.

We’ve modified the WSL init daemon to initiate a 9P server. This server contains protocols that support Linux metadata, including permissions. A Windows service and driver that acts as the client and talks to the 9P server (which is running inside of a WSL instance). Client and server communicate over AF_UNIX sockets since WSL allows interop between a Windows application and a Linux application using AF_UNIX as described in this post[.]

Source: What’s new for WSL in Windows 10 version 1903?

0

It is possible to edit files on a Windows filesystem from a WSL installation. Usually, on all computers with WSL after build 1903, have their Windows partition mapped to /mnt/c/ or similar; as for the other way around there is no way to implement this outside of third parties as of now.

2
  • So you cannot use like nano when you are on the WSL terminal to edit a file that you created in Windows? Commented Jul 17, 2019 at 15:21
  • @BramVanroy - You have always been able to edit a file you created on Windows within WSL.
    – Ramhound
    Commented Jul 17, 2019 at 19:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .