MASIGNCLEAN104

You should not change Linux files on Windows 10. Why?

iklan banner

For those thinking of changing their Linux files on Windows 10, there’s something you lot desire to know. According to Microsoft, creating or changing Linux files from Windows will probable final result inwards information corruption as well as mightiness harm your Linux surroundings requiring you lot to uninstall & reinstall your distro.

Do non alter Linux files on Windows 10

 creating or changing Linux files from Windows will probable final result inwards information corruption as well as k You should non alter Linux files on Windows 10. Why?

This agency that all your Linux files or those files stored nether ‘%localappdata%\lxss‘ should non endure created or edited using whatsoever of the Windows tools, or you lot mightiness convey to human face upward exactly about serious losses.

Let’s explore the reasons for this issue.

If the WSL or Windows Subsystem for Linux can’t notice your stored Linux file metadata for a given file, it automatically assumes the file is corrupted or damaged on the system. This is because all the file metadata is stored as well as represented differently inwards Linux compared to Windows. WSL stores all Linux information inwards NTFS folders, as well as therefore calculates as well as persists their metadata in its NTFS extended attributes.

On the other side, apps on Windows 10 create non convey the required algorithm to re-calculate & persist this Linux metadata each fourth dimension they create/modify a file stored nether the root link (%localappdata\lxss\). Thus, if you lot direct house to move a Windows 10 app or tool to modify whatsoever Linux files, they exactly won’t convey whatsoever of the previous metadata inwards their attributes due to non-compatibility of NTFS format.

Another seem of these Windows tools is that they don’t by as well as large edit the master copy file instantly. Rather they piece of employment past times deleting the original, re-creating them on the app as well as so restoring it to the user amongst all required edits. This procedure deprives the Linux file of all the NT files as well as metadata, and NT file extended properties are frequently non persisted as well as are lost. Thus, if your Linux file has no or wrong file metadata, Windows apps volition tend to deem them every bit corrupt as well as in all probability convert them into an unusable file.

Prevention

To piece of employment on files that move a hybrid of Windows 10 as well as Linux apps, prefer working on as well as storing those files inwards your Windows filesystem, as well as access them from both Windows as well as from Bash Shell via /mnt/<drive>/path. Using both the services to access your Linux files volition assist Windows recognize all the NT filesystem elements. This helps you access the same files using both Windows tools as well as Bash tools without having to re-create files dorsum as well as forth betwixt filesystems.

Says Rich Turner, Senior Program Manager at Microsoft – Be certain to follow these ii rules inwards monastic nation to avoid losing files, and/or corrupting your data:

  1. DO store files inwards your Windows filesystem that you lot desire to create/modify using Windows tools AND Linux tools
  2. DO NOT create / modify Linux files from Windows apps, tools, scripts or consoles.

For a total read, read this weblog postal service on MSDN.


Source: https://www.thewindowsclub.com/
Share This :