Windows Subsystem for Linux (WSL) is a very useful tool for people who want to run Linux commands on Windows. However, many users encountered several issues with WSL.
One such example is an issue with accessing files in Windows Subsystem for Linux.
A user reported the following problem on a forum:
Why, when I create a file from within Windows for example, can I not see it under the Linux sub system in Windows 10 (bash.exe)
The screenshot should explain. Folder: OMG was created from within Windows Explorer. Folder OMGBash was created from with Linux sub system bash.exe
When a folder OR file is created outside of bash.exe I can never see it, regardless of permissions and ownership.
So, the user can’t see any folder or file created outside of bash.exe. This is a major problem for anyone who uses Bash on Windows and today we will show you what to do to solve the error.
Can’t access files in Windows Subsystem for Linux? Here’s what to do
1. Update Windows
Make sure you always install the latest builds for Windows. The Windows updates fix many issues regarding the boundary between Linux and Windows.
To see if your version of Windows 10 is up to date, check out our detailed guide.
2. Store the files in the Windows filesystem
If you edit files using Windows tools, you should store them in the Windows filesystem. So, do not create or update Linux files using Windows apps.
However, you can run, build or test Linux files using Linux tools.
Keep in mind that you can’t run all Linux apps in WSL. Windows Subsystem for Linux is used to run Bash and some basic Linux tools.
So, WSL doesn’t support Linux apps such as Gnome or KDE.
Moreover, Microsoft doesn’t recommend using Windows Subsystem for Linux for hosting production services. For that, you can use Azure, Hyper-V, or Docker.
Still, in this case, you should be able to access files through Windows or Linux apps. Make sure your operating system is up to date and store the files in the Windows filesystem.
Did our solutions work for you? How do you use Windows Subsystem for Linux? Do let us know in the comments section below!
RELATED ARTICLES YOU NEED TO CHECK OUT: