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

  • 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: 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 howtogeek.com/331053 – Biswapriyo Nov 10 '17 at 10:20

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
git init

Or git-scm.

  • There is no need for cygwin. Use git for windows (git-scm.com/download/win) and mount remote drive with net use (or Windows Explorer) as usual. – FractalSpace Nov 9 '17 at 15:44
  • @FractalSpace Yes, git-scm is just as good. – simlev Nov 10 '17 at 9:42

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...

  • 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

The Windows Subsystem for Linux is still in beta, and some features are not fully implemented. Other features that are could still have bugs.

For example, I had a problem with ln on some machines seemingly linking directories properly, but there were issues cding to subdirectories in the target.

Since mounting a drive uses a similar folder redirection transparency, that may be the cause of the issue. The fact that it's a network share probably introduces a number of quirks by itself.

  • Thanks for the reply, I understand that it's in beta however 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 (even looked for a github issue so I could track if it's fixed or not). – user3906878 Aug 19 '16 at 20:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.