server
1.安装NFS服务器
sudo apt-get install nfs-kernel-server nfs-common
2.编辑配置文件 、/etc/exports
增加
share_path *(rw,sync,no_root_squash,insecure)
3.重启
/etc/init.d/nfs-kernel-server restart
client(mac)
1.新建文件夹
mkdir local_path
2.测试远程共享目录
showmount -e remotehost
3.挂载
mount -t nfs 172.16.12.173:share_path local_path
4.卸载磁盘
sudo diskutil unmount local_path
sudo fuser -c local_path