12

I have updated Windows 10 and installed the new bash on windows.

However on both PC's I have tried I am unable to mount a network share.

I've tried many different ways to mount the share:

sudo mount -t cifs -o username=xx,password=xx //192.168.x.x/Share /mnt/s

When running the above command it looks like it has worked, no errors (even with the --verbose option) However going to /mnt/s shows nothing and mount shows: //192.168.x.x/Share on /mnt/s type cifs (rw).

I am able to browse all the files/folders on the share using smbclient

user3906878
  • 123
  • 1
  • 1
  • 4
  • 1
    I'm running into the same problem. Even if you mount the share from Explorer it won't be listed under /mnt/ (unlike the other internal or external drives). I think this is a limitation of the current implementation but really would love to hear more about this. – Astaar Aug 28 '16 at 13:39
  • @Astarr Same, I have the share mounted in Windows as a "drive" however bash is only showing "real" drives. I can't see anything online about this or track any progress when it might be fixed. If you find any information about this issue I would very much appreciate it. – user3906878 Aug 28 '16 at 15:58
  • 1
    There's an issue open ob their Github. That's all I could find: https://github.com/Microsoft/BashOnWindows/issues/214 – Astaar Aug 28 '16 at 21:23
  • @Astarr great thanks! will keep an eye on the github issue aswell. – user3906878 Aug 29 '16 at 21:49
  • 1
    See this article https://www.howtogeek.com/331053/ – Biswapriyo Nov 10 '17 at 10:20

2 Answers2

5

WSL has been under heavy development and it now supports mounting network shared folders:

sudo mkdir /mnt/s
sudo mount -t drvfs '\\192.168.x.x\Share' /mnt/s
cd /mnt/s
git init

Old answer

I'm actually answering your comment here:

I'm looking for a solution or workaround to the issue (such as another program) that will allow me to run git inside a folder on the share.

Use Cygwin:

net use V: \\\\192.168.x.x\\Share
cd /cygdrive/v
git init

Or cmder:

net use V: \\192.168.x.x\Share
V:
git init

Or git-scm.

simlev
  • 3,782
  • 3
  • 14
  • 33
1

I used:

sudo mount -t drvfs \\path\to\server\share /mnt/u

Where /mnt/u had already been created.

Since I log connect to bash with my domain credentials, no need for adding creds nanoto command. Read and write works with my permissions.

Now to get it to mount using fstab...

Ken S
  • 21
  • 2
  • This seems to be your first contribution. Please, read other answers before yours, as you posted the same command that was posted in 2017. Thanks for joining our community :D – DGoiko May 10 '19 at 19:53