-
-
Save nikolasgd/d2e600f2aee98c3429a6c8e4e72200e7 to your computer and use it in GitHub Desktop.
Open files from WSL2 with Chrome in Windows 10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
/mnt/c/Program\ Files/Google/Chrome/Application/chrome.exe '\\wsl$\Ubuntu-20.04/'"$1"'' | |
# Save this script as /usr/local/bin/open and make it executable. Pass the file name as first argument. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just to try to help someone who simply wants to open any file that is saved in WSL through the browser, just use a URL like the one below through the browser:
file://wsl.localhost/Ubuntu/tmp/test-image.png
And you can also browse the file list by accessing:
file://wsl.localhost/Ubuntu/