admin/ April 7, 2016/ Linux/ 0 comments

There are few simple steps to setup the NFS server on Ubuntu.

Setup the NFS at Server end.
Step 1-:

$ sudo apt-get install nfs-kernel-server portmap

Step 2-:
Create a directory to be share on server and change permissions

$ sudo mkdir /var/www/share
$ sudo chown nobody:nogroup /var/www/share

Step 3-:

$ sudo nano /etc/exports

add the below lines in /etc/exports


Step 4-:
Run the below command to configure export.

$ sudo exportfs -a

To check the configuration is working

$ sudo exportfs -v



Setup the NFS at client end.
Step1 -:
Install NFS Client packages

$ sudo apt-get install nfs-common portmap

Step 2-:
Create a directory to be mount and share

$ sudo mkdir /mnt/share

Step 3-:
To mount use the below command, use your NFS server ip here

$ sudo mount :/var/www/share /mnt/share


$ sudo mount /mnt/share

To Check the mount NFS.

$ sudo mount


$ mount
/dev/sda1 on / type ext4 (rw)
none on /proc type proc (rw)
/dev/sda6 on /home type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
gvfs-fuse-daemon on /home/user/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=user)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) on /mnt/share type nfs (rw,addr=
Share this Post

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.