05 Network Share Folders

Table of Contents

Previous Page

Next Page


SAMBA uses Windows SMB for network sharing, making it visible to both Windows and Linux machines.This is also used in picframe device and pi-NAS.

SERVER SIDE SAMBA (host location of share folder)

Install packages from standard apt source:

sudo apt update &&
sudo apt install samba samba-common smbclient -y

If you are making a new “folder” for sharing:
first line makes “folder”, and second line makes sure you have permissions
replace “username” with your login

sudo mkdir /home/$user/folder &&
sudo chown -R $user /home/$user/folder

Finally, create login for connecting to the sharefolder:
It will also prompt for password; Make different than your user if shared with others

sudo smbpasswd -a guestname


Open the samba config file to finish setup:

sudo nano /etc/samba/smb.conf
  1. Add this to [Network] section:
allocation roundup size = 4096
browseable = yes
  1. Add this to the very end:
[FOLDER]
path = /home/$user/folder
writeable = yes
create mask = 0775
directory mask = 0775
browseable = yes

CLIENT SIDE SAMBA (LAN to view network sharefolder)

Install packages from standard apt source:

sudo apt update &&
sudo apt install samba samba-common smbclient -y

If you want to permanently mount sharefolder
Only recommended if host server is always online, like a NAS.

sudo mkdir /home/$user/folder &&
sudo apt install cifs-utils

Open fstab, which controls mounting drives.
BE CAREFUL WITH EXISTING CONTENT! Can break OS!

sudo nano /etc/fstab
  1. Add to bottom of fstab document:
//SERVER/share /home/username/folder cifs uid=username,username=guestname,password=smbpassword 0 0

Add shared printer to network ~~~~~~~~~~~~~~~~~~~~

First, need to share it

Then, if firewalled, add rule to allow

sudo apt install gufw  

Table of Contents

Previous Page

Next Page