Samba is an open-source software that enables file and print sharing between Linux/UNIX servers and Windows clients. In this tutorial, we will explain how to install Samba on Fedora Server Latest.
Before we start, we assume you already have:
Before installing any software, it is a good practice to update the system packages to the latest version.
To update the system, run the following command:
sudo dnf update
To install Samba, run the following command:
sudo dnf install samba samba-client
This command installs the Samba server and client, which are needed for sharing files between the server and other computers on a network.
After installing Samba, you need to configure it to share files on your network.
The configuration file for Samba is located at /etc/samba/smb.conf
. You can edit the file using any text editor of your choice.
For example, to edit the file using the nano editor, run the following command:
sudo nano /etc/samba/smb.conf
Here is a sample configuration that enables file sharing for the users
group and allows guest access to the shared directory:
[global]
workgroup = WORKGROUP
security = user
[shared]
comment = Shared Directory
path = /srv/samba/share
read only = No
guest ok = Yes
Save and exit the file by pressing Ctrl + X
, then Y
, and then Enter
.
global
section contains global settings for the Samba server. The workgroup
parameter specifies the workgroup name for the network, and the security
parameter specifies the security mode for the server.shared
section defines the shared directory. The comment
parameter describes the shared directory, and the path
parameter specifies the path to the shared directory. The read only
parameter specifies whether users can write to the shared directory. The guest ok
parameter allows guest access to the shared directory.Next, you need to create a directory that you want to share over the network.
In this example, we will create a directory named share
inside the /srv/samba
directory:
sudo mkdir -p /srv/samba/share
And then set the permissions to allow everyone to read and write to the folder:
sudo chmod -R 0755 /srv/samba/share
sudo chown -R nobody:nobody /srv/samba/share
Finally, you need to start and enable the Samba service so that it starts automatically on system boot.
To start the service, run the following command:
sudo systemctl start smb.service
And then enable it to start automatically on boot:
sudo systemctl enable smb.service
Congratulations! You have successfully installed and configured Samba on Fedora Server Latest. Now, you can easily share files between your server and other computers on a network.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!