Samba is powerful and open-source tool file server that allows file sharing across different operating systems over a network. You can access files your desktop to Windows and MacOS computers.
This article covers how to set up a Samba file server and share files across a local network.
To install Samba, first run the below command in Terminal:
sudo apt-get update
sudo apt-get install samba
You can check if the installation was successful by running the following command:
samba --version
Now we are going to setup Samba to share a folder. Here I will use ~/samba
directory for sharing.
The configuration file for Samba is located at /etc/samba/smb.conf
. To add a new directory for sharing, edit the configuration file by running following command:
sudo nano /etc/samba/smb.conf
This will open the file in Nano editor. Now add the below lines at the end of file.
Then save and exit the nano editor by pressing shortcut key CTRL+O
and CTRL+X
.
Now restart the Samba service by the following command.
sudo service smbd restart
Update the firewall rule to allow Samba traffic.
sudo ufw allow samba
And setup the Samba password to user account.
sudo smbpasswd -a username
Now from the other, where you want to access the samba folder, open the file manager and Click on Connect to Server. In the server address enter the following lines with computers IP address.
On Windows system, open File Manager and edit the file path.
For MacOS system, in the Finder menu, click Go > Connect
to Server then enter the below address:
This way you can access the folder of the computer. If you want to see all files and folders shared by the computer, just input the IP address:
This way you can access the files and folders shared by Samba.
Hi, My name is Harsukh Makwana. i have been work with many programming language like php, python, javascript, node, react, anguler, etc.. since last 5 year. if you have any issue or want me hire then contact me on [email protected]
Use PHP Code into Laravel Blade
in this article, I will share with you h...How to prepend a string in PHP
Use the PHP Concatenation Operator Th...Laravel5.4 - Prevent Browser's Back Button Login After Logout
In this tutorials we are sharing with yo...let vs var in JavaScript
If you have worked in Javascript, you ha...Angular 8|9 File Upload with Progress Bar Tutorial
Today we are going to learn how to uploa...