How to Share a Folder via SMB/CIFS in Ubuntu 20.04

Refer: https://ubuntuhandbook.org/index.php/2020/07/share-folder-smb-ubuntu-20-04/

Install Samba

sudo apt install samba

Right click the file via our folder browser and choose share options

If you want a remote PC to have access with a uersname and password, run the following command,

Note: The USERNAME must be an existing user on your Linux machine.

sudo smbpasswd -a USERNAME

Before getting access from the remote PC, you may need the IP address of hostname

ip -4 address
hostname

Access the share folder from remote computer

smb://ip-address/
\\ip-address\ or \\hostname\

Sharing Ubuntu VirtualBox Folder with Windows

Refer #1: http://www.howtogeek.com/116309/use-ubuntus-public-folder-to-easily-share-files-between-computers/
Refer #2: https://help.ubuntu.com/community/Samba/SambaServerGuide

To start you need to right-click the folder to share and then install the software

Afterwards you'll need to change the settings to share the files:

sudo nano -w /etc/samba/smb.conf

# By default, the home directories are exported read-only. Change the
# next parameter to 'no' if you want to be able to write to them.
read only = no

# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
create mask = 0775

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
directory mask = 0775