Home NFS How To
Post
Cancel

NFS How To

What is NFS?

The Network File System (NFS) is a protocol used to share files over a network.

Configuration

Server

  1. Install NFS-Utils

    Ubuntu

    1
    
     apt install nfs-utils
    

    Fedora/CentOS

    1
    
     dnf install nfs-utils
    
  2. Edit the Exports File
    1
    
     nano /etc/exports
    
  3. Add the Following line to /etc/exports for each file share
    1
    
     /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)
    
  4. Restart the NFS Server Service
    1
    
     systemctl restart nfs-server
    

Client

  1. Install NFS-Utils

    Ubuntu

    1
    
     apt install nfs-utils
    

    Fedora/CentOS

    1
    
     dnf install nfs-utils
    
  2. Edit /etc/fstab
    1
    
     nano /etc/fstab
    
  3. 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
    
This post is licensed under CC BY 4.0 by the author.