Folder sharing allows people to access your files and folders from other machines in a local area network. Appropriate permissions can be set to the shared folder so that it can't be viewed or edited by an unauthorized person. Shared folders in Ubuntu can be accessed by people using Windows, macOS, or any other Linux distributions.

Folder sharing in Ubuntu or Linux is made possible by the Samba package. Samba implements SMB/CIFS protocol required to set up folder sharing that is compatible with the implementation of the same protocol in other operating systems.

You can create a shared folder in Linux by manually installing and configuring Samba. Ubuntu makes it easier by allowing you to share folders directly from the Files file manager application.

Steps to share folders via Samba or SMB on Ubuntu Desktop:

  1. Open Files.
  2. Right-click on the folder you want to share and click on Local Network Share.
  3. Click on the Share this folder checkbox in the folder sharing window.
  4. Click on Install service button on the Sharing service is not installed alert window if you never installed the required service before.

    This will install Samba and other related packages.

  5. Click on the Install button on the Install additional software? window.

    Click on the Description to view more details about the packages to be installed

  6. Enter your password and click on the Authenticate button on the Authentication Required window.

    Your account must have administrator privilege to be able to proceed.

  7. Wait for the installation to finish.
  8. Select other options if necessary and click on Create Share.
  9. Shared folder will now have a sharing icon.
  10. Allow network ports for Samba at the terminal.
    $ sudo ufw allow samba
    [sudo] password for user: 
    Rules updated
    Rules updated (v6)

    This is only required if you've enabled firewall. It is disabled by default.

  11. Test network folder access from a remote machine.
Discuss the article:

Comment anonymously. Login not required.