以下皆参考此文章
屏幕共享
Screen sharing using the default VNC server included in Raspbian called RealVNC is sufficient to make it work with the default macOS Screen Sharing app.
- 进入 Raspberry Pi Configuration 中,将 VNC 设置为 Enable;
- 之后,树莓派屏幕右上角会出现 VNC 图标;
- 点击 VNC 图标,再点击 VNC Server 右上角的 menu 选择 Options;
- 在弹出的面板中 Security > Authentication 选择 VNC password;
- 点击 Apply,在弹出面板中设置密码;
- 通过 ifconfig 找到树莓派当前分配的 ip 地址;
- 在 Mac Finder 中,前往 > 连接服务器;
- 输入 vnc://树莓派的 ip 地址,点击连接并输入密码;
文件共享
By now, macOS uses Samba as its default network sharing protocol. So you can install it on the Raspberry Pi and macOS will handle it.
安装 samba
sudo apt update && sudo apt upgrade sudo apt install samba samba-common-bin
设置密码
sudo smbpasswd -a pi
设置可读写
sudo nano /etc/samba/smb.conf
In there, scroll down to the [homes] section and set read only = no to make shared home folders writable.
重启 Samba Service
sudo service smbd restart