Share files across your network with this easy-to-follow guide
Samba is an open-source implementation of the SMB/CIFS networking protocol, allowing file and printer sharing between Linux and Windows systems. This comprehensive guide will walk you through installing and configuring Samba on Ubuntu-based distributions.
sudo apt update
Updates the package list from all configured repositories to get the latest version information.
sudo apt install samba
Installs the Samba package along with its dependencies from Ubuntu's repositories.
mkdir /home/tom/examplefolder
Creates a directory that will be shared with other network users.
sudo nano /etc/samba/smb.conf
[Example Folder]
comment = Tom's example folder
path = /home/tom/examplefolder
read only = no
browsable = yes
Add this configuration block at the end of the file to define your shared folder settings.
sudo service smbd restart
Applies your configuration changes by restarting the Samba service.
sudo ufw allow samba
If you're using UFW firewall, this command allows Samba traffic through.
sudo smbpasswd -a tom
Sets a Samba-specific password for the user account. You'll be prompted to enter and confirm the password.
You've successfully installed and configured Samba! Your shared folder should now be accessible from other devices on the network.