You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
access to mapped network driver or shared folders? #214
map them to network drivers. But I cannot find these drivers in /mnt .Is there something i missed?
use mklink, then I got ' bash: cd: main: Input/output error '
Is there any way to use them in bash?
Reacted by Andrew Johnson, Mathieu Nayrolles, imakiro, Adam Suban-Loewen, Christian Zangl, cphurley82, fravelgue, Panda Rushwood, Tim D. Smith, TiborBremer and 10 more
It would be nice to see added Network Drives listed in the /mnt directory. So once you add a network drive on the windows side, its configured to pull in the new added drive in the /mnt directory.
Reacted by Adam Suban-Loewen, Christian Zangl, Panda Rushwood, bobcafer, Eddie Bachle, Albert Català, MarkRyanDev, Zhiming Jiang, Michael De Roover, ExE Boss and 4 more
While it's only a partial workaround (since cifs-utils doesn't succeed in mounting the drive), in the interim it's worth noting that Samba (the smbclient package) works perfectly under WSL and will let you at least move files back and forth from SMB/CIFS network shares.
I've found two places (Alistair Young (@cerebrate)'s comment included) that say smbclient works perfectly. This is not the case for me. I get the following error when I try smbclient: ERROR: Could not determine network interfaces, you must use a interfaces config line
Any ideas on how to fix this?
Wait... seems like I may have just found the answer. A line in /etc/samba/smb.conf that declares the default interface to use just had to be uncommented.
Just out of curiosity Prasanna Parthasarathy (@pvenky), what interface name did you use? I tried eth0 because I can't seem to list my network interfaces (ifconfig or ip link return errors) and that still doesn't work.
Arnaud Castaner (@acastaner) I can't use ifconfig either (and I think that is a known limitation). However, the line in smb.conf does say eth0. This is the line
(Both eth0 and eth1 since my machine has two network cards, one wired, one wireless.) I believe that including the loopback interface, lo, is necessary for this to work properly - if you haven't included it by name, try that?
Oh! Have you tried using smbclient to connect to a server anyway, though? You'll always get the no-network-interfaces-found warning (since the relevant ways to find them aren't yet part of WSL), but if you specify the interfaces explicitly, that doesn't matter and you can safely ignore the warning. My setup produces those same warnings every time I run smbclient, but it connects and moves files about just fine.
Ah, right, actually trying to connect and ignore the error seems to work, I can ls the files. Nice. Still doesn't solve my issue though since I need to be able to rsync, but it's good to know this works.
Arnaud Castaner (@acastaner) Hm. You could work around that by running rsync as a daemon at one end or the other, maybe? I believe both cwRsync and DeltaCopy can support that for Windows.
I also need this. Can't use WSL at work until network drives can be accessed directly. As a workaround, cygwin works for now but the performance is horrible compared to WSL.
All they have said (about half a year ago - see link below):
"on our backlog, but not currently scheduled"
This feature is (in my eyes) the most important,
forget tabbed windows (currently voted higher than this)... that's just nice to have.
The ability to mount network shares is required for most people Bash on Windows is aimed at (Developers), without this feature bash on windows is completely useless.
Ferrisbane (@Ferrisbane) - a lot can change in a year. We understand that this is a required scenario for many of our users and are looking at adding this support soon.
Reacted by Ferrisbane, Christian Zangl, James Rattue, Nicholas Guyett, Brett, Eric Sirianni and Markus Voge
Matt Janssen (@mattjanssen)'s tip works for me mounting the x: drive to /mnt/x, but I unfortunately get the following error fatal: Not a git repository (or any parent up to mount point /mnt/x) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set) when trying to even run git status. Have to use Git Bash CLI or Cygwin (like Toni Spets (@hifi) suggested) as a work around for now unless someone has a suggestion.
I got some shared folders and map them to network drivers. But I cannot find these drivers in /mnt .Is there something i missed?
Mounting CIFS shares was added in Insider Build 16176 and released Fall Creators Update 16299. The blog post is here. For other scenarios (meaning different Windows filesystem drivers) see #579#2896#2999#2163 and the like.
Activity
mphaney commentedon Apr 18, 2016
There is also a UserVoice topic related to this. I've voted for it because this is most definitely something I'll be needing as well.
https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13313280-access-to-network-shares-and-removable-drives
TheAggressive commentedon Apr 29, 2016
It would be nice to see added Network Drives listed in the
/mntdirectory. So once you add a network drive on the windows side, its configured to pull in the new added drive in the/mntdirectory.cerebrate commentedon Jul 19, 2016
While it's only a partial workaround (since cifs-utils doesn't succeed in mounting the drive), in the interim it's worth noting that Samba (the smbclient package) works perfectly under WSL and will let you at least move files back and forth from SMB/CIFS network shares.
pvenky commentedon Aug 8, 2016
I've found two places (Alistair Young (@cerebrate)'s comment included) that say smbclient works perfectly. This is not the case for me. I get the following error when I try smbclient:
ERROR: Could not determine network interfaces, you must use a interfaces config lineAny ideas on how to fix this?
pvenky commentedon Aug 8, 2016
Wait... seems like I may have just found the answer. A line in
/etc/samba/smb.confthat declares the default interface to use just had to be uncommented.acastaner commentedon Aug 28, 2016
Just out of curiosity Prasanna Parthasarathy (@pvenky), what interface name did you use? I tried eth0 because I can't seem to list my network interfaces (ifconfig or ip link return errors) and that still doesn't work.
pvenky commentedon Aug 29, 2016
Arnaud Castaner (@acastaner) I can't use
ifconfigeither (and I think that is a known limitation). However, the line insmb.confdoes say eth0. This is the lineFerrisbane commentedon Aug 30, 2016
I'm having the same issue with mounting a share.
cerebrate commentedon Aug 31, 2016
For reference, my interfaces line is:
interfaces = lo eth0 eth1
(Both eth0 and eth1 since my machine has two network cards, one wired, one wireless.) I believe that including the loopback interface, lo, is necessary for this to work properly - if you haven't included it by name, try that?
acastaner commentedon Aug 31, 2016
I have tried both
127.0.0.0/8 eth0andlo eth0, but when I run smbclient the OS still tells me it can't find any network interface:So not sure what's happening here or how to troubleshoot.
cerebrate commentedon Aug 31, 2016
Oh! Have you tried using smbclient to connect to a server anyway, though? You'll always get the no-network-interfaces-found warning (since the relevant ways to find them aren't yet part of WSL), but if you specify the interfaces explicitly, that doesn't matter and you can safely ignore the warning. My setup produces those same warnings every time I run smbclient, but it connects and moves files about just fine.
acastaner commentedon Aug 31, 2016
Ah, right, actually trying to connect and ignore the error seems to work, I can
lsthe files. Nice. Still doesn't solve my issue though since I need to be able to rsync, but it's good to know this works.cerebrate commentedon Aug 31, 2016
Arnaud Castaner (@acastaner) Hm. You could work around that by running rsync as a daemon at one end or the other, maybe? I believe both cwRsync and DeltaCopy can support that for Windows.
hifi commentedon Sep 20, 2016
I also need this. Can't use WSL at work until network drives can be accessed directly. As a workaround, cygwin works for now but the performance is horrible compared to WSL.
4 remaining items
immunochomik commentedon Apr 4, 2017
Ferrisbane commentedon Apr 4, 2017
I can not see any interest from MS in this...
All they have said (about half a year ago - see link below):
This feature is (in my eyes) the most important,
forget tabbed windows (currently voted higher than this)... that's just nice to have.
The ability to mount network shares is required for most people Bash on Windows is aimed at (Developers), without this feature bash on windows is completely useless.
You can view/vote on the feature here:
uservoice - mount-nfs-sshfs-samba-smb-network-drives
benhillis commentedon Apr 4, 2017
Ferrisbane (@Ferrisbane) - a lot can change in a year. We understand that this is a required scenario for many of our users and are looking at adding this support soon.
MrObvious commentedon Apr 10, 2017
That would be awesome! Even if we just had fuse support, I think we could make everything else happen.
GenesisCraig commentedon Apr 25, 2017
Here's another vote for this feature. Having bash access to CIFS mounted filesystems will be great for Sysadmins as well.
Thanks for the great work WSL team.
mattjanssen commentedon Jun 1, 2017
Looks like this feature is happening! Insider Build 16176 says it can mount network drives and network locations using the
drvfsin WSL. I'm assuming this will work for NFS drive mounts, too.laktak commentedon Jun 2, 2017
Matt Janssen (@mattjanssen) yes but it does not yet work for shared folders (vmware).
andyrichardson commentedon Aug 21, 2017
Matt Janssen (@mattjanssen) Any ideas on when that insider build will go public/beta?
laktak commentedon Aug 21, 2017
You can vote on the UserVoice issue for shared folders here
andyrichardson commentedon Aug 21, 2017
Christian Zangl (@laktak) That looks like a different issue altogether.
peter-avila commentedon Jan 6, 2018
Matt Janssen (@mattjanssen)'s tip works for me mounting the x: drive to /mnt/x, but I unfortunately get the following error
fatal: Not a git repository (or any parent up to mount point /mnt/x) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set)when trying to even run git status. Have to use Git Bash CLI or Cygwin (like Toni Spets (@hifi) suggested) as a work around for now unless someone has a suggestion.therealkenc commentedon Mar 24, 2018
The OP here was:
Mounting CIFS shares was added in Insider Build 16176 and released Fall Creators Update 16299. The blog post is here. For other scenarios (meaning different Windows filesystem drivers) see #579 #2896 #2999 #2163 and the like.