Move windows file to linux

How to transfer a file from windows to linux Server? [A Definitive Guide]

Are you looking to move your data from windows to a linux server? This guide will help you to transfer a file from windows to Linux server.

How to transfer a file from windows to linux Server? [A Definitive Guide]

List of content you will read in this article:

If you have a connected, working, and tested Linux Server and you are looking to transfer files from windows to a Linux server. You can do that; however, it is not as simple as you think. It is well known that working with servers, especially those running a command line interface, can be somewhat burdensome.

In this article, we will help you to upload local files from a Windows to a Linux VPS, whereas if you want to transfer data from a Windows pc to a Windows server, you can read this blog post.

Steps to Transfer a File From Windows to Linux Server

To understand the concept, The Windows PC you are transferring the files from will be referred to as the source, and the Linux Server you are transferring the files to will be referred to as the destination. For demonstration purposes, we have created a file on the desktop named “test.txt”.

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

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

Step 2: Type cmd in the open run window and press Enter.

Step 3: Enter the file’s directory by typing cd followed by the file path. (In this case, the file is on the desktop, so we write cd desktop).

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

SCP filename.extension username@serveraddress:filepath

  • filename.extension: It is the name of the file and its extension (test.txt in our case)
  • username: It is the username used to connect to VPS (root in our case)
  • serveraddress: It is the IP address of the VPS or server
  • filepath: It is the path where you want the file to be copied to (/etc/ssh in our case)

Step 5: If this is your first time connecting to the server, Windows will ask you to accept the security alert. Please do so.

Читайте также:  Linux show network card

Step 6: Next, you will have to enter the destination server’s password.

And that’s it! Once the correct password has been entered, your file will be uploaded.

To verify that file is transferred, open putty and connect to the destination server. Use “Nano editor” or “vi” editor to open the file.

As can be seen in the following image, the file has been uploaded and is available on the server.

There is also a popular way to transfer files from windows to Linux server or vice versa with the help of WinSCP software. this is an alternate or easy solutions to complete your job.

Conclusion

Unfortunately, there is no simple way than WCP Software for drag-and-drop that we suggested above to upload/transfer files from a Windows VPS server to a Linux server. To be able to do or manage the virtual private server, you will need to learn how to use the command-line interface. Nevertheless, once you know how to do it, it is not much more complex than using your PC for your typical daily tasks. We hope that with the help of this article, you were able to help with the guideline that you are looking for. If you have any questions or suggestions, please leave them in the comment section listed below.

People Are Also Reading:

Источник

How to Copy or Move Files from Windows to Linux

Why shut down to using a single operating system? Today it is possible to install two or more operating systems on the same computer. And although we can do this in several ways (virtual machines, Windows subsystems, etc.), the way to take advantage of the benefits of a 100% operating system is to physically install it on the PC thanks to dual boot, or dual boot. However, when we switch from one system to another we may run into some problems. Especially when trying to access our files from Windows and Linux.

Each operating system uses its own file system. Windows, for example, uses NTFS on its primary partition; macOS uses its own system, APFS ; and Linux, although it is compatible with a good number of file systems, the most used in most distributions is EXT4 . As each system uses its own formats, it is difficult (and dangerous) to access the partitions of other operating systems. So if we are using Linux and we have to access a file saved on the Windows hard drive, what can we do?

Читайте также:  Linux mint хрипит звук

Windows to Linux

Save data to a shared hard drive

If we want to avoid this type of problem, the best we can do is create a shared drive where we can save the data of all the operating systems that we use. This unit can be a hard drive or partition that we have internal to our own PC or an external hard drive that we have connected to the PC. The important thing is that this drive has a file system that is compatible with both Windows and Linux. And, although we can use NTFS for this, the best we can choose to avoid problems is exFAT .

Both Windows and Linux will be able to read and write to the exFAT disk without problems. This file system is the improved version of FAT32 that eliminates, among other restrictions, the limit of 4 GB per file. Therefore, we can use it as a link between all our operating systems. The important thing is to make sure that we keep all the data there.

Another alternative that we can use is a NAS server . These servers are connected to the network and allow any user connected to it to access the data. They usually mount an SMB / SAMBA server, so the files will be available from both Windows and Linux.

Other ways to access Windows data from Linux

In this case, we are going to see what we can do if we need to access a file from Linux that we have saved on the Windows hard drive.

Restart your computer

The simplest, and safest at the same time, is to restart the computer and return to Windows . By doing so, we will once again have access to all the files that we had saved on that hard drive and, therefore, we will be able to access it. Now that we are in Windows we can choose, either to do what we wanted to do from the Microsoft operating system, or to transfer the file to Linux, either through a pendrive or from the nexus hard drive that we have explained in the previous point .

This is the safest way to do it, since by not entering the Windows hard drive from Linux, we avoid changing permissions or corrupting files, saving us problems. However, it is the slowest method.

Mount the NTFS hard drive

Linux is capable of reading and writing to NTFS drives. The kernel itself has its own controller, and there are other third-party tools for this purpose. Reading files from an NTFS partition from Linux usually works fine, it doesn’t usually give problems. But if we are going to make any changes we run the risk that something does not go well and some data will be corrupted. Windows may be damaged, or we may lose files.

Читайте также:  Где находятся логи линукс

Propiedades carpeta Windows old Ubuntu

If we know what we are going to do, we can mount the Windows NTFS disk and access all its data. As long as we do not touch anything or modify anything, we can copy (yes, better copy than move) the file or files that we need from this unit to the Linux partition, and thus we can work with it without problems.

It is the fastest method, but the most risky. And it will only be possible if we do not have the disk encrypted with Bitlocker.

Recover Linux data from Windows

What if we use Linux, we go back to Windows and we have forgotten a file? Here we have several ways to re-access the data.

Restart the PC

As in the previous case, the safest and easiest way is to restart the computer and re-enter Linux . Once there, we can copy the file to a pendrive or an external hard drive, and restart again to take it to Linux. It is the longest and most tedious process, but it is the safest.

Use a program to read EXT4

Windows, by default, cannot read or write to Linux EXT drives. Therefore, if we want to access the data, it is necessary to install a program that allows us to do so. There is a very varied software, both free and paid, that allows us to do this. However, most of them are quite outdated programs that, although they can work, they can also give errors.

If we are going to avoid writing in these units, and we only want to pass the data, we can resort to these programs. If not, it is better to find another alternative.

Use the Windows Subsystem for Linux

Microsoft is betting very hard to integrate Linux into Windows. Thanks to the Windows Subsystem for Linux , WSL, it is possible to load a complete Linux instance on top of the operating system, thanks to Hyper-V. With the advent of WSL2, Windows is able to mount and use Linux EXT4 drives as if it were a hard drive more connected to the computer.

WSL Linux en Windows 10 build 19603 - 3

If we are advanced users, who have WSL enabled on Windows, and we want to access Linux data from Microsoft’s operating system, this is the best option. Anyway, we hope that Microsoft will simplify this process soon, adding almost native support to EXT4 from Windows.

Источник

Оцените статью
Adblock
detector