NFS allows us to mount a network share as a local device. This system uses the client IP address for authentication. Don't confuse it with SMB, which allows user and password authentication.

In this tutorial, we'll explain how to connect an NFS share to an Ubuntu Server as a client.

Install dependencies

First, we must install the dependencies.

apt install nfs-common

Create a mount point

Once we've installed the dependencies, we must ensure the mount point we want to use exists.

mount -p /mnt/backups

Add a persistent mount

Using the mount command, we can temporarily mount the NFS share. However, we'll modify the /etc/fstab file to make the mount persistent.

192.168.1.10:/Backups /mnt/backups nfs defaults,_netdev 0 0

To apply the changes we've made at /etc/fstab we must run:

mount -a

Now we can check that the NFS mount is working as expected.

df -h
Filesystem                     Size  Used Avail Use% Mounted on
/dev/sda2                       30G  6.9G   21G  25% /
192.168.1.10:/Backups          916G  594G  322G  65% /mnt/backups