

Rankin's answer has some info on how to specify username and password if you need to do it separately. Anyone feel free to edit the following with additional clarity and extra information, the following is a sequential list of tasks before I could copy to a WSL Distro with an attached storage device for running a backup. Note that I have logged into the server on Windows itself and made it remember the user and password. The answer from NotTheDr01ds was very useful, although I did not find this to be the full answer. (you can reload fstab with sudo mount -a) On this WSL issue I found good options (-o) that seem to work very well with creating, reading and writing files without sudo as well as reading correct modification/creation dates: metadata,rw,noatime,uid=1000,gid=1000,umask=22,fmask=11īecause I like to have this server mounted always, I put the mount instruction into /etc/fstab to have it auto-mounted by WSL: \\server\share /your/mount/folder drvfs metadata,rw,noatime,uid=1000,gid=1000,umask=22,fmask=11 0 0

As usual, your mount folder must also exist. The important bits are the file system type ("drive filesystem"?) and the fact that you need to enclose the server path in single quotes (on the command line). Previously, it was possible to find your Linux files in your AppData folder, but Microsoft warns against that. Nothing too hard, the source path of the mount is the regular UNC pathname. Windows 10’s April 2019 Update brings a long-awaited feature: Support for easily accessing, viewing, and even modifying Windows Subsystem for Linux (WSL) files from File Explorer or via the command line. You use mount just as usual: sudo mount -t drvfs '\\server\share' /your/mount/folder Mounting an SMB server share should be straightforward, I tested this on Windows build 1909 and WSL 2.0 Ubuntu 20.04.1 LTS (GNU/Linux 4.19.128-microsoft-standard x86_64).
