By default, Ubuntu Linux ships with Mozilla Firefox pre-installed as the primary web browser. While Firefox is an excellent, privacy-focused application, you may prefer to use Google Chrome, Chromium, Brave, or Microsoft Edge for your daily web browsing. Simply downloading and installing a new browser is not enough; if you want web links from your emails or chat applications to automatically open in your new browser, you must explicitly set it as the system default.
In Ubuntu, there are two primary ways to change your default browser: using the graphical GNOME Settings menu, or using the terminal for a system-wide configuration.
Method 1: Change the Default Browser via GUI (GNOME Settings)
If you are using the standard Ubuntu desktop environment (GNOME), changing the default browser takes only a few clicks. This method changes the default browser for your specific user account.
- Open the Settings application. You can find this by clicking the system menu in the top right corner of the screen (where the battery and network icons are located) and selecting the gear icon, or by searching for “Settings” in the Activities overview.
- In the left-hand sidebar of the Settings window, scroll down and click on Default Applications. (Depending on your exact version of Ubuntu, you may need to click on “Apps” first, and then select “Default Applications”).
- Look for the section labelled Web.
- Click the drop-down menu next to it. This menu will display a list of all the web browsers currently installed on your system.
- Select your preferred browser (e.g., Google Chrome) from the list.
Your changes are saved automatically. You can close the Settings window, and any hyperlinks you click will now open in your newly selected browser.
Method 2: Change the Default Browser via the Terminal
If you are managing an Ubuntu system remotely, or if you prefer the speed of the command line, you can change the default browser using the update-alternatives command. This method changes the default browser for the entire system, affecting all users.
- Open your terminal application (Ctrl + Alt + T).
- Type the following command and press Enter:
sudo update-alternatives --config x-www-browser - You will be prompted to enter your administrator password (your typing will remain invisible for security).
The terminal will output a table listing all the web browsers installed on the system that can act as the default web browser alternative. It will look similar to this:
There are 3 choices for the alternative x-www-browser (providing /usr/bin/x-www-browser). Selection Path Priority Status ------------------------------------------------------------ * 0 /usr/bin/firefox 40 auto mode 1 /usr/bin/brave-browser 30 manual mode 2 /usr/bin/firefox 40 manual mode 3 /usr/bin/google-chrome-stable 30 manual mode Press <enter> to keep the current choice[*], or type selection number:
Locate the browser you want to use in the “Path” column, and find its corresponding number in the “Selection” column on the far left. Type that number into the prompt and press Enter.
For example, if you wanted to select Google Chrome based on the output above, you would type 3 and press Enter.
Troubleshooting: Links Opening in the Wrong Browser
Occasionally, even after changing the default browser in the GUI and the terminal, certain applications (like older email clients) might stubbornly continue to open links in Firefox.
This happens because Linux uses multiple overlapping systems to manage default applications. If you encounter this issue, you can force the change using the xdg-settings command.
In your terminal, run this command to force Google Chrome as the absolute default:
xdg-settings set default-web-browser google-chrome.desktop
If you are using a different browser, you must replace google-chrome.desktop with the exact name of the browser’s .desktop file (for example, brave-browser.desktop or firefox.desktop).