Folder sharing in is made possible by the Samba implementation of SMB protocol. SMB or Server Message Block is a protocol mainly used for file sharing between network computers, though they can also be used for printing and IPC (inter-process communication)

To enable folder sharing in Ubuntu, you need to first open the Nautilus file browser. To do this, click on the Places → Home Folder from the menu.

From there, right-click on the folder to be shared and choose the Sharing Options

You’ll come to the Folder Sharing window.

To enable sharing of the folder, click on the 'Share this folder‘s checkbox.

If you’re doing this for the first time, you’ll be prompted to install the necessary services. In this case, it’s the Samba’s server. Click on the Install service to continue

The system will download and install the required packages for you. This might take a few minutes.

Once done, you’ll be notified by the following window. Click the Close button to continue.

GNOME session need to be restarted before sharing can really be enabled. Click on the Restart session to continue. You might need to save all your work before clicking the button though.

Once the session resumes, proceed to the first few steps of enabling the folder sharing. Choose the folder to share in the file browser, and tick on the Share folder checkbox. Here you can choose the name you want the share to be, and optionally you can also set the comment for the share. You might also want to check the Guest access checkbox to enable passwordless access to the share. The share is read-only, unless if you tick on the Allow others to create and delete files in the folder. once done, click on the Create Share button.

Once you go back to the file browser, you’ll notice that the icon of the folder you’ve just shared has changed.