← Back to all guides
System Administration·Mar 7, 2021

How to Transfer Files between Windows and Linux

You can transfer files from Windows to Linux using SCP, and vice versa. From Windows to Linux An SSH client is already enabled by default in the latest version of Windows 10, so there is no need to install any software on Windows. However, make sure SSH server is up and running on Linux. Open

You can transfer files from Windows to Linux using SCP, and vice versa.

From Windows to Linux

An SSH client is already enabled by default in the latest version of Windows 10, so there is no need to install any software on Windows. However, make sure SSH server is up and running on Linux.

Illustration for How to Transfer Files between Windows and Linux
SSH server may not be installed by default. Check that SSH server service is running on Linux

Open a command prompt (cmd.exe) and enter the following command:

scp [filepath] [user]@[IP addr]:[filepath]

Example: scp C:/Users/username/Desktop/ubuntu.iso [email protected]:/home/ubuntu/Desktop/

To transfer all files in a folder:

scp [filepath]/* [user]@[IP addr]:[filepath]

Example: scp C:/Users/username/Desktop/* [email protected]:/home/ubuntu/Desktop/

From Linux to Windows

Likewise, to transfer files from Linux to Windows, you may need to install SSH server on Windows because it is not installed by default.

Illustration for How to Transfer Files between Windows and Linux
Manage optional features on Windows -> Add a feature -> OpenSSH Server
Illustration for How to Transfer Files between Windows and Linux
Make sure that SSH server service is up and running on services.msc
Illustration for How to Transfer Files between Windows and Linux
Check that Windows Firewall is not blocking inbound SSH connection.

Using the same command, we can transfer files from Linux to Windows:

scp [filepath] [user]@[IP addr]:[filepath]

Example: scp /home/ubuntu/Desktop/textfile.txt [email protected]:C:/Users/username/Desktop/

To transfer all files in a folder:

scp [filepath]/* [user]@[IP addr]:[filepath]

Example: scp /home/ubuntu/Desktop/* [email protected]:C:/Users/username/Desktop/

There you go, transferring files between Windows and Linux using SCP is a piece of cake. Simply make sure that

#1) SSH server is up and running.

#2) Firewall is not blocking the SSH inbound request

Comments

0 comments

Ask a question or share a practical note. Comments appear immediately after passing the spam check.

Loading comments…

Be constructive and specific.