Mounting a windows share in Windows Subsystem for Linux

David Hoffman picture David Hoffman · Jul 21, 2017 · Viewed 21.8k times · Source

I'd like to mount a windows server from within WSL (Windows Subsystem for Linux). On Ubuntu (with unity interface) I can just type

gvfs-mount smb://domain\;user@server/share

and everything mounts just fine.

If I try this in WSL then I get the following error:

Error mounting location: volume doesn't implement mount

Answer

LaVache picture LaVache · Oct 27, 2017

Assuming the host Windows OS can access a file share at "\\servername\sharename", try this command in bash. You will need to be root:

mkdir /mnt/mountedshare
mount -t drvfs '\\servername\sharename' /mnt/mountedshare

The single quotes are important!

Worked for me with a SharePoint Online UNC path. The permissions are screwy though. I can navigate through the folders and see the filenames, but I can't read files. So need to figure out the permissions thing. Let me know if you get anywhere with that.