macos 上 nfs 共享设置
07 September 2025
macOS 上 NFS 共享设置
macOS 上启用 nfsd
sudo nfsd enable
编辑 /ext/exports,设置 NFS 挂载点:
/Users/mark/bin -alldirs -mapall=501:20 -network 192.168.1.0 -mask 255.255.255.0
/Users/mark/bin -alldirs -mapall=501:20 -network 192.168.100.0 -mask 255.255.255.0
/Volumes/GT50_2TB -alldirs -mapall=501:20 -network 192.168.1.0 -mask 255.255.255.0
/Volumes/GT50_2TB -alldirs -mapall=501:20 -network 192.168.100.0 -mask 255.255.255.0
然后:
重启 nfsd
sudo nfsd restart查看挂载点showmount -e
再在另一台macOS 上挂载测试
# 查看目标机器上的挂载点
showmount -e marksmacmini.local
# 挂载到本机的 /Users/luowei/temp 目录上
mount -t nfs -o nolock,vers=3 marksmacmini.local:/Users/mark/bin /Users/luowei/temp
