Linux Server

$ sudo apt install nfs-kernel-server

$ cat /etc/exports
/data/ghost  *(rw,sync,no_subtree_check,insecure)

$ sudo mkdir -p /data/ghost

$ id pi
uid=1000(pi) gid=1000(pi)

$ sudo chown pi:pi /data/ghost

$ touch /data/ghost/README.txt

$ sudo systemctl restart nfs-server

$ rpcinfo -u localhost nfs 3 # for NFSv3 via UDP
program 100003 version 3 ready and waiting

$ rpcinfo -t localhost nfs 4 # for NFSv4 via TCP
program 100003 version 4 ready and waiting

$ showmount -e localhost
Export list for localhost:
/data/ghost *

$ hostname -I

Linux Client

$ sudo apt install -y nfs-common

$ cat /etc/fstab | grep nfs /home/pi/ghost nfs4 rw,relatime,noauto,user 0 0

$ pwd

$ mkdir -p ghost

$ mount ghost

$ umount ghost

As systemd unit:

# /etc/systemd/system/mnt-ghost.mount
Description=Network File System


# /etc/systemd/system/mnt-ghost.automount
Description=Automount NFS



Windows Client

C:\> type nfs.reg
Windows Registry Editor Version 5.00

C:\> nfs.reg

C:\> nfsadmin client stop

C:\> nfsadmin client start

C:\> mount -o anon \\\data\ghost Z:

C:\> mount

Local    Remote                                 Properties
Z:       \\\data\ghost           UID=1000, GID=1000
                                                rsize=1048576, wsize=1048576
                                                mount=soft, timeout=0.8
                                                retry=1, locking=yes
                                                fileaccess=755, lang=ANSI

C:\> umount Z:
Network File System overview
Explains what Network File System is.
Reference article for the nfsadmin command, which manages both Server for NFS and Client for NFS.

Windows only supports NFSv2, NFSv3.

For NFSv4 only server:

# /etc/default/nfs-kernel-server
RPCMOUNTDOPTS="--no-nfs-version 2 --no-nfs-version 3 --nfs-version 4 --no-udp"
RPCNFSDOPTS="--no-nfs-version 2 --no-nfs-version 3 --nfs-version 4 --no-udp"