sudo apt-upgrade
sudo apt install samba samba-common-bin
mkdir /path/to/shared-directory
sudo chmod 777 /path/to/shared-directory
配置Samba共享设置。编辑配置文件/etc/samba/smb.conf
,在文件末尾添加以下内容:
[SharedDirectory]
path = /path/to/shared-directory
read only = no
browsable = yes
增加权限
sudo smbpasswd -a pi
重启Samba服务:
sudo systemctl restart smbd nmbd