How to enable SAMBA on Raspberry Pi 4 8GB
Enabling SAMBA on your raspberry pi gives you an instant directory you can use to map in a windows computer. We will be mapping the pi user directory. If you have changed to a different user you should simply change the username that is used below.
First we update and upgrade our Raspberry Pi
sudo apt update && sudo apt upgrade -y
When the update completes we need to install the samba packages
sudo apt-get install samba samba-common-bin
Once samba is installed we are going to edit our smb.conf file to the absolute basics
sudo nano /etc/samba/smb.conf
We need to delete everything in this file and replace it. You could just press delete but pressing CTRL+K is much quicker. Replace theentire text (there is a lot) and replace it with the below
[global]
netbios name = Pi
server string = The Pi File Center
workgroup = WORKGROUP
[HOMEPI]
path = /home/pi
comment = No comment
writeable=Yes
create mask=0777
directory mask=0777
public=no
We need to change the default SAMBA password for the user pi
sudo smbpasswd -a pi
Add the password and then we can restart SAMBA
sudo service smbd restart
Now we can simply navigate in our windows address bar to our pi's IP address. my pi's IP address is 192.168.0.99 so in the address bar i would type
\\192.168.0.99
This should present you with your Raspberry Pi default user pi files.
Member discussion