16
4
In my windows 10 command prompt, when I need to set the drive to some network shared drive I just use
net use V: //192.168.xxx.xxx/folder
I added Bash on Ubuntu on Windows in my Windows 10, and I'd like to have access to my network drives from the terminal as well, so I tried mounting it
sudo mount -t cifs -o username=myusername //192.168.xxx.xxx/folder /mnt/new_folder
where I created my new_folder
in the /mnt
folder, but I get the error
sudo: cannot find computer COMPUTER NAME
Where COMPUTER NAME
is the actual name of my computer that I can see in the Explorer as well.
What am I doing wrong and how can I mount network drives in my windows bash?
EDIT:
I got it to work partially, by adding my computer name in the hosts file in etc/hosts
127.0.1.1 COMPUTER NAME
But I still cannot mount the network drive
Those can't be the exact commands you used. Please use the exact commands. You state
– Rik – 2016-09-23T09:00:23.413network path
where you should have putCOMPUTERNAME
. Also don't use spaces in folders or put them between ". Remove the hosts entry. It just redirects the COMPUTER_NAME back to your own computer (which is not what you want). Please edit your question with the exact commands you use.Instead of network path I used my remote servers remote address (in my office), so it's along the line of
192.168.xxx.xxx/newtork_folder
. There are no spaces in the original, maybe I wasn't clear with that. – dingo_d – 2016-09-23T09:03:09.530Well, that all matters a lot in your question. (you had
network path
right after//
which should be the computername. Can you ping the computer by its ip or computername? – Rik – 2016-09-23T09:04:49.673I added Bash on Ubuntu on Windows in my Windows 10
O, wait... is this all on the same computer? How are you running Ubuntu on Windows? – Rik – 2016-09-23T09:06:38.983The bash is on Windows (I'm testing it out, the new anniversary update), the remote server is on the same network as my laptop. – dingo_d – 2016-09-23T09:07:42.193
@Rik http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/ :D
– dingo_d – 2016-09-23T09:08:06.777Can you do
sudo ping 192.168.xxx.xxx
? – Rik – 2016-09-23T09:19:38.533Nope, I get
ping: icmp open socket: Permission denied
, andsudo cannot find computer COMPUTER NAME
. I tried adding-p
flag to mount but that didn't help – dingo_d – 2016-09-23T09:22:28.893It could be that you need to run bash as administrator. See http://superuser.com/questions/1108133/cant-ping-in-bash-on-windows
– Rik – 2016-09-23T09:23:00.630Ok, now I can ping the remote server just fine – dingo_d – 2016-09-23T09:30:21.017
Ok, now you can also connect to a share. But I'm not sure if you're going to see any files. It might be that Bash for Windows is still in beta. http://superuser.com/questions/1114272/bash-on-ubuntu-on-windows-mount-network-share
– Rik – 2016-09-23T09:35:51.367