Access Windows File System in WSL Ubuntu

Access Windows File System in WSL Ubuntu

Introduction

As you might have been using WSL to harness the power of Linux within your Windows Operating System, it might be true that you might not be knowing how to access the windows file system (files basically) through WSL Ubuntu and it's also true that the regular CMD in Windows is not a really liked one by the developers or programmers and is actually not that great when compared to Unix so WSL is actually a savior for Windows users who cannot really switch to Linux due to some applications maybe not working on Linux and only support Windows. In this blog, I will be guiding you through how you can achieve the same.

So, let's begin...

Follow these steps to gain access to Windows File System using WSL Ubuntu

  1. Open Windows Terminal, and open your WSL terminal

  2. Now that your WSL terminal starts at this location <username>@YourPC you must be trying to check if the Windows File System is present in this directory or not using the ls command but must have been seeing an empty directory and might think how you should go from here as it is the root directory, but let me tell you one thing, you can actually go back from this location which you can checkout using the ls -a command and you will see that you can actually go back from this present working directory.

  3. After you go back from this location to two directories back, you will see that you have a directory present in the location that is the /mnt directory and that is what we need, that is the directory that you need to go in in order to access the Windows File System!

  4. Now, we enter the /mnt directory and we can see our Windows File System, we can here see all the drives that are present in our machine with the directory names are equivalent to your drive letters like the Local Disk (C:) will be the /c directory.

So, here you have it! You can now access any of the required drives from your Windows File System through WSL Ubuntu and still use the Linux commands on Windows Files!

If you like my blog, please do like it!!!

You can connect with me on the following: