How to access site files on windows (WSL)?

i’m sorry if it’s stupid question, but can anybody clarify how can i access files of my projects (for example, trellis config files) located in WSL, from windows? i’m trying to open the project in phpstorm, but can’t find them.

maybe i shouldn’t clone trellis repo to wsl, and the correct way is to clone it directly to windows?

By default the existing (Windows/host) drives are mounted in /mnt/[drive letter]
However, it is also possible to mount these directly to root, I mounted them to /[drive letter] for more convenience.
WSL 1/2 disk I/O is still quite slow, but WSL 2 supports *nix ownership/permissions interoperability, so this is a big plus, especially with Docker and database services (like Postgres).

1 Like

thank you!
i created a symlink on wsl to the project directory, for faster access.

but i’m still comfused - where do i have to run composer commands, vagrant (vagrant up), frontend tools?

Inside the WSL 1/2 shell. WSL provides the Linux kernel and other compatibility features.
You have to pick a distribution (like Ubuntu 20.x) and then you can open that distribution terminal (bash shell) and from inside that shell you can install things like usual using apt and issue Linux and Windows commands.
You would simply open the WSL distribution terminal, then cd into your directories and work from there as you would on a Linux VM or system.
I have also installed Docker for Desktop together with WSL 2, so I can run PHP/nginx locally in a container.

This topic was automatically closed after 42 days. New replies are no longer allowed.