Not able to cd into samba location (in a windows share location)

The program "cd" can only navigate into directories mounted to your local VFS, and a URI that starts with "smb://" describes a remote resource. In order to cd into an SMB share, you have to mount it.

In your case, it sounds like the SMB share was already mounted and accessible from nautilus. That means the SMB share is already mounted somewhere in your local VFS.

In Ubuntu 15.04, I believe the default mount point for SMB shares (at least the ones you connect to using nautilus) is:

/run/user/$UID/gvfs/smb:host=$SERVER_NAME

So instead, try:

$ cd  /run/user/$UID/gvfs/smb:host=server/path/to/file.txt

Edit: For a more in-depth explanation of this, here is a similar question on unix stackexchange with some great answers


You cannot use just cd smb://server/folder from a terminal.

To access the folder from terminal you need to mount the folder first.

sudo mkdir /mnt/server

sudo mount -t cifs //remote/folder /mnt/server -o username=user uid=name

Or just type smbclient //hostname/folder and type the username/password. After successful login you will able to access the folders.


The shell (bash) does not use unique resource locators (URLs).

In addition to other answers that tell you how to mount samba shares manually, if you can access it with the file manager, it has already been mounted using gvfs. You will be able to access it throught the .gvfs/ directory in your home directory:

cd ~/.gvfs/
ls

If I'm correct, you should see a directory called folder on server/.