Share a file of the Raspberry on its local network (Samba)

samba on raspberry pi 800x343

For simplicity, it may be useful to have a folder on the Raspberry that can be accessed from your PC.

I use it for example for:

  • Drop sound files that I have read to Google Home
  • Use this file as a link between Jeedom and Edwin

To do this, I describe the installation and configuration of Samba

Install Samba

As always before an installation, remember to do a system update. It can't hurt.

sudo apt-get update
sudo apt-get upgrade

We can now move on to the Samba facility:

sudo apt-get install samba samba-common

Then we'll edit the file /etc/samba/smb.conf

vi /etc/samba/smb.conf

At the very end of the file, delete the # to decomment the last two lines:

interfaces = 127.0.0.0/8 eth0
bind interfaces only = yes
And add:

[Share]
Comment = Sharing Samba on Raspberry Pi
path = /home/lional/sharing
writable = yes
guest ok = yes
guest only = yes
create mask= 0777
directory mask= 0777
read only = No

And now it’s over, relaunch Samba and search for your Raspberry in your Network on the PC
sudo systemctl restart smbd.service

Leave a Reply