If you want to share some files across the network, create a home storage server or just want to easily transfer files from your Windows machine to Raspberry Pi device this article is for you. As well it's a small reminder for me with the list of command and configuration option.

Samba is an implementation of the SMB (Server Message Block) protocol and it allows you to share access to files, printers, and serial ports between computers on a network.

I hope you already have your Raspberry Pi ready (OS is installed and the network access is configured). These instructions are for Raspbian, but will also work with any Debian based OS.

Note: This guide will show you how to configure anonymous access to the folder on your Raspberry Pi device. In this case, it's better to not expose the device to the outside world. 

First, install Samba:

sudo apt-get install samba samba-common-bin

Then open samba config:

sudo nano /etc/samba/smb.conf

Now add the folder you want to share over the network at the end of the file:

comment = Shared folder
path = /share
browseable = yes
writeable = yes
only guest = no
create mask = 0777
directory mask = 0777
public = yes
guest ok = yes

Create a folder you want to share access to:

sudo mkdir /share
sudo chmod 0777 /share

Restart Samba server

sudo service smbd restart
sudo service nmbd restart

Done! Now you can open this file share from another computer. On Windows, press Ctrl+R and type \\<raspberry-pi-IP>\share

If you are prompted for login and password, just enter nobody into both fields.