How to Share File in Linux

In this tutorial, we will guide you on how to share a file in Linux.
Files can’t be shared independently; rather we have to create folders that can be shared on a network. So over here, we will first create a folder and then place the files that we want to share, in it.
To learn how the process of file sharing on Linux follow the steps given below.



Step 1 – Search for the Samba tool
For this tutorial, we will be using the Samba tool, as it provides networking services in Linux environments such as file and printer sharing. For that, click on the Dash, write Samba in the Search Bar and click on the samba icon that will appear below the search bar
Go to the Samba tool

Step 2 – Select the Plus icon
With that done, the Samba Server configuration window will open up. Over here, click on the Plus Icon located on the top.
Click on the Plus icon

Step 3 – Search for the folder
Now, the “Create Samba share” window will open up in which you have to specify the folder for sharing. Here, let’s click on the Browse Button, click On the File System, and then go to the var folder.
Select the folder

Step 4 – Select the Create Folder button
With that done, move to the library folder and open up the samba folder. When the samba folder window opens up, click on the Create Folder button which is located on the top right corner of the window.
Now type the name of the folder which you want to use and then click on Ok.
Press the Create Folder button

Step 5 – Set the properties of the folder
Now Choose the Visible option to make your folder visible on the network and choose the Writeable option as well if you want users to access and change your files across the network.
Adjust the properties of the folder

Step 6 – Set accessibility
With that done, move over to the Access tab and over here, you can specify the access rights of users.
Here we will choose the “Allow access to everyone” option and click on OK.
Go to the Access tab

Step 7 – Place the files in the folder
Now navigate to the shared folder location again, and over here place your files which you want to share. Now, you process of file sharing on Linux is complete, you can view your shared files and folder through the steps given below.
Sent the file to the folder

Step 8 – Type command in search bar
In the search bar, let’s type smb://192.168.190.130 and hit enter.
Enter command in search bar

Step 9 – View shared files
With that done, our files will be displayed on that window which means that we have successfully shared the files across a network.
From the above steps you can learn how to share a file in Linux.
Look at the shared files