PassioniInformaticaLinux

Guida: NFS e Samba — condivisione file in rete LAN

14/02/2026

File sharing: NFS per Linux, Samba per Windows

NFS — Server

apt install -y nfs-kernel-server
mkdir -p /srv/share
echo "/srv/share 192.168.1.0/24(rw,sync,no_subtree_check,no_root_squash)" >> /etc/exports
exportfs -ra

NFS — Client

apt install -y nfs-common
mount -t nfs server:/srv/share /mnt/share

Samba — Server

apt install -y samba
mkdir -p /srv/samba/public
[Public]
path = /srv/samba/public
browseable = yes
writable = yes
guest ok = yes

[Private]
path = /srv/samba/private
valid users = utente
create mask = 0660
smbpasswd -a utente
systemctl restart smbd

Samba — Client

# Linux
mount -t cifs //server/Private /mnt/samba -o username=utente

# Windows: \\server\Private

Risultato: Condivisione file in rete LAN con NFS (Linux) e Samba (Windows/Mac).

← Guida: Fail2Ban — proteggere SSH e servizi dagl... Guida: Tmux — sessioni terminale persistenti e ... →
← Torna all'elenco