← Tutte le guide
NFS server on Ubuntu
NFS (Network File System) shares folders between Linux/Unix machines with lower overhead than Samba — the standard choice when every client is Linux, such as sharing storage between a home server and a Proxmox/VM cluster.
Sistema: Ubuntu 22.04 LTS / 24.04 LTSfile-sharingNFSLinux-to-LinuxSito ufficiale ↗Documentazione ufficiale ↗
Questa guida è redatta a partire dalla documentazione ufficiale di NFS server on Ubuntu, linkata sopra — verifica sempre lì i nomi esatti di pacchetti/versioni prima di eseguire questi comandi su un server di produzione, poiché le versioni della distribuzione e del progetto cambiano nel tempo.
1Install the NFS server
sudo apt updatesudo apt install -y nfs-kernel-serversudo mkdir -p /srv/nfs/sharedsudo chown nobody:nogroup /srv/nfs/shared2Export the share
Add an entry to /etc/exports naming the folder and which client IPs/subnets may mount it.
echo '/srv/nfs/shared 192.168.1.0/24(rw,sync,no_subtree_check)' | sudo tee -a /etc/exportssudo exportfs -rasudo systemctl restart nfs-kernel-server3Mount it from a Linux client
sudo apt install -y nfs-commonsudo mkdir -p /mnt/nfs-sharedsudo mount server-ip:/srv/nfs/shared /mnt/nfs-sharedAdd an entry to /etc/fstab on the client to make the mount persist across reboots, rather than remounting it manually every time.