Step 2: Enable sharing on Windows. I've been using the beta since it landed in Windows Insiders and I quickly switched over to … You’ll see that the folder icon have been changed to show that it has been shared. In WSL, by default, the C: disk in windows is mounted under /mnt/c; If you have another disk, for instance a D: disk in windows, it will be mounted under /mnt/d; The files you can see in /mnt/c are the same you have in C:. A problem with this approach is that your ssh keys need to be secured, but by default Windows files accessed through WSL are readable/writable by everyone and chmod has no affect on Windows files. Symlink (created in WSL bash) of project located in the Windows file system; Copy the project to the WSL file system; Out of the 3 listed options, only the last works with projectile (and likely other Emacs packages). WSL2 will automatically start the requested filesystem Linux image and the 9P file server in less than a second upon attempting to access the WSL2 image filesystem. Sharing the same set of keys feels a bit more like I’m on one system instead of two. Once installed, we need to tell Docker to use WSL 2. (ex: mkdir /mnt/m) Mount the drive with sudo mount -t drvfs M: /mnt/m; Mount Drives in a Persistent Manner. It is possible to safely access the WSL filesystem from Windows. I care because I’m always looking for the one “right way” to do things. WSL has special drivers set up so that your Windows drives on /mnt always follow Windows rules, and everything else follows Linux rules. This can be remedied by re-mounting your Windows partition inside WSL with … Your shared files simply need to be saved on the Windows side, accessed on Linux through /mnt. Note the letter of the network drive that you would like to map in WSL. Thus, you should be able to safely share data under /mnt with the normal amount of data corruption. We will use M: in this example. If you modify some file, you will get the changes in the windows too. Note: you can find a list of distro names by running: And that should have WSL 2 enabled for your Linux distro. Use the installer here to download the latest version. Create a new folder for that drive letter under /mnt if it does not already exist. On Windows, right click on “This PC” or “My Computer”, and select “Add a new connection”. The reality is that there is no one “right way” to do anything. When you have Windows Subsystem for Linux (WSL) enabled, you can install WSL distro apps … You can setup SSH keys on both WSL and Windows, or you can set them up just in Windows and share them with WSL. Exit WSL and re-open it, and your home directory will now match your windows directory. Next, we need to install Docker Desktop for Windows. Now you can enable WSL 2 for your distro using the following command: e.g. Access Windows Subsystem for Linux files 31 May, 2020. Now access the shared folder on Windows machine. September 3, 2019 by Matt Hernandez, @fiveisprime It's been a couple of months since the initial betas for the Windows Subsystem for Linux 2 (WSL 2) were launched and I wanted to share a bit about what this is all about and how this will help you be more productive. Sharing files between systems can be awkward. How to Access Linux Files in a Windows Subsystem for Linux (WSL) Distro from Windows 10 The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and modern store apps. WSL 2 with Visual Studio Code. To stop sharing a folder, just uncheck the Share this folder option. But I need to be able to access/modify the files from Windows as well, so that is … ... Alternatively, you can select Settings from the Docker system tray icon menu, then choose the General tab, check Use the WSL 2 … Metadata and File Permissions. For WSL2, the WSL distro need not be running first to access the files within.