So, my problem is that I have a Windows and Linux share I connect to for working with files and my web server each day, but having to open the network folders through Files every time I turn the laptop back on only to close the folders again, seeing as I access the files I need through other programs, I wanted to know if there's a way to have them auto-connect or even auto-mount as soon as the OS boots and I log in.

It was easy to do with other distros and I love elementary OS, but this is something I need to work more efficiently. Any help would be greatly appreciated!


3 Answers 3


Yes, this is possible, I do this for exactly the same reason.

First you will want a script stored somewhere in your PATH, specially if you want to mount multiple shares. My script looks a bit like this:

gvfs-mount smb://<server1>/<share1> &
gvfs-mount smb://<server2>/<share2> &

Don't forget to make the script executable (chmod +x scriptname). I keep the script in ~/bin but you can use wherever is most suitable for you. Then, to have this run at login time, create a .desktop entry. You can do this either manually or through:

Applications --> System Settings --> Applications --> Startup

From there click '+' and in the Custom Command box enter the name of your script. Log out and back in to check it works.


One other option if you dont want to edit files is to use gigolo. go to the app store and search for gigolo.

The gigolo app is very easy and you can add all the shares you want nice and quick and you can also remove with the same ease.

Once installed add gigolo to your startup folder and then it will be opened at start up.


Add network disks to fstab with options:


Your uid and gid give you write permissions, gvfs- options show mounted disk ass a tab in pantheon (desktop manager).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.