Using WSL by default you get full access to the Windows filesystem but not to any mapped network drives.
To mount network drives in WSL use the following command.
sudo mount -t drvfs <mapped drive letter> <mountpoint>
For example to mount a network drive mapped to F to a WSL location /mnt/f you would type
sudo mount -t drvfs F: /mnt/f/
Now you can access any file in the share.
bob@NN07:/mnt/f$ cd /mnt/f
bob@NN07:/mnt/f$ ls -la
total 43040
drwxrwxrwx 1 root root 512 Apr 21 17:35 .
drwxr-xr-x 6 root root 4096 Jul 26 2021 ..
-rwxrwxrwx 1 root root 24580 Apr 1 09:24 .DS_Store
drwxrwxrwx 1 root root 512 Apr 22 10:26 '1. Betalingsoversigt'
-r-xr-xr-x 1 root root 4070530 Feb 21 10:56 4C75657E-AA3F-452F-8A7A-0BCC2FA9BD0B.jpeg
-r-xr-xr-x 1 root root 3653911 Feb 21 10:56 5154952A-E777-4DD1-A47D-577F9A6D5F3F.jpeg
-r-xr-xr-x 1 root root 3249146 Feb 21 10:56 584EEF8B-7ABB-4E1D-890A-C521F2AA7127.jpeg
drwxrwxrwx 1 root root 512 Jan 25 18:35 '99. Gamle filer'
drwxrwxrwx 1 root root 512 Mar 22 21:33 Analytics
-r-xr-xr-x 1 root root 2842725 Feb 21 10:56 CCB0AF8C-223E-4A6B-8BF6-6BECC91076A4.jpeg
drwxrwxrwx 1 root root 512 Apr 7 15:39 Collection
drwxrwxrwx 1 root root 512 Jun 8 2021 'Concept Store'
Hi there, I am getting this error:
mount: /mnt/r: special device R: does not exist.
init: (836) ERROR: UtilCreateProcessAndWait:489: /bin/mount failed with status 0x2000
init: (836) ERROR: MountPlan9:478: mount cache=mmap,rw,trans=fd,rfdno=3,wfdno=3,msize=65536,aname=drvfs;path=R:;symlinkroot=/mnt/ failed 2
No such file or directory
Even though I can navigate through the R: drive on my PC in file explorer. Any suggestions?
HI Bella,
This looks like a known issue but this seems to have a workaround using CIFS. See this issue. https://github.com/microsoft/WSL/issues/6093