Knowledge Base

The AB Electronics UK Knowledge Base provides support solutions, tutorials and troubleshooting guides.

Knowledge Base

Samba Setup on Raspberry Pi

How to install and setup Samba on the Raspberry Pi

Created 01/12/2016 | Last Updated: 07/07/2024

This tutorial show how to set up network file sharing using Samba on your Raspberry Pi to enable you to share files with Windows or OSX computers on your network using the SMB protocol.

Step 1: Open a terminal window, and at the command prompt, run this code to install Samba and Samba Common.

sudo apt-get install samba samba-common-bin

Step  2. Next, you need to edit the samba.conf file to change your Samba settings using nano.

sudo nano /etc/samba/smb.conf

You need to find the wins support line, and if there is a # at the beginning of the line, you need to remove it to uncomment the text.

workgroup = your_workgroup_name
wins support = yes

You can change the workgroup name to match your home or office network.

Add the following code to the Share Definitions section; the path line specifies the share path on your Raspberry Pi.

[pihome]
comment= Pi Home
path=/home/pi
browseable=Yes
writeable=Yes
only guest=no
create mask=0777
directory mask=0777
public=no

Save your changes to the smb.conf file.

Step 3. Now, you need to set the password for Samba using the following command:

sudo smbpasswd -a pi

Step 4: Restart Samba with the following command, and your new Raspberry Pi share should appear on your Windows or OSX network.

sudo service smbd restart

 

Home

Shop

Learn

Forum

FAQ

Contact

0 item

Your cart is empty

Please browse our shop to order from the wide range of Raspberry Pi boards and accessories.

Subtotal:£0.00
View Basket Continue to Checkout