5

To connect to a samba shared drive on my network, I can use nautilus, press ctrl+l and type in smb://192.168.0.x, enter my credentials and am able to connect and browse the drive.

How can I do the same thing from the command line?

troylatroy
  • 1,275
  • 1
  • 11
  • 21
zako42
  • 265
  • 1
  • 2
  • 6

1 Answers1

5

Use the mount command sudo mount -t cifs //192.168.0.x/<Share> /path/to/mount -o username=myuser,password=mypass

/path/to/mount is an existing directory.

You may need to install cifs-utils but I think its included with Ubuntu desktop.

vanadium
  • 88,010
Dan
  • 6,753
  • 5
  • 26
  • 43
  • thanks for the info -- so behind the scenes, nautilus is mounting the drive. So when nautilus does this, it's specifying /path/to/mount in ~/.gvfs? – zako42 Mar 31 '14 at 19:45
  • I am not sure at all that nautilus uses cifs. Otherwise the workaround to this bug (fixed now) would have not worked: https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1075923 – Rmano Mar 31 '14 at 19:50