How to create a shared folder on linux in few step

A simple guide to create a shared folder accessible and writable from any device on the local network. 

Valid for Ubuntu, Debian, RaspberryPi, etc…

 Warning: this is one of the simplest and shortest procedures and creates a public folder; to create folders with users and passwords the procedure is more complicated. 

1. install samba

sudo apt-get install libcupsys2 samba samba-common 


2. create folder and permissions

mkdir -p /home/samba-share/allusers 
chmod –R a+rwx /home/samba-share/allusers 


3. edit config file

vi /etc/samba/smb.conf 

 note: to write to the file press “i”, to delete “delete”, to write to the file press “i”. 

 to save press: “esc” and type “:wq” (which corresponds to :writequit) 

Edit in the file: 

 security=user con security=share (in case remove the comment symbol) 

 Insert in the file (at the bottom): 

comment = PMS files 
path = /home/samba-share/allusers 
browseable = yes 
guest account = nobody 
guest ok = yes 
write ok = yes 
read only=no 

4. restart the service 

 sudo /etc/init.d/samba restart 


5. create a link on the desktop

sudo su 

cd /home/pi/Desktop 

ln –s /home/samba-share/allusers 

 The folder will now be visible in LAN with Read/Write permissions for all users (public folder). 


On you will also find a guide to install and configure your RaspberryPi from scratch. 

Share on Social Media