Sharing a Linux Folder with Windows

A simple guide using Samba with Void Linux

1. Install Samba

sudo xbps-install -S samba

2. Create a Shared Folder

mkdir -p ~/SharedFolder 
chmod 777 ~/SharedFolder

3. Configure Samba

Edit sudo nano /etc/samba/smb.conf and add:

[SharedFolder]
   path = /home/yourUser/SharedFolder
   browseable = yes
   read only = no
   guest ok = yes
   force user = yourUser

4. Add a Samba User

sudo smbpasswd -a yourUser

5. Enable the Samba Service

sudo ln -s /etc/sv/smbd /var/service/
sudo ln -s /etc/sv/nmbd /var/service/

Reboot the system sudo reboot

Tip: After rebooting, get the IP address of your Void Linux box by running ip a. It should look something like 192.168.1.50. This is just an example — use your actual IP address when connecting from Windows.

6. Connect from Windows

Press Win+R and type:

\\<linux-ip-address>\SharedFolder

Log in with your Samba username and password.

7. Save the Folder in Windows

Option A: Map as a Network Drive

  1. Open File Explorer → Right-click This PCMap network drive
  2. Choose a letter (e.g. Z:)
  3. Enter \\<linux-ip>\SharedFolder
  4. Check Reconnect at sign-in

Option B: Create a Shortcut

  1. Right-click Desktop → New → Shortcut
  2. Enter \\<linux-ip>\SharedFolder
  3. Name it Linux Share

Option C: Backup/Sync

Copy with Robocopy:

robocopy \\<linux-ip>\SharedFolder C:\LocalCopy /MIR
Tip: Replace <linux-ip> with your actual Linux machine IP, e.g. 192.168.1.50.