Skip to content

Instantly share code, notes, and snippets.

@pavel-vasiluk
Last active April 19, 2019 19:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pavel-vasiluk/882d6c20df7d55e475f3a92967b07853 to your computer and use it in GitHub Desktop.
Save pavel-vasiluk/882d6c20df7d55e475f3a92967b07853 to your computer and use it in GitHub Desktop.
Samba: how to share Linux folder with your Windows machine

How to share Linux folder with Windows

# Install samba on your Linux machine
sudo apt-get update
sudo apt-get install samba

# Edit samba config file
sudo nano /etc/samba/smb.conf

# Add your desired samba user name under global section (user will be created later)
[global]
force user = your_user_name

# Add a new section with your shared folder name. Your path to folder may be different
[shared_folder_name]
path = /var/www/shared_folder_name
available = yes
valid users = your_user_name
read only = no
browsable = yes
public = yes
writable = yes

# Сreate the user himself
sudo smbpasswd -a your_user_name

# Disable ufw
sudo ufw disable

# Restart samba service
sudo service smbd restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment