How to Access Windows System Files from Linux Terminal of Ubuntu -H2S Media Subsystem


To provide native compatibility to Linux operating systems such as Ubuntu, Debian, OpenSuse, Kali, etc. Microsoft added a layer or feature called Windows Subsystem for Linux (WSL). Windows 10 or 8 users, including newer Windows server users, can enable this feature from the Control Panel Activate and deactivate the Windows function option. WSL on Windows 10/8 gives us the ability to run a different native command on Linux command line tools or a Bash environment, just like a headless server running in a virtual machine.

However, we cannot install ISO Distros like we do on VirtualBox or any other virtualization software. Here we get a pre-built headless Linux application available on the Microsoft Windows 10 app store. Just go to the store and click on the Linux environment app and automatically install it on the system.

Now, after installing Linux environments, the thing that comes to mind is that after installing Linux environment, for example, Ubuntu; where its files are saved by Windows system. I mean, if you just want to manually access windows files from linux subsystem how would you do that. In addition, is it possible to access Windows files and drives such as C, D, E… directly from the Linux Ubuntu Subsystem? In this article, we will give answers to these questions …

To note: Until you know what you are doing, please refrain from manually modifying your Linux subsystem files. It could harm your Linux environment. This is the reason why Microsoft stored them in a hidden folder to ensure that the user could not cure them without actually knowing what they are doing?

Useful related article: How to enable Windows Subsystem functionality for Linux environment

How to Access Ubuntu Files (Windows Subsystem) from Windows 10

Although we show this tutorial using the Ubuntu subsystem, the process will be the same for others such as OpenSUSE, Kali and more installed on WSL.

The address where Windows 10 WSL stores the Linux environment file:% userprofile% AppData Local Packages

Step 1: MyComputer

Go to MyComputer and open the C: drive where all of your Windows Plus program files are stored.

Step 2: Show hidden files and folders

By default, all crucial or primary Windows data files and folders are hidden and we have to show them manually. To do this, click on the To file option given in Windows Explorer menu.

From Folder options window click on the See then under the tab Hidden files and folders select the Show hidden files, folders and drives.

Show hidden files and folders

Step 3: Access Ubuntu Subsystem Files from Windows 10

Inside the local C: drive of Windows, there is a folder –Users, click on it.

access Linux files from Ubuntu subsystem in Windows 10

Step 4: Double click on your Windows username to open it (mine is Raj). After that, open the Application data folder which is basically a hidden folder.

access Linux files from Windows subsystem on Windows 10

Step 4: In the AppData, open the Local->Packages->ConicalGroupLimited folder for Ubuntu. Likewise for other Linux environments, it will start with their names.

Step 5: Inside the folder double-click to open the LocalState->rootfs. All the files and folders of the Ubuntu Linux environment will be displayed there.

all Ubuntu files and folders

Now click on the Home folder where you will find the UNIX username.

How to access Windows files from the Ubuntu terminal

To access all Windows 10 system drives under the command terminal of Ubuntu or another Linux environment installed on Windows; we have to follow the linux mount command.

By default, we can only use the Bash environment to access Windows files like we do in headless Ubuntu / Linux servers.

From your Linux Bash Shell type the following command to mount C: Drive:

cd /mnt/c

Likewise for D: type of variator

cd /mnt/d

In this way we can also mount connected internal and external drives to our Windows 10 or 8 systems including network drives. Also, one thing to note is that the Linux Bash Shell environment must be launched under administrative right to access Windows system folders. To give administrative permission, right click on the installed Linux environment such as Ubuntu and select “Run as administrator”.

Other useful resources


Comments are closed.