Sharing data between WSL and Windows

The default way of sharing data between Windows Subsystem for Linux (WSL) is mounting Windows directories inside WSL. This works, but is rather slow.

There is a different way: Mount a WSL file system under windows. You can even mount a bare drive in WSL, format it with e.g. ext4, remount it as ext4 and then assign a drive letter under Windows.

Rob Pomeroy has written a blog post about this.

He does not mention an additional way to mount from Windows which if found on SuperUser, so I add it here:

subst z: \\wsl.localhost\Ubuntu

Not sure how fast that is from the Windows side though.

And since I am at it: Microsoft has some actually good documentation about mounting drives under WSL.