Windows

Do you use windows and linux? So you can transfer your files from one to another

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?

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 a 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 unit 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.

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.

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.

Leave a Reply

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

Back to top button