Switch and Share Recordsdata Between Home windows and Linux

Copying data from a Windows PC to Linux – or the other way – can be intimidating at first. After all, it seems like it should be easy, but it turns out to be difficult.

The truth is, sharing files from Windows to Linux is easy, but only if you know how to do it. Ready to find out? Here's everything you need to know about transferring files from Windows to Linux and back again.

4 ways to transfer files from Windows to Linux

Transferring data between Windows and Linux operating systems is easier than you think. We have put together five options for you:

  1. Transfer files using FTP

  2. Copy files securely over SSH

  3. Share data with the synchronization software

  4. Use shared folders in your Linux virtual machine

Either of these methods allows you to easily (and in some cases, effortlessly) move files between operating systems.

Let's take a look at them one by one and find out which one suits you best.

1. Copy files from Windows to Linux via SSH

With SSH enabled on your Linux device, you can use the command line to send data from one computer to another. However, for this to work you need to set up an SSH server on your Linux computer.

First, open a terminal and update and update the operating system.

sudo apt update
Sudo Apt Upgrade

When done, install the SSH server. The OpenSSH server is a good option.

sudo apt install openssh-server

Wait while it installs. Use to check at any time that the OpenSSH server is running

sudo service ssh status

Use an SSH client such as PuTTY to transfer data from Windows. To do this, the PSCP (Secure Copy Client) tool must be downloaded to your Windows system so that it can run alongside PuTTY. You can find both on the PuTTY homepage.

Related: Windows 10 SSH vs. PuTTY

Note that while PuTTY needs to be installed, PSCP does not. Instead, save the downloaded pscp.exe file in the root directory of the C: drive or set it up as an environment variable. You will also need to confirm the IP address of the Linux device. Check in with the Linux terminal

ip addr

When connected, you can send data from Windows to Linux as follows:

c: pscp c:
ome path to a file.txt user @ remoteIP: home user
ome path

You will be prompted for your Linux computer password before the transfer begins.

Do you want to copy data from Linux to Windows in the same SSH session? This command downloads the specified file to the current directory:

c: pscp user @ remoteIP: home user
ome file.txt.

Notice the lonely period at the end — include this, otherwise the transfer will not work.

2. Transferring files from Linux to Windows via FTP

A File Transfer Protocol (FTP) application that supports SSH can also be used. Transferring files via SFTP in a mouse-controlled user interface is arguably easier than entering commands.

Again, an SSH server must be running on the Linux computer before starting. You should also make sure that you have installed an FTP app such as FileZilla on Windows that has SFTP support.

To use this method, run FileZilla, then do the following:

  1. to open File> Site Manager

  2. A … create New page

  3. Set the protocol to SFTP

  4. Add the destination IP address host

  5. Enter a username and password

  6. Set the login type to normal

  7. click Connect when ready

You can then use the FTP app to drag and drop files from Windows to Linux and back.

3. Share files between Linux and Windows with Resilio Sync

Another option to consider is a file sync program. These are usually cross-platform and use an encrypted key to manage the connection between devices.

All you have to do is install the app, set a sync folder, and then create the key. Set this up on the second PC and your data will then be synchronized. There are two good options for doing this:

  1. Resilio Sync: Formerly known as BitTorrent Sync, Resilio is available on almost every platform imaginable. There is a paid version, but the free option is enough to sync two devices

  2. SyncThing: For Linux, Windows, MacOS and Android, this Resilio Sync alternative offers a similar function without the paid component

Our guide on using Resilio Sync (as well as SyncThing) walks you through setting up network file transfers between Linux and Windows computers.

4. Create and mount a shared VirtualBox folder on Linux

Instead of running a separate PC, Linux or Windows are often run in a virtual machine (VM). But is there any way to transfer files between Windows and Linux if one is installed on a VM?

Fortunately yes. With VirtualBox you can create a virtual shared directory for data synchronization.

If you're running Windows in a VM on Linux (or vice versa), VirtualBox is already set up for sharing. Make sure you have installed Guest Additions on your virtual machine before proceeding.

In the VirtualBox Manager, select the VM and then do the following:

  1. Choose Start> Headless Start (or if the VM is running, Devices> Shared Folders)

  2. After running, right click on the VM and select Settings> Shared Folders

  3. Choose Machine folder

  4. Press the + Icon on the right (or right-click and select Add a shared folder)

  5. Search the Folder path and find the directory you want to use

  6. Then set a name (if necessary) OK

  7. Use the Automatic assembly Check boxes to ensure the share is available when the VM is running

  8. click OK confirm again and exit

When you restart the VM, the share is ready to exchange data between the host PC and the guest operating system.

What about file sharing in the GUI?

There is another option for sharing files between Windows and Linux PCs. However, creating a shared file on one or both systems and then accessing it over a network is unreliable at best.

Sharing files between Windows and Linux is easy

Whether you are new to Linux or new to Windows, exchanging data between them is easier than you think.

We looked at different methods. We encourage you to try all of them and find out which one you are most comfortable with.

If you're syncing data with Linux, there's a good chance you're migrating your computer from Windows. For more tips, see our guide on Switching from Windows to Linux.

The 7 best wireless file transfer apps on Linux

Do you need to transfer your files over Wi-Fi on Linux? Here are several different methods you can use.

Continue reading

About the author

Christian Cawley
(1466 articles published)

Deputy Editor for Security, Linux, DIY, Programming and Technology explains. He also produces The Really Useful Podcast and has extensive desktop and software support experience.

Christian is a contributor to Linux Format Magazine. He's a Raspberry Pi hobbyist, Lego lover, and retro gaming fan.

By Christian Cawley

Subscribe to our newsletter

Sign up for our newsletter to receive tech tips, reviews, free e-books, and exclusive offers!

One more step …!

Please confirm your email address in the email we just sent you.

Leave a Reply

Your email address will not be published. Required fields are marked *