How To Mount Network Shares on Linux Automatically

Let’s face the fact that Linux is amongst the most complicated computer software. Several tasks are quite complicated o Linux, and mounting network shares is one of them. Several Linux users complain about having trouble in mounting the network on their Linux computer and laptop. It prevents users from using the Internet and leaves them helpless with no other alternative option to resolve this issue. Everything runs smoothly when you are able to mount that wireless internet connection you have with your Linux system. If you are amongst the users who is facing the issue in mounting the network on your Linux PC, then you have come to the right place. Here are some of the best and effective methods on how you can do the task in no time.

How To Mount Network Shares on Linux Automatically

By Restoring The FSTAB Backup File

Follow the steps listed below to restore the FSTAB backup file and mount the network;

  • Get Sudo -s to get a root shell.
  • Now, go to etc. and then Folder.
  • Delete broken FSTAB file in the Folder.
  • Now, copy the backup file by going back to the etc / directory by following the location ; cp /home/username/system-backups/fstab /etc/.
  • After that, change the name of that backup file.

By Automatically Mount NFS Share

It is another method you have to solve the issue. To do so, follow the steps listed below;

  • First of all, locate the share you are willing to mount.
  • Now, create a directory in which where the share would be mounted.
  • Access that FSTAB file by using nano – sudo-sudo/etc/fstab.
  • Type the command for that mount which is; servername: /data /home/username/Network-Files nfs rsize=8192, timeo=14, _netdev 0 0
  • Now reboot the system, and you are good to go.

By Backing Up Of The FSTAB File

It is the first thing you have to do before initiating for the further process. It’s quite essential to backup the FSTAB file. Backing up FSTAB file is necessary due to its importance as well as a presence in the further process of mounting the shared network. To do so, follow the steps listed below;

  • First of all, create a folder where you would keep the FSTAB file as a backup.
  • Use the command mkdir ~/system-backups to save the backup to the flash drive.
  • Now, you need to use sudo-s to get a root shell and select etc.
  • Now, backup that FSTAB file and store it in the Folder by following this command; Cp fstab /home/username/system-backups
  • After successfully storing the file in the Folder, rename it.
  • Now you have successfully backed up the FSTAB file and can now proceed for further process.

Source – How To Mount Network Shares on Linux Automatically

How To Mount Network Shares on Linux Automaticallyultima modifica: 2019-09-05T15:14:35+02:00da Rosyw6552