Microsoft: Do Not Change Linux Files In Windows

The tech giant Microsoft has warned every Windows 10 users to avoid changing the Linux subsystem files using Windows apps, tools etc. As this might result in the loss of metadata and simply could corrupt the whole Linux environment.

Microsoft: Do Not Change Linux Files In Windows

A new feature that Microsoft incorporated in the latest version of its operating system with the arrival of the big update “Anniversary Update”, was the integration of Bash as a native subsystem in Windows 10 OS.

It is a feature that allows users to access a native Linux terminal in which user will be able to use any command without having to install any other software. However, this subsystem of Windows to Linux despite already part of Windows 10 Anniversary Update, is not installed by default and therefore has to be activated by the computer administrator if you want to use.

So, if you want to start using Bash, then you might have to watch tutorials that explain how Bash works and how you can turn it on in your Windows 10 PC. But, Microsoft’s Linux endeavor is still in its initial phase.

Hence, you should be aware that the tech giant Microsoft has already warned of the dangers in a new blog post, the tech giant Microsoft’s instruction clearly states that the Windows 10 users “MUST NOT” change Linux files using Windows apps, tools, consoles, scripts, etc. “under any circumstances”.

Do Not Do This
Do Not Do This

With this, the tech giant Microsoft refers to all Linux files that are part of WLS and stored under %localappdata%\lxss on the drive where the system is located. So, if you made any in the Linux Bash subsystem files from the Windows environment, simply it can cause data corruption or own Linux environment to such an extent that simply we have to uninstall and reinstall the distribution.

The cause of this behavior is that the metadata file is not managed in the same way on both Windows and Linux, as the Linux subsystem files are generally stored in an NTFS folder in Windows 10 operating system, while WSL calculates and stores the Linux metadata in NTFS extended attributes. However, Windows apps and tools don’t know that how to deal with this metadata every time when they change files stored under %localappdata%\lxss on the drive where the system is located.

According to the Microsoft, “When you access files on your Windows filesystem from within Bash, WSL honors the NT filesystem behaviors (e.g. case-insensitivity), permissions, etc. so you can easily access the same files using both Windows tools and Bash tools without having to copy files back and forth between filesystems”.

“Therefore, be sure to follow these two rules in order to avoid losing files, and/or corrupting your data:

DO store files in your Windows filesystem that you want to create/modify using Windows tools AND Linux tools
DO NOT create / modify Linux files from Windows apps, tools, scripts or consoles”