Ubuntu – How to access a mounted Windows share from the command line

command linesamba

I use Places > Connect to Server... to connect to a Windows share in my work environment (requires Kerberos authentication). When I do so, I can access the Windows share via Nautilus, but I can't figure out how to access the share from the command line without using smbclient.

For example, the share isn't mounted under /mnt or /media. I also looked into ~/.gvfs but that's empty as well.

Is it possible to access the mounted Windows share from the command line without using smbclient?

Best Answer

You can use:

mount -t smbfs //servername/myshare /mnt/servername/myshare -o username=myself

mount.cifs //servername/myshare /mnt/servername/myshare -o user=username,pass=password
is another option for scripting purposes.

If it doesn't work, try cifs instead of smbfs, aparently cifs works for newer Windows servers, but I've never had to use it.

Where //servername/myshare is the share address, and /mnt/servername/myshare is the mount folder in your system.

Once it's mounted you can access the share at /mnt/servername/myshare via command line.

I found the solution in this Ubuntu Forums: smbclient works, mount -t smbfs doesn't