Share ubuntu-server 16.04 folder to windows host

I have installed the ubuntu-server 16.04 and VBoxLinuxadditions and Samba

I am trying to share a folder from this server to my windows host machine. Now I can see this virtual server on my network but there are no shared folders on the server.

enter image description here

How do I make one through the command line?


So i have figured this on my own and this is the easiest solution:

just install samba with

sudo apt install samba

and go to this file:

/etc/samba/smb.conf

and just at the bottom add these lines:

[share]

comment = Ubuntu File Server Share
path = /path/to/the/folder  #for example /home/user_name/public <- this comment needs to be deleted!
browsable = yes
guest ok = yes
read only = no
create mask = 0755

restart the samba service

sudo service smbd restart
sudo service nmbd restart

and that's it, easy peasy :)



All you have to do to share folders with SMB is
depending on the file manager you use, make sure nautilus-share or caja-share or ?-share is installed to enable next step
right-click on the folder and select the [Properties ->] Share tab that the file manager should provide
if that step doesn't propose to do it, install samba manually
choose the right sharing options and click Share
see https://help.ubuntu.com/community/Samba/SambaServerGuide#Ubuntu_Server