Skip to content

树莓派SMB服务

bash
sudo apt-get update
sudo apt-get install vim samba -y

配置samba

bash
sudo vim /etc/samba/smb.conf

写入

ini
[fuming]
path = /home/fuming
valid users = fuming
browseable = Yes
writeable = Yes
writelist = fuming
create mask = 0777
directory mask = 0777

设置密码

bash
sudo smbpasswd -a fuming

配置硬盘挂载

创建挂载点

bash
mkdir -p ~/mount/HFM256GDJ

查看已连接的硬盘

bash
sudo blkid

手动挂载

bash
sudo mount /dev/sda ~/mount/HFM256GDJ

设置开机自动挂载

bash
sudo vim /etc/fstab

写入如下内容

bash
UUID=14f25f69-71a2-4eec-a7cf-7096eb16d466 /home/fuming/mount/HFM256GDJ ext3 defaults       0       0
# UUID通过sudo blkid获取