Share files between Windows and Ubuntu

For sharing files, you need a network. Now what if in you have a network with computers using both, Linux and Windows. Windows has a different Network stack and Linux has a different network stack. So there is no way this could be done by just plugging in the network cable and assigning IP Addresses. So what to do in a mixed OS environment? How to network Linux and Windows computers. For this we must make the windows computer to get to communicate with the linux computer. Linux has a utility for sharing the linux computer with windows known as Samba. This utility helps the linux computer communicate with windows computer the way windows computer communicate with other windows computer. Windows uses SMB as a network protocol which stands for Server Message Block. SMB is not Open Source. Hence linux developers have developed Samba as an alternative to SMB. Now that we are clear about some basic, lets do this. First make sure your both windows and linux computers are in a same network range. We need to install Samba on the linux computer, in this case I have used Ubuntu as my linux distribution. Open terminal from Applications menu > Accessories > Terminal. Now type :

sudo apt-get install samba smbfs smbclient

Now provide your root user’s password so that aptitude can install samba. Now if you get a message saying you already have samba, just ignore it and continue with the following steps.

We need to edit the samba configuration settings so that we could use the windows shares according to our needs. Open terminal and type :

sudo gedit /etc/samba/smb.conf

Now find the code where the workgroup is mention. It will be “workgroup = WORKGROUP”. The default workgroup is workgroup. You must change this to the name of your workgroup. I will select TECHARENA, so the section will now look like : workgroup = TECHARENA. Second thing to change in the file is “browseable”. If it is not “yes” change it to yes so it must look like “browseable = yes”. The third thing is to change is option. The field is “read only”. If the windows computer has given a read only share then you cannot change the read only to no from this file. If you have the write permission you can change the “read only” field to “no”. It will now look like : “read only = no”. Now save changes and close the file. Again open terminal and type :

sudo /etc/init.d/samba force-reload
Now you need to create a username for samba shares, this will differ from linux user. Open terminal and type :
sudo smbpasswd-a <username>
Give the username and password which is given to the windows computer for less confusion. Make sure you have a password on Windows computer or you will not be able to access the shares. Now you need to install support for NTFS file system on Ubuntu. Open terminal and type :
sudo apt-get install ntfs-config
This will install better support for NTFS file system on Ubuntu. Now everything is installed and configure. Lets open a windows share. Go to Places menu > Network. Here you should see the workgroups that exists on your network. If you don’t see your workgroup, you can access it manually. In the address field type :
Or you can type the computer name instead of the IP Address. So it will look like this :
That’s it. You’re done!


Please enter your comment!
Please enter your name here