In my /etc/fstab, I have set up a few CIFS shares to be mounted, using the template shown below:

// /mnt/mountpoint/ cifs auto,_netdev,x-systemd.automount,uid=1000,cache=none,user=XXX,password=XXX,workgroup=WORKGROUP 0 0

I copied the same lines to my colleague's computer (we are both running Ubuntu 12.04 LTS); however, the shares wouldn't mount on his computer until I removed the x-systemd.automount option.

As I'd like to understand the problem, could you please let me know what might have caused it?

  • I'm not a Ubunut user but I think Ubuntu moved to systemd. the x-systemd.automount should work with the latest version. – Philippe Jun 23 '15 at 17:16

Ubuntu doesn't use systemd, so x-systemd.automount won't work. I guess it is just interpreted as an invalid mount option.

If you want to have your CIFS share mounted on-demand have a look at this: http://wiki.ubuntuusers.de/Autofs


systemd was introduced in ubuntu 15.04.

After adding x-systemd.automount to an fstab line, you need to run:

sudo systemctl daemon-reload

and then one, or both, of the following:

sudo systemctl restart remote-fs.target
sudo systemctl restart local-fs.target

only then will the automount become active.

  • This works great. You can also add x-systemd.device-timeout=10 to your fstab line for a timeout limit. – Stuart K. Smith May 21 '18 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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