Ubuntu – Ubuntu/ Windows Shared Folder (using WSL)

networkingwindows-subsystem-for-linux

I am running Ubuntu on Windows Subsystems for Linux (WSL). I have successfully created a 'shared' folder between the two. However, the files I add in Windows do not appear when 'ls' in Ubuntu. Only the files/ folders I create in Ubuntu are visible in both. how can I resolve that, please?

PS: I have searched the forum. There are no related question about shared folders using WSL.

Best Answer

The WSL RootFs filesystem (that under AppData/Local/lxss that appears as / in WSL) uses extended attributes which Windows doesn't understand to store Linux filesystem data, and so can't process. So if you edit or create files there (say in your 'shared' folder), those files will be invisible to WSL.

You need to create your 'shared' folder somewhere under /mnt/c, which uses the WSL DriveFs filesystem and doesn't suffer from this limitation.