Need to navigate a remote folder via shell?
Well, as you’ve noticed, it’s not possible to do this without mounting the folder somewhere.
To do this, you need smbfs (which, from what I’ve found online, is a file system or, better, a “mountable” SMB).
To install it, open a terminal and type:
sudo apt-get install smbfs
After that, you’ll need to create a folder where you’ll mount the remote folder; this can be in any location you prefer (I put it on the “Desktop”) and you can create it however you want (via GUI or with a simple “mkdir”).
Now you’ll need to mount the remote folder in the folder you just created:
sudo mount -t smbfs -o username=user_name,workgroup=server_workgroup //server_name/remote_folder_name /path/to/newly_created_folder
Where “-t” indicates what type of file system you want to mount, “-o” that what follows are options; “server_name” would be the name of the computer where the remote folder you want to reach is located, and “remote_folder_name” is the name of the remote folder.
If the two machines are under the same workgroup, the “workgroup=workgroup” field can be omitted.
After executing this command, you’ll be asked for the password of the user on the server machine you want to reach: if necessary, it can also be added in the command options, but it will be in clear text:
-o username=user_name,password=user_password
There’s just one small issue: the owner of the mounted folder won’t be you but the “superuser”, so whatever you want to do, you can only do it as “superuser”.
Bye!
! :) !