Sharing folders in Ubuntu is essential for managing file access across different devices within a network. This is particularly useful in environments where multiple users need to collaborate by accessing and modifying files on a central system. By setting up shared folders, you can control access and ensure that files are securely available to authorized users.
The most common way to configure shared folders on Ubuntu is by using Samba. Samba implements the SMB/CIFS protocol, allowing Ubuntu to share files with Windows and other systems. This is crucial in mixed operating system environments, where interoperability is required for efficient network management.
You can set up shared folders on Ubuntu either through the command line or a graphical interface. The command line provides detailed control, while the graphical interface offers a user-friendly approach. Both methods achieve the same goal, making shared resources accessible across the network according to your security and access requirements.
Steps to share folders via Samba or SMB on Ubuntu Desktop:
- Open the Files application on Ubuntu Desktop.
- Right-click the folder you want to share and select Local Network Share.
- Check the Share this folder option in the sharing settings.
- If prompted, install the required sharing services, such as Samba.
This will install Samba and other related packages.
- 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
- 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.
- Wait for the installation to finish.
- Select other options if necessary and click on Create Share.
- Shared folder will now have a sharing icon.
- If your firewall is enabled, open the necessary ports for Samba.
$ 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.
- Test the shared folder access from another machine on the network.
This guide is tested on Ubuntu:
Version | Code Name |
---|---|
22.04 LTS | Jammy Jellyfish |
23.10 | Mantic Minotaur |
24.04 LTS | Noble Numbat |
Mohd Shakir Zakaria is an experienced cloud architect with a strong development and open-source advocacy background. He boasts multiple certifications in AWS, Red Hat, VMware, ITIL, and Linux, underscoring his expertise in cloud architecture and system administration.
Comment anonymously. Login not required.