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
network pathwhere 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. – Rik Sep 23 '16 at 09:00192.168.xxx.xxx/newtork_folder. There are no spaces in the original, maybe I wasn't clear with that. – dingo_d Sep 23 '16 at 09:03network pathright after//which should be the computername. Can you ping the computer by its ip or computername? – Rik Sep 23 '16 at 09:04I added Bash on Ubuntu on Windows in my Windows 10O, wait... is this all on the same computer? How are you running Ubuntu on Windows? – Rik Sep 23 '16 at 09:06sudo ping 192.168.xxx.xxx? – Rik Sep 23 '16 at 09:19ping: icmp open socket: Permission denied, andsudo cannot find computer COMPUTER NAME. I tried adding-pflag to mount but that didn't help – dingo_d Sep 23 '16 at 09:22