How can I configure a shared folder on Ubuntu?

The steps to set up a shared folder in Ubuntu are as follows:

  1. Install the Samba package: Open the terminal, and run the following command to install the Samba package:
  2. Install samba using the command sudo apt-get
  3. To create a shared folder: If you want to share a folder named “shared,” you can create the folder by running the following command in the terminal.
  4. Create a directory named “shared” in the /home/username directory.
  5. Set up Samba shared folders: Open the terminal, run the following command to edit the Samba configuration file:
  6. Please open the file smb.conf in the samba directory using the text editor nano with superuser privileges.
  7. Add the following content at the end of the document:
  8. [shared]
    comment = Shared Folder
    path = /home/username/shared
    browseable = yes
    read only = no
    guest ok = yes
    create mask = 0777
    directory mask = 0777
    force user = username
    force group = username
  9. Please replace “Username” with your username.
  10. Restart the Samba service by executing the following command.
  11. Restart the smbd service using sudo.
  12. Set the access permissions for the shared folder by running the following command.
  13. Change the permissions of the /home/username/shared directory recursively to 777.

Your shared folder has been successfully set up and can now be accessed on other devices.

bannerAds