accessing an SMB remote folder from ubuntu's command line
November 12th, 2007
You may be able to browse an SMB-shared remote folder using a file browser capable of opening smb URLs like this:
But if you try to simply chdir into this folder from the unix shell, of course you will get a No such file or directory error, and that's because the shell will not understand the smb:// URL and it will try to handle it like a normal file name.
To access this remote folder from within your shell, you will have to mount it in an existing local folder. That means that you will need root access.
First you have to make sure that you install the smbfs package, to add smb file system support in your system:
Then you have to create a folder to be used as your mount point:
Then you can go ahead and finally mount the remote folder:
After that, you can simple go to /media/my-remote-folder and do whatever you want to do from the shell.
smb://remote-host/folder-nameBut if you try to simply chdir into this folder from the unix shell, of course you will get a No such file or directory error, and that's because the shell will not understand the smb:// URL and it will try to handle it like a normal file name.
To access this remote folder from within your shell, you will have to mount it in an existing local folder. That means that you will need root access.
First you have to make sure that you install the smbfs package, to add smb file system support in your system:
sudo apt-get install smbfsThen you have to create a folder to be used as your mount point:
sudo mkdir /media/my-remote-folderThen you can go ahead and finally mount the remote folder:
sudo mount -t smbfs //remote-host/folder-nameAfter that, you can simple go to /media/my-remote-folder and do whatever you want to do from the shell.