How to install NFS on ubuntu 16.04 | 18.04 | 20.04

NFS ( Network File System ), is a circulated document framework convention that enables you to mount remote indexes on your server. This lets you oversee extra room in an alternate area and keep in touch with that space from various customers. NFS gives a generally brisk and simple approach to get to remote frameworks over a system and functions admirably in circumstances where the mutual assets will be gotten to normally.

In this post, We will install and configure NFS on ubuntu 16.04 / 18.04

NFS Server IP
NFS Client IP

Install NFS Server

To install NFS Server on ubuntu 16.04, Use the following commands with root privileges.

sudo -i

apt-get update 

apt-get install nfs-kernel-server -y

Create NFS share Directory

To share any directory on NFS server, You need to create a directory by following the commands.

mkdir /mnt/nfs-share

chown nobody:nogroup /mnt/nfs-share

Configure NFS Server with Shared Directory

To configure created diretory with NFS server use the following commands.

vim /etc/exports

Add the given parameter.


Note If you share the nfs directory to specific network use the network id like this

Save and exit from vim editor 

Restart the NFS Service 

To get effect use the following commands.

systemctl restart nfs-kernel-server

NFS Server side configuration is completed.

NFS Client Configuration 

You need to install NFS client packages with root privileges using the given commands.

apt-get update

apt-get install nfs-common -y

Create Mount Point 

To get access on nfs shared directory in nfs client machine, You need to create or use any others directory, Use the given command to create a mount point directory.

mkdir -p /mnt/nfs

Mount the NFS network Directory

To temporary mount the nfs network directory use the given commands.

mount /mnt/nfs

Verify the Mounted pointed using df -h commands

df -h

How to install NFS on ubuntu 16.04 | 18.04 | 20.04

3 thoughts on “How to install NFS on ubuntu 16.04 | 18.04 | 20.04

Leave a Reply

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

Scroll to top