What is NFS?
The Network File System (NFS) is a protocol used to share files over a network.
Configuration
Server
-
Install NFS-Utils
Ubuntu
1
apt install nfs-utilsFedora/CentOS
1
dnf install nfs-utils - Edit the Exports File
1
nano /etc/exports
- Add the Following line to
/etc/exportsfor each file share1
/path/to/folder/to/share NetworkAddress/HostAddress(rw,sync,no_root_squash)
Example
1
/mnt/NetworkShare/Share1 10.8.0.0/24(rw,sync,no_root_squash)
- Restart the NFS Server Service
1
systemctl restart nfs-server
Client
-
Install NFS-Utils
Ubuntu
1
apt install nfs-utilsFedora/CentOS
1
dnf install nfs-utils - Edit
/etc/fstab1
nano /etc/fstab
- Add the following for each file share
1
ServerAddress:Path/to/Share /local/path/to/mount nfs defaults 0 0
Example
1
10.8.0.1:/mnt/NetworkShares/Share1 /mnt/Share1 nfs defaults 0 0