How to Connect linux and windows computers for file transfer and file sharing please tell me a way I have a router how can I use that to connect two machines both running on two different OS.

  • 1
    I voted to close because question is to broad and shows a lack of willingness to do even cursory research. Google SAMBA, FTP, sshfs for a starting point. – davidgo Jan 30 '14 at 8:13
  • well I already did that but I couldn't figure out as I tried on the machines but couldn't connect – user202476 Jan 30 '14 at 8:45
  • As it stands your question is way too broad and is likely to be closed. Stick to a question about one method e.g. samba, how far you got in the setting up process and what problem(s) you have come across. – Tog Jan 31 '14 at 11:06

I to shall assume Ubuntu. Samba will do nicely. You could also use FTP/SFTP depending on file size.


If you give us more specifics as to what you want to do we can give more detailed answers.

  • Do you want to control your files and transfer methods through Windows or Linux?
  • Do you want files accessed through external networks?

These might be good places to start.

EDIT: Based on your above comment you tried something and couldn't get it to work. So lets go through steps for Samba hosted through your Linux machine.

Start off by opening your terminal

sudo apt-get install samba

sudo nano /etc/samba/smb.conf


;Security = user


Security = user

Ctrl X to exit and Y to save the file.

Now set a samba password for your user with:

sudo smbpasswd -a username

Make your samba directory and edit the permissions on it.

sudo mkdir /home/samba
sudo chown -R username:username /home/samba
sudo chmod -R 700 /home/samba

Set your samba folder up:

sudo nano /etc/samba/smb.conf

Scroll down to the list of current setups. Think it's somewhere under the header printers and put something like:

[home share]
comment = Ubuntu File Server Share
path = /home/samba
browsable = yes
guest ok = yes
read only = no
valid users = @username

Ctrl X to exit and Y to save.

Now restart Samba

sudo service samba restart

To get your IP to connect run and note down the IP 192.168.....(whatever it is):


Go onto your Windows machine and Ctrl R to run. Type \ip of linux machine and Enter

Try something like that should give you a nice setup Samba file share on your internal network.


Since you've not told us what flavour of Linux your using I'll make a guess at Ubuntu, in which case start here:


  • I use linux mint – user202476 Jan 31 '14 at 3:12

FTP is a more preferable option to samba, you can either:

  1. install Filezilla on windows or
  2. use Pure-FTP or any other FTP server on Linux.

Then you can simply start using an ftp client. Both Windows and Linux have command line tools pre-installed or you can get an excellent one from FileZilla.


Install BTSync (Bittorrent Sync) on both computers.


It's like dropbox, without the cloud, so it only syncs among your (two or more) computers. You can set which folders to sync. Copy or paste files into those folders, and they will be copied to the other computer, be it Windows, Mac OSX, Linux, Android or iOS.

One small warning: when you move files into a sync folder, then move it out of the synced destination folder, it will be deleted from the source folder. So use copies if you need to keep them on the source computer.

Not the answer you're looking for? Browse other questions tagged or ask your own question.