Sunday, February 5, 2012

Ubuntu: how to automatically mount the shared folders on the network


After showing how automatically mount a Hard Drive in boot Ubuntu, Now see how they can make something similar: automatically mount a shared folder. The first thing to do is install smbfs, present in the official repository of all versions of Ubuntu:
sudo apt-get install smbfs
We create our mount point:
sudo mkdir /media/myfolder
In place of "mydirectory" Enter the name of the folder to share. Now we have to change fstab, Which is a configuration file used to indicate how many and which driver to load at system startup, with the respective options. Enter, therefore, the following command:
sudo gedit /etc/fstab
And at the end of the file add:
//servername/mydirectory /Media/mydirectory smbfs username=user,password=pass 0 0
But remember, this string is important, the highlighted fields, are replaced by their values in your configuration. If the folder you shared does not require username (user) And password (pass), Replaced these values with the string default. Save all and at the next reboot, you can check if your folders have been fitted correctly by typing:
sudo mount -a
It 's all :)
If this article was useful and you want to help us to grow Subscribing to our feed or Click "Like" in our Facebook page ,or follow us via Twitter or subscribing to our feed.

People who read this post also read :



0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More