# Windows <--> WSL

Remember at the start when I said:

> It works like a VM but more integrated. That means the system under WSL is NOT isolated from Windows: you can access all files from WSL, and from WSL you can access all files from Windows.

Yes, that's right, you can access all the filesystem of WSL in Windows and viceversa.

## Calling File Explorer from WSL

There's something very neat you can do in WSL: **you can "call" Windows executables (.exe) inside WSL!** Let's try that.

We can call Windows File Explorer (explorer.exe) inside WSL and tell them to open a folder from WSL.

In WSL, run the command **EXACTLY**:

```
explorer.exe .
```

{% hint style="info" %}
Don't forget the final dot.
{% endhint %}

This will open File Explorer in the current folder you are in WSL.

<figure><img src="https://1372910843-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fj93R6i5LFt65ZuPhYR8e%2Fuploads%2FWTmrdg30eI0N4hvVqFdA%2Fimage.png?alt=media&#x26;token=22a43a53-04fe-45eb-97e4-4b76c816de78" alt=""><figcaption><p>Calling Windows File Explorer inside WSL</p></figcaption></figure>

{% hint style="info" %}
Notice the address bar in File Explorer.
{% endhint %}

## Access WSL files from Windows

You can access WSL files from Windows. The files are located in a virtual "network" WSL creates.

To view WSL available filesystems, enter the following address in **File Explorer** or **Run Prompt** (**Win + R**):

```
\\wsl$\
```

<figure><img src="https://1372910843-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fj93R6i5LFt65ZuPhYR8e%2Fuploads%2FodFtpbaLVHKAR37Fsetl%2Fimage.png?alt=media&#x26;token=4ef4a895-e9e7-459a-b353-46f07d36e282" alt=""><figcaption><p>Accessing Ubuntu filesystem from Windows</p></figcaption></figure>

You will see one folder. That's your Ubuntu filesystem. Go inside and you will see every folder and file of the system.

Search for a **folder called "home"**, there is your personal folder. You can save files there.

{% hint style="danger" %}
**DON'T TOUCH ANYTHING OUTSIDE** `/home/`

You may break things!
{% endhint %}

{% hint style="danger" %}
**Only access WSL filesystem through this method.**

Accessing with other method may break things.
{% endhint %}

## Access Windows files from WSL

In Ubuntu, the Windows partitions are located in `/mnt/`.

Inside that folder there's all your mounted Windows partitions (you can indentify them by the initial letter). For example, if you enter folder "c", you are accessing partition `C:\`.

<figure><img src="https://1372910843-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fj93R6i5LFt65ZuPhYR8e%2Fuploads%2FNsbBCiCyGcdBslJaTKRw%2Fimage.png?alt=media&#x26;token=648d8f62-19f0-421f-8472-fc1b541d8efe" alt=""><figcaption><p>Accessing Windows filesystem from WSL</p></figcaption></figure>

{% hint style="warning" %}
Be careful when using Linux software on Windows filesystem. Unwanted things may happen. Only do that if you know what you are doing.
{% endhint %}

&#x20;<mark style="background-color:green;">**👏 Congratulations!**</mark>**&#x20; You can access Ubuntu filesystem from Windows.**
