How to Install NFS (Network File System) on Ubuntu 20.04


Easily deploy your favorite applications in seconds at an unbeatable price for your next projects.

How to Install NFS on Ubuntu 20.04

NFS (Network File System) is a distributed file system protocol that allows you to share files and folders across a network. It is commonly used in server-client environments to provide centralized storage.

Step 1: Update System Packages

Before installing NFS, it is always recommended to update the system packages to their latest versions. Open the terminal and run the following commands:

sudo apt update sudo apt upgrade

Step 2: Install NFS Server

To install the NFS server on Ubuntu 20.04, run the following command:

sudo apt install nfs-kernel-server

Step 3: Configure NFS Exports

NFS uses the concept of exports, which are directories that are shared with clients over the network. To configure NFS exports, open the exports file using a text editor:

sudo nano /etc/exports

Within the file, add a line for each directory you want to share. The syntax is as follows:

/path/to/directory client(options)

For example, to share the directory "/home/nfs" with a client at IP address "" and give them read-write access, add the following line:


Save the file and exit the editor.

Step 4: Start NFS Server

After configuring the exports, start the NFS server using the following command:

sudo systemctl start nfs-server

You can also enable the NFS server to automatically start at boot:

sudo systemctl enable nfs-server

Step 5: Configure Firewall

If you have a firewall enabled on your system, you need to allow NFS traffic. Run the following commands to allow NFS:

sudo ufw allow from to any port nfs sudo ufw enable

Step 6: Mount NFS Share on Clients

To access NFS shares on client machines, you need to mount them. On the client machine, run the following command:

sudo mount server:/path/to/directory /mnt

Replace "server" with the IP address or hostname of the NFS server, and "/path/to/directory" with the shared directory you want to mount. The mount point "/mnt" is just an example - you can choose any empty directory as the mount point on the client.


Congratulations! You have successfully installed and configured NFS on Ubuntu 20.04. You can now use NFS to share files and folders across your network.

Installing NFS on Ubuntu 20.04
NFS installation on Ubuntu 20.04
NFS setup on Ubuntu 20.04
Ubuntu 20.04 NFS installation guide
Network File System installation on Ubuntu 20.04
How to install NFS on Ubuntu 20.04
NFS server setup on Ubuntu 20.04
Ubuntu 20.04 NFS server installation
NFS client installation on Ubuntu 20.04
Ubuntu 20.04 NFS client setup.

Why Customers Love Us

What our customers say about us

Ready To Get Started For Free?

Create your free account today.