How to permanently mount file shares in Ubuntu 18.04 with fstab

Today we are looking at how to permanently mount file shares on Ubuntu 18.04.  When I was a sysadmin we used it to mount file shares permanently to any place in your system's file system.

To be able to mount file shares, you would need the following:  Existing file shares in your network, The static IP address of your server, know where you file is located in your server and where you want to mount it on your system, and lastly the file share username and password.  

If you want to create file shares, look here:

https://www.linuxmadesimple.info/2019/01/how-to-share-folders-with-samba-with.html

Please follows the videos, as a guide to mount shares and the instructions below.  The first command will open the fstab file in a text editor, you could use any text editor you prefer.  The next command, needs to be edited, as seen in the video, with your file share's details.  Enjoy!

Instructions:
sudo gedit /etc/fstab

#your file share
//ip address of fileshare/path to share  /where to mount it on your system  cifs  username=username of server,password=password of server,uid=1000,gid=104,iocharset=utf8,file_mode=0777,dir_mode=0777,nounix  0  0

Do you need remote help, setting up your system, installing programs or general troubleshooting?  Hire me on Upwork! Click here!

Subscribe to our weekly Linux Round-Up: SUBSCRIBE


Curios about Chromebooks have a look at our Chromebook Comparison Chart!

Want to buy us a cup of coffee, thank you!

Do you want an ad-free, secure web experience, that pays you?  Look here for more information!

Follow us on Facebook:  https://www.facebook.com/linuxmadesimple

Comments