Skip to content

Bash - WSL - Set Default Browser to Windows

Source: How to use the browser in Windows as WSL’s default - Boring Time

sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser path/to/browser priority

For example,

sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser /mnt/c/Program\ Files/Google/Chrome/Application/chrome.exe 1

sudo update-alternatives --config x-www-browser

sets Google Chrome as the browser.

for me I use Edge Canary as my default browser so I ran:

sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser /mnt/c/users/jimmy/appdata/local/microsoft/edge\ sxs/application/msedge.exe 1

sudo update-alternatives --config x-www-browser


Jimmy Briggs jimmy.briggs@jimbrig.com | 2022