It is a easy information, a part of a collection I am going to name 'How-To Information With out Advertisements'. In it, I will doc how I create Samba (SMB) shares in Linux on a Raspberry Pi.
Set up Samba
That is essential, for apparent causes:
$ sudo apt set up -y samba samba-common-bin
Create a shared listing
$ sudo mkdir /mnt/mydrive/shared $ sudo chmod -R 777 /mnt/mydrive/shared
I will not take care of permissions on this publish; read the Samba docs for that.
Configure Samba to share that listing
Edit the Samba config file with
sudo nano /and so on/samba/smb.conf, and add the next:
[shared] path=/mnt/mydrive/shared writeable=Sure create masks=0777 listing masks=0777 public=no
Restart Samba so the brand new shared listing is offered:
$ sudo systemctl restart smbd
Create a password for Samba entry
The person should exist already on the system; on this instance, I am going to use the default
$ sudo smbpasswd -a pi <enter password as prompted> Added person pi.
Hook up with the share
From one other laptop, entry:
smb://[hostname-or-ip-of-pi]/, and enter the username and password you simply configured.