7

How to install Samba share and transfer files between Windows and Linux

 2 years ago
source link: https://www.laravelcode.com/post/how-to-install-samba-share-and-transfer-files-between-windows-and-linux
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

How to install Samba share and transfer files between Windows and Linux

  223 views

  6 months ago

Linux

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.

Installing Samba

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

Setting up Samba

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.

[sambashare]
    comment = Samba on Ubuntu
    path = /home/username/samba
    read only = no
    browsable = yes

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

Connecting to Samba

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.

smb://192.168.1.104/samba

On Windows system, open File Manager and edit the file path.

smb://192.168.1.104/samba

For MacOS system, in the Finder menu, click Go > Connect to Server then enter the below address:

smb://192.168.1.104/samba

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:

smb://192.168.1.104/

This way you can access the files and folders shared by Samba.

Author : Harsukh Makwana
Harsukh Makwana

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]


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK