How to Share A Folder via SMB/CIFS Protocol in Ubuntu 20.04

This is a step by step beginner guide shows how to share a folder over local network via SMB/CIFS protocol in Ubuntu 20.04 Gnome desktop.

Share a folder in Ubuntu 20.04:

1.) First open terminal by pressing Ctrl+Alt+T on keyboard.When it opens, install samba, SMB/CIFS file, print, and login server by running command:

sudo apt install samba

Type user password (no asterisk feedback) and hit Enter to continue.

How to Share A Folder via SMB/CIFS Protocol in Ubuntu 20.04

2.) Open Files (Nautilus file browser) and right-click on the folder you want to share, then click on “Local Network Share” menu option.

How to Share A Folder via SMB/CIFS Protocol in Ubuntu 20.04

3.) In next pop-up window, do:

  • tick “Share this folder” to enable network sharing.
  • (optional) tick “Allow others to create and delete files in this folder”
  • (optional) tick “Guess access”
  • finally click on ‘Create Share’ button

How to Share A Folder via SMB/CIFS Protocol in Ubuntu 20.04

4.) Confirm write permission (if enabled) and done!

How to Share A Folder via SMB/CIFS Protocol in Ubuntu 20.04

5.) If you want remote PC to type username and password to access the shared folder, open terminal (Ctrl+Alt+T) and run command:

sudo smbpasswd -a USERNAME

Note:The “USERNAME” must be an existing user in your Ubuntu. It’s ji in my case.And set a password for remote smb access only.

How to Share A Folder via SMB/CIFS Protocol in Ubuntu 20.04

Before getting access from remote PC, you may check out the IP address and / or hostname by running commands:

hostname

ip -4 address

How to Share A Folder via SMB/CIFS Protocol in Ubuntu 20.04

Access the share folder from remote computer:

1. To access from Windows PC, go to Start -> Run to bring up Run command window.Type either \ip-address or \hostname

How to Share A Folder via SMB/CIFS Protocol in Ubuntu 20.04

2. To access from another Ubuntu desktop, go to Files -> Other Locations, then type either smb://ip-address/SHARE_FOLDER or smb://hostname/SHARE_FOLDER

How to Share A Folder via SMB/CIFS Protocol in Ubuntu 20.04

It’s a sequel.

It’s a sequel.
It’s a sequel.

Sidebar