How can I configure a shared folder on Ubuntu?
The steps to set up a shared folder in Ubuntu are as follows:
- Install the Samba package: Open the terminal, and run the following command to install the Samba package:
- Install samba using the command sudo apt-get
- 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.
- Create a directory named “shared” in the /home/username directory.
- Set up Samba shared folders: Open the terminal, run the following command to edit the Samba configuration file:
- Please open the file smb.conf in the samba directory using the text editor nano with superuser privileges.
- Add the following content at the end of the document:
- [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 - Please replace “Username” with your username.
- Restart the Samba service by executing the following command.
- Restart the smbd service using sudo.
- Set the access permissions for the shared folder by running the following command.
- 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.