I'm trying to switch from Windows to Ubuntu Desktop.
I want to be able to share folders between other computers on the local network whether they be Windows or Ubuntu.
From help I found the option to share the Public
folder but I still couldn't access the folder from Windows. I also want to share other folders, not just public.
I found some instructions online for other forms of sharing but don't seem to have the "Local Network Share" option that some mention.
What is simplest alternative to Windows sharing?
Samba is the server application that implements client terminal access to folders, printers and disks through the SMB/CIFS protocol.
To install and configure Samba server for Ubuntu, follow these steps.
Update the repository information and install any updates:
Install Samba:
Make a copy of the configuration file:
Create a folder to share between users:
Grant the necessary access rights to the folder:
Create a directory for a given number of users:
Create the user group for samba:
Add the Samba users you need:
Repeat for each user
Add the created users to the group:
Repeat for each user
Change the group that owns the limited users directory:
Create a password for each added user:
Repeat for each user
Edit the previously backed up samba configuration file with nano:
Delete all lines from the file. Insert the following:
Save with Ctrl + X.
global — general Samba server settings
public and private — description of configuration directories.
global has five parameters:
workgroup — workgroup. WORKGROUP is specified as the default group.
ONLINE — The value user means authorization by the username/password pair; map for guests — defines how requests are processed. ;
wins support — • enable or disable WINS support;
proxy dns — ability to send requests to a DNS.
Directory settings
path — full path to the directory on your hard drive;
guest ok — ability to access the folder without a password (guest);
browsable — whether to display the folder on the server
force user — the user who is working with the folder. To increase server security, "nobody" is usually used.
write — yes allows the user to perform actions on files inside the folder
valid users — list of users who have access to the folder. If there are multiple users, their names are separated by commas. If access is required for users belonging to a group, the “at” symbol (@) is placed before the group name.
Welcome to AskUbuntu!
If you do not need anything too complicated, you can set up sharing of directories in Settings. Here's how:
That's all there is to it if you just need basic sharing. If you have needs like passwords, custom views, multiple shares, and the like, then Samba or something similar will need to be installed and configured.
After trying various options I came across this post about installing and configuring Nautilus file sharing on Ubuntu 24.04.
Although it still requires a few Terminal commands it was simple to set up and enabled the
Sharing Options
right-click menu option.However these instructions did not work at first and I found an answer here.
So the instructions I followed were:
sudo apt update
sudo apt install nautilus-share
(Press y when asked to confirm installation)sudo usermod -aG sambashare $(whoami)
Reboot the PC.
sudo smbpasswd -a $(whoami)
(create a new password for the share)You should now have
Sharing Options
available when right-clicking on a folder where you can control sharing and who has access.I then followed the advice in the second link above. Open a File window find your way to the folder
/etc/samba/
(you can start by going toOther Locations
) and open the filesmb.conf
in the text editor just by double-clicking.Find the line
workgroup = WORKGROUP
and add a few line below it:force user = John
(replace John with your username) Then save and exit.Then restart Samba with:
sudo service smbd restart
You can now access the share from a Windows PC with the IP address (eg.
\\192.168.0.99
) or PC name (eg.\\LinuxPc
).