Ubuntu 16.04 comes with Samba, so you can use it directly.
right click on the folder you want to share -> Local Network Share
, all points can be determined, and it can be done.
if the following error occurs:
'net usershare' returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error Permission denied
You do not have permission to create a usershare. Ask your administrator to grant you permissions to create a share
Perform the following steps to resolve:
Add your username to sambashare.
sudo adduser yourname sambashare
Log out, Log in again, and execute Local Network Share
.