How to share files between Linux and Windows

Sharing files between Linux and Windows systems is surprisingly easy with some fine accommodations from the Linux community. Let's look at two very different ways to make this happen.

How to share files between Linux and Windows
Anne Worner (CC BY-SA 2.0)

Many people today work on mixed networks, with both Linux and Windows systems playing important roles. Sharing files between the two can be critical at times and is surprisingly easy with the right tools. With fairly little effort, you can copy files from Windows to Linux or Linux to Windows. In this post, we'll look at what is needed to configure your Linux and Windows system to allow you to easily move files from one OS to the other.

Copying files between Linux and Windows

The first step toward moving files between Windows and Linux is to download and install a tool such as PuTTY's pscp. You can get PuTTY from putty.org and set it up on your Windows system easily. PuTTY comes with a terminal emulator (putty) as well as tools like pscp for securely copying files between Linux and Windows systems. When you go to the PuTTY site, you can elect to install all of the tools or pick just the ones you want to use by choosing either the installer or the individual .exe files.

You will also need to have ssh-server set up and running on your Linux system. This allows it to support the client (Windows side) connection requests. If you don't already have an ssh server set up, the following steps should work on Debian systems (Ubuntu, etc.).

sudo apt update
sudo apt install ssh-server
sudo service ssh start

For Red Hat and related Linux systems, use similar commands:

sudo yum install openssh-server
sudo systemctl start sshd

Note that if you are running a firewall such as ufw, you may have to open port 22 to allow the connections.

Using the pscp command, you can then move files from Windows to Linux or vice versa. The syntax is quite straightforward with its "copy from to" commands.

To continue reading this article register now

IT Salary Survey: The results are in