Setting up a file share in Samba is very easy. I am using Ubuntu 17.10.
Firstly, install Ubuntu, then install the Samba server.
jason@kaio:~$ sudo apt install samba |
Then create a folder to share from. I made one in the root directory named Share then I added the entries below to my /etc/samba/smb.conf file at the bottom.
[share] comment = File Share path = /Shares browsable = yes guest ok = yes read only = no create mask = 0755 |
Then this command was run to restart the Samba server. Then my share was available in Windows Explorer and I was able to view files shared from a Linux machine.
On a Windows 8.1 PC, I can see that there is a Samba share available on the server.
PS C:\Users\jason> net view \\KAIO Shared resources at \\KAIO kaio server (Samba, Ubuntu) Share name Type Used as Comment ------------------------------------------------------------------------------- share Disk File Share The command completed successfully. |
Or to get just the share name with Powershell.
PS C:\Users\jason> (net view \\KAIO) | % { if($_.IndexOf(' Disk ') -gt 0){ $_.Split(' ')[0] } } share |
This is very simple, a good way to share files from a Linux PC to a Windows network. This is why Linux is so good for running a network, and it can work alongside Windows machines.