0

First my setup:

  • I have Ubuntu 10.04 and i am using Oracle VirtualBox to run my Windows 7.

On my windows i have access to a the shared drives for example, all i need to do is go tools-> map drive and i can enter the name of the drive (user/password) and i am done:

\\smalldrive

so i am trying to access the same drive on ubuntu, because i dont want to open the VM just to access those files.

I have read on Liberian Geek How to mount the share on ubuntu, but i am missing some piece of information to make it work:

sudo mount -t cifs //Windows_PC/Shares /mnt/Windows -o user=username
                   ^----Here---^

how can i get the name of the computer from which i am getting the shared folder. I was thinking even if i can get the ip address i can use it in place of the name.

So unless someone has a better suggestion here is what i need:

  • How can i get the ip address of the computer from the shared drive
  • How can i mount it directly on ubuntu.

EDIT:

The shared drive is not on my machine but on a different machine on the network. i don't know the name of the computer nor the ip address

1
  • Make sure your VM is configured to use "Bridged networking" - otherwise the guest system will not be accessible from others computers than the host.
    – Robert
    Jul 27, 2011 at 7:39

2 Answers 2

1

After researching for a long time, I realized it was something very easy to do.

In Windows 7, in the command line I did a ping:

ping smalldrive

This returned the IP address of the server hosting this drive.

In my Ubuntu machine I simply used a regular mount:

sudo mount -t cifs //New IP/Shares /mnt/Windows -o user=username

and now I don't have to run my Windows VM just to access this shared folder

0

You can use the IP address to mount to the Windows share. On the Windows box, go to a command prompt and type:

ipconfig[ENTER]

This should give you the IP address of the network adapter on the Windows machine.

Then on the Linux machine you can mount the share with:

sudo mount -t cifs //10.0.0.2/Shares /mnt/Windows -o user=username

Where 10.0.0.2 is the IP address of the Windows virtual machine.

4
  • thank you for your prompt response. I added a little edit, to mention that the network drive i am accessing is not on my machine, but on a different computer on the network.
    – Ibu
    Jul 27, 2011 at 6:27
  • You can get the info from your Windows 7 machine. View the properties of the network share shortcut, and it should tell you the server name or ip address. Jul 27, 2011 at 6:54
  • @Joe i tried right clicking, and go on property, i went through all the tabs, and i cant see that information
    – Ibu
    Jul 27, 2011 at 17:42
  • Sorry about that... you can look in the "Network Neighborhood" to see what other servers show up, run net view from the command line and see if it lists a SMB/SAMBA server, or if you have registry access (run regedt32), look under HKEY_CURRENT_USER\Network\<drive-letter>. It will be listed as RemotePath. Jul 27, 2011 at 20:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .