Did you work on multiple computers, did you ever found it tough to transfer data between the different computers. This article will answer the above statements. Here, we are going to share data between different computers using the Samba Server and setup the Raspberry Pi file server.
Install the latest Raspbian on the SD card. Here, we have a full tutorial on how to install OS on Raspberry Pi. Follow the tutorial and install the Operating System on it. If you already have OS installed, then proceed to the next step.
Power up the Raspberry Pi and open the terminal window. Make sure that everything is updated. To do that, type the following command one by one.
sudo apt-get update
sudo apt-get upgrade
Installing and Configuring Samba Server
Raspberry Pi is now up to date. The next step is to install the Samba Server on Raspberry Pi. These steps are the same for all the models of Raspberry Pi.
sudo apt-get install samba samba-common-bin
Once, Samba is successfully installed to your Raspberry Pi, the next step is to make a network storage folder. This folder can be located anywhere, including networked storage devices or external hard drive. In my case, I am creating the directory within the “Pi” users home directory and naming it Shared.
We can share this folder using Samba Server software. We just need to modify the “smb.conf” file. To do this, run the following command-
Run the following command and set up the username and password for the Samba Server.
sudo smbmypasswd -a pi
Everything is ready, now restart the samba server once. To do this, again type the following command in the terminal.
sudo systemctl restart smbd
To access another computer, you need a Pi local IP address. To get it, type the following command-
Open “ My computer” and “Map network driver“.
In the second window, on the “folder” option, enter “\\raspberrypi\shared“. Replace shared with your folder name. Then click on the finish button.
Finally, it will ask for the login details i.e. the username and password. Enter the Samba Server username and password and you are done. In my case username is “pi” and the password is “smbmypassword“.