Setting up an NFS Server on Ubuntu

Published by admin. 18. August 2020 No Comments
  1. Run
sudo apt-get install nfs-kernel-server 

to install the necessary packages on the server

Create a directory anywhere you want, which will contain the shared filesystem. For example:

sudo mkdir /srv/nfsv4
sudo mkdir /srv/nfsv4/freigabe1

Once done, edit the file /etc/exports like so:

/srv/nfsv4   192.168.2.0/24(rw,sync,root_squash,no_subtree_check,fsid=0)

/srv/nfsv4/freigabe1  192.168.2.0/24(rw,sync,root_squash,no_subtree_check)

Once connecting to the NFS on the client, choose the servers IP address as the server address, and the entire path (e.g. /srv/nfsv4/freigabe1) as the share directory.

Finally, reload the settings:

sudo service nfs-kernel-server reload 

Leave a Reply

Your email address will not be published. Required fields are marked *