How to use the browser in Windows as WSL's default
How do you usually do when you need to authorize using the browser in WSL? Copy the token? Or use WSLg? These ways are not wrong, but it will be better to use the host's browser.
Here is how to set it:
sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser path/to/browser priorityExample:
sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser /mnt/c/Program\ Files/Google/Chrome/Application/chrome.exe 1That’s all if you don't have any browser in WSL. Even if you have installed one, I don't think you have to think seriously about priority because you can configure default by the following command.
sudo update-alternatives --config x-www-browserNow, you can use the browser of Windows as WSL's default.