Samba is the standard Windows interoperability suite of programs for Linux and Unix. It allows you to share files and printers across a network with Windows, macOS, and other Linux machines using the SMB/CIFS protocol.
sudo apt update sudo apt install samba -y
Verify the installation:
whereis samba
sudo mkdir -p /samba/share sudo chmod 777 /samba/share
Edit the Samba configuration file:
sudo nano /etc/samba/smb.conf
Add this section at the bottom of the file:
[Share] path = /samba/share browseable = yes read only = no guest ok = yes create mask = 0777 directory mask = 0777
sudo systemctl restart smbd
Check the status:
sudo systemctl status smbd
Create a Samba password for your user (separate from system password):
sudo smbpasswd -a tom
Enable the user:
sudo smbpasswd -e tom
sudo ufw allow samba
On Windows, open File Explorer and type:
\\\\192.168.1.100\\\\Share
Replace the IP with your server's IP address.
smb://192.168.1.100/Share
Open Finder → Go → Connect to Server, then enter the address above.