How to transfer files between Ubuntu and Windows?

Solution 1:

Share Folders in Ubuntu 11.10

Objectives: Share a folder in Ubuntu and access it from Windows

To get started, right-click on the folder you wish to share and select ‘Sharing Options’

screenshot

When prompted to install Samba services, do it.

screenshot

After installing Samba services, click ‘Restart session’

screenshot

Then click ‘Create Share’ to complete the process.

screenshot

Open Terminal Replace USERNAME with your account name.

sudo smbpasswd -a USERNAME

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.old
sudo nano /etc/samba/smb.conf

scroll to the global section, and add the lines

encrypt passwords = true 
wins support = yes

press ctrl+o and ctrl+x to save, and exit nano

sudo service smbd restart

On the Windows machine, go to Start –> All Programs –> Accessories –> run and type the command:

\\computer_name\share_name

computer name can be ip address of ubuntu machine , to check ip of ubuntu machine , go to ubuntu machine & open terminal & type ifconfig

screenshot

Type the Ubuntu computer name and the share name of the resource.

You will get a prompted to enter your credentials. Type your Ubuntu username and password and click ‘OK’

screenshot

Now try again to access the shares from your Windows machine

screenshot

Transfer files From Ubuntu To Windows

On Ubuntu Machine install openssh-server

sudo apt-get install openssh-server

after installing go to windows machine & download / install FileZilla & open it

screenshot

  • Host = Ubuntu Machine Ip address
  • Username = Your Ubuntu Machine Username
  • Password = You Username Password
  • Port = 22

Done Now you can easily transfer files from Windows to Ubuntu OR Ubuntu to windows

Solution 2:

HTTP server

HTTP is the protocol used to access regular websites, so every OS was forced to implement it!

Find your IP on the source computer, e.g. 192.168.0.10. On Ubuntu:

ip addr

Create a server in a directory that contains the file you want to transfer, Python 3:

python3 -m http.server 8080

or Python 2:

python -m SimpleHTTPServer 8080

On the receiving computer, open a browser, and visit:

192.168.0.10:8080

Now you can navigate through directories to the file you want.

I'm not sure if this method is fast / robust, but it is one of the simplest to setup and portable.

Faster alternatives are discussed here.

rsync

Just setup an SSH server on Windows, and then you can use rsync on Ubuntu to copy files in either direction. Full CLI goodness.

It might be possible to run rsync on Windows as well.

I have described the Ubuntu to Ubuntu rsync usage in more detail at: How to share files through the local network?

Solution 3:

There is a free file manager with GUI WinSCP. You can copy files in one click.

enter image description here

After creating connection you have one panel with your local computer and a panel with a remote computer.