I have a shared folder on windows and I usually mount it like this
mkdir /media/somedir sudo mount -t cifs //servername/sharename /media/somedir
The problem is that once I restart the machine the mounted shared folder is no longer their and I have to run the above commands again. I wonder if there is a way to automount it when trying to access this directory? I've checked with @Gilles commenting to his answer found here and as shown in the below screenshot, he said it can be done by editing the file but it's not recommended and he said may be there is a way to automount it when trying to access the directory and he suggested me to ask a question as someone may be able help. Any advice?