How do I change my default browser?

Have a look at your system-settings -> Details:

(Note that in older versions of Ubuntu Details is called System Info)

enter image description here


This is an ubuntu way of doing this

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

If your preferred browser isn't in that menu or you prefer doing it from the command line, this command will let you do the same thing as in fossfreedom's answer:

xdg-settings set default-web-browser name-of-browser.desktop

E.g.:

xdg-settings set default-web-browser firefox.desktop

or

xdg-settings set default-web-browser chromium-browser.desktop

or

xdg-settings set default-web-browser google-chrome.desktop