I need to run sudo mount -a after boot since auto mount of the share doesn't happen as needed (/etc/fstab contains the right code for that ).

How can I do this on Jessie Pixel?


2 Answers 2


Write a systemd or init service that does what you want.

you can also use cron by running:

sudo crontab -e 


@reboot /my/special/script.sh

Don't forget to chmod the script (chmod 744). This should run your script once after reboot.

  • I tried 'sudo crontab -e' and 'crontab -e' , adding : @reboot mount -a both - no success. even tried : sudo mount -a again - so success
    – guyd
    Jun 7, 2017 at 12:31
  • Any idea why isn't working??
    – guyd
    Jun 8, 2017 at 6:35
  • what's not working ? is the script executed ? add some logging or write to some file.
    – Tychus
    Jun 8, 2017 at 7:24
  • I did not write script but the command "mount -a" to mount shares. After boot I write in terminal the command and shares are mounted immediately
    – guyd
    Jun 8, 2017 at 7:32
  • try something like touch /some/file let's see if that command is actually gets called; you can also check the logs or just redirect whatever mount will return to some file and see what's wrong.
    – Tychus
    Jun 8, 2017 at 7:55

Answered in another thread. I is all about timing


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