树莓派和局域网中的电脑文件共享
- 安装samba
sudo apt-get install samba samba-common-bin
2.打开samba
sudo nano /etc/samba/smb.conf
3.配置共享文件夹
[public]
comment = public storage
path = /home/public/wenjian
valid users = pi
read only = no
create mask = 0777
directory mask = 0777
guest ok = no
browseable = yes
保存——保存到文件smb.conf——退出
4.把pi设置为有效账户
sudo smbpasswd -a pi
5.重启samba
sudo samba restart
6.设置文件权限
sudo chmod -R 777 /home/public/wenjian
附:电脑 win+R 运行\192.168.1.1\public
192.168.1.1根据具体Pi的局域网地址填写
查看方法:打开路由器的连接查看就行