blog posts

How to transfer files From Windows to Linux Server with CMD

How to transfer files From Windows to Linux Server with CMD

Are you looking to know how to transfer files from Windows to a Linux server? This article will help you transfer your files to the Linux server with a few simple steps that you will see below.

You have a Linux server connected, which means you are working and testing it. Now you want to transfer files from Windows to a Linux server. But it is not as simple as you think. It’s well established that working with servers, especially servers with a command line interface, can be somewhat difficult.

This article will help you upload local files from a Windows-based computer to a Linux VPS server.

To understand the concept more simply, the Windows computer you are transferring files from is called the source, and the Linux server you are transferring files to is called the destination. For the tutorial, we have created a file on the desktop called “test.txt.”

Follow these simple steps to upload files from a Windows computer to a Linux server:

1: Open “Run” by simultaneously pressing the Windows key + R on your keyboard or by typing run in the search bar.

2: In the window that opens, type cmd and press Enter.

3: Enter the file directory by typing cd and then the file path. (In this case, the file is on the desktop, so we write cd desktop).

4: Use the “SCP” command in the same format as shown below to upload the file.

Filename. extension: file name and its extension (test.txt
username: username used to connect to the VPS (we use root)
Server address: VPS IP address
file path: the path where you want the file to be copied (for example, /etc/ssh)

5: If this is the first time you connect to the server, Windows will ask you to accept the security warning.

6: Next, you need to enter the destination server password.

After entering the correct password, your file will be uploaded.

To ensure the transfer of that file, open putty and connect to the destination server. Use nano or vi editors to open the file.

The image below shows that the file has been uploaded and is available on the server.

You can also use WinSCP software to achieve the same goal instead of following the abovementioned topics.

Conclusion

Unfortunately, there is no easy way to upload/transfer files to a Linux server other than the WCP drag-and-drop software we suggested above. To do this and manage the virtual private server, you must learn how to use the command line interface. However, once you know how to do it, it’s no more difficult than using a PC for your normal day-to-day tasks. We hope that with this article’s help, you could learn how to transfer files from a Windows system to a Linux server using Linux commands. If you have any questions or suggestions, please post them in the comments section.