把Tx2的/home目录挂载到台式机,方便可视化与文件修改
Tx2端(Ubuntu16.04),IP为:192.168.1.121:
1.安装nfs服务器
sudo apt-get install nfs-kernel-server nfs-common
2.配置允许共享的文件夹
sudo vim /etc/exports
3.写入:
/home 192.168.1.109(rw,sync,no_root_squash)
ps:格式说明:
/home :共享的目录
* :指定哪些用户可以访问
* 所有可以ping同该主机的用户
192.168.1.* 指定网段,在该网段中的用户可以挂载
192.168.1.109 只有该用户能挂载
(ro,sync,no_root_squash): 权限
ro : 只读
rw : 读写
sync : 同步
no_root_squash: 不降低root用户的权限
其他选项man 5 exports 查看
4.在Tx2端启动nfs服务:
sudo service nfs-kernel-server start
启动选项:
start|stop|status|reload|force-reload|restart
台式机端(Ubuntu14.04,IP为192.168.1.109):
1.安装nfs服务:
sudo apt-get install nfs-common
2.在主文件夹下建立文件夹作为Tx2挂载点
mkdir tx2
3.挂载:
sudo mount 192.168.1.121:/home /home/luoyongheng/tx2
4.卸载:
sudo umount ~/tx2