Sharing a Linux folder for windows access won’t be a hard task to do anymore with this tutorial,
First of all, let’s start by installing SAMBA, this software provides access to SMB/CIFS protocols used by Windows.
sudo apt-get install samba
Once the SAMBA installation has completed we should configure a user and provide it a password that will be used in order to access the share.
sudo useradd jorluis-perales // Our user is already created, this is in case you forgot how to create it. sudo smbpasswd -a jorluis-perales
Awesome, now that we have installed SAMBA and configured the user that is going to have access to the folder it is time to create the folder itself, it going to be called Share and will be under ~/Desktop/
It is time to use your favorite editor in order to modify the smb.conf file and provide the Windows access to the newly created folder, the file can be found under /etc/samba/samba.cnf
sudo vi /etc/samba/smb.conf
Go to the end of the file (if using VI/VIM, by pressing Shift+g it will take you to the last line), make sure to have the correct values configured:
[Share] // Folder's name path = /home/jorluis-perales/Desktop/Share available = yes valid users = jorluis-perales read only = no browsable = yes public = yes writable = yes
Mine’s looks like this:
Do not forget to save the configuration. In VI/VIM a simple :x will do the job.
Restart the smbd service in order for the changes to take effect.
sudo service smbd restart
Back on our Windows machine, we can map the shared folder by creating a shortcut and pointing it to the network location of the share.
The syntax is:
Give it a beautiful name click on Finish.
There you go, you Linux’s shared folder is now accessible from your windows machine,
The first time you open the folder it will ask for credentials, use the one that you set for the shared access, jorluis-perales/password
Easy and simple, hope you find this helpful,