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

We are on social media! For announcements, content release updates (across all our projects), and much more, please join our Reddit community!
https://www.reddit.com/r/linuxmadesimple/


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

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

Comments