Share directories between Linux hosts with NFS
8 steps · about 2 h 13 min · Intermediate
- Install an NFS server and client on Ubuntu (article, Ubuntu Server documentation, 12 min)
The shortest working path from package install to a mounted share.
- Set up an NFS mount between two servers (tutorial, DigitalOcean Community, 30 min)
A full two-host walkthrough including ownership and root squashing.
- Configure NFSv4 exports, clients and troubleshooting (article, ArchWiki, 30 min)
Detailed server and client setup plus a long troubleshooting section.
- Choose export options in /etc/exports (reference, man7.org Linux man pages, 15 min)
Defines rw, sync, root_squash and host patterns so exports stay tight.
- Reload and list exports with exportfs (reference, man7.org Linux man pages, 8 min)
Lets you apply export changes without restarting the server.
- Pick client mount options for NFS (reference, man7.org Linux man pages, 15 min)
Explains hard vs soft, timeouts and versions that decide failure behaviour.
- Mount shares on demand with autofs (article, ArchWiki, 15 min)
Avoids boot hangs by mounting shares only when they are accessed.
- Check NFS traffic and errors with nfsstat (reference, man7.org Linux man pages, 8 min)
Gives server and client counters for spotting retransmits and errors.