NFS (Network File System) allows a Linux server to share directories over the network. Clients mount these shared directories as if they were local storage. NFS is one of the oldest network file sharing protocols, originally developed for Unix/Solaris systems. Windows Server has supported NFS since roughly 2008/2012.
NFS Server NFS Client
(has /data directory) <-------> (mounts /data as if local)
Configuration file: /etc/exports
One configuration file controls everything:
| Feature | NFS | Samba |
|---|---|---|
| Permission basis | IP address / network | Username and password |
| User awareness | No — treats all traffic from an IP equally | Yes — different users get different access |
| Security | Lower (IP-based only) | Higher (user-based) |
| Native to | Linux/Unix | Windows networks |
| Listing shares | Anyone can list shares even without permission | Requires authentication |
Even a client with no permission to access a share can still see the list of shares on the server by querying the exports. This is a known limitation of NFS. A client without permission cannot access or mount the data, but can enumerate what is being shared.
sudo dnf install nfs-utils