- 1. Description
- 2. Requirements
- 3. Server Setup
- 4. Client Setup
- 5. Sources
This article demonstrates how to configure and connect to an NFS Share.
Install required packages
$ sudo apt install nfs-kernel-server
Create the Directory that will be Exported
$ sudo mkdir -p /export
Caution: In this example we will be configuring the NFS share to be accessed without authentication.
$ sudo chmod -R 777 /export
Please Note: Setting 777 permissions to a file or directory means that it will be readable, writable, and executable by all users.
$ sudo nano /etc/exports
exports file defines which file systems are exported to remote hosts.
To export the folder we just created, add the following two line to
This will publish the
/export folder on the local subnet,
Restart the NFS Service
To apply the changes, restart the
$ sudo systemctl restart nfs-kernel-server
The client configuration is relatively simple.
Follow these steps tp setup and test the NFS Mountpoint on the Client.
Install the required packages
$ sudo apt install nfs-common
Create the directory on the client filesystem where the NFS share will be mounted:
$ sudo mkdir /mnt/<hostname>
To ensure the NFS shared folder is mounted by the client on every reboot, add the following line to
<nfs-server-IP>:/export /mnt nfs auto 0 0
If the client will not consistently and reliably have access to the NFS server (i.e. a laptop that connects to multiple private/public networks), then use the
noauto option in the
/etc/fstab file instead, so that it will ‘‘not’’ automatically try to mount the filesystem at boot.
<nfs-server-IP>:/export /mnt/whitefoot nfs noauto 0 0
In this scenario, the user can manually mount the share using the following command:
$ sudo mount /mnt/whitefoot
https://linuxize.com/post/how-to-mount-an-nfs-share-in-linux/#:~:text=Automatically Mounting NFS File Systems with %2Fetc%2Ffstab,-Generally%2C you will&text=The %2Fetc%2Ffstab file contains,the %2Fetc%2Ffstab file. ↩︎