Opening an HTML file in Linux (WSL) with a web-browser failed…

I created a simple .html file and tried to open it in the browser from Linux (WSL).
Unfortunately, it required me to download browsers and set the BROWSER environment variable.
After running $ open hello.html – I get error and even after setting the correct environment variables and installing the browser throwed several errors.

Finally, after much trial and error I found a useful solution and it was this:
$ explorer.exe

Then I executed this command $ explorer.exe hello.html and viola the file opened up in the browser.

If you are using WSL then try using ‘explorer.exe’ to open .html files in the browser.

Thanks for reading!
There’s more to come…

Cheers!


Posted

in

by

Tags: