Samba is a fantastic free software re-implementation of the SMB/CIFS networking protocol that allows for shared file and print services across a variety of Windows and Unix (and even Mac OS) platforms.
Today’s quick tip highlights a simple way of mounting a remote samba directory as a folder in one’s home directory in Ubuntu.
The terminal command is as follows:
sudo mount -t cifs //[server name/ip address]//[shared folder name] ~/[desired folder name] -o username=[samba username],noexec
So if for example we were running a samba server at 10.0.0.6 and sharing a folder with the name craiglotter and a user account with the username of craig, we would end up with this:
sudo mount -t cifs //10.0.0.6/craiglotter ~/UbuntuMediaServer -o username=craig,noexec
After entering your sudo password you will be asked to authenticate the samba user account by entering the associated password. If successful, you should now have a nice and shiny, fully accessible folder named UbuntuMediaServer in your home directory!
Simple stuff! :)