About Me

header ads

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 :)

Post a Comment

0 Comments