Change Default Web Browser in Ubuntu [Beginner's Tip]

New to Ubuntu and do not want to stick with Firefox? Here's how you can change your default browser.
Warp Terminal

So you found yourself a perfect browser that you always wanted and now, you want to make it your default browser?

But the question is: how do you change your default web browser on Ubuntu?

Let us find out how to do that!

Changing the default web browser on Ubuntu and other Linux

Here, I will be sharing two ways to change your default browser to make it more accessible:

  1. Using GUI (easy and recommended)
  2. Using the terminal (only works with the Xorg session)
To switch to another browser, you need to have other browsers installed on your system. For example, install Chrome on Ubuntu first and then make it default (if you want to).

Use GUI to change the default browser

By far, this is the easiest way to change your default browser, and there's a reason why.

Unlike the other method, it works with Wayland and Xorg desktop session. So regardless of what display server you are running, you can change your browser using this method.

The steps are similar for most desktop environments. Here, I give you pointers for GNOME, KDE Plasma, and Xfce:


If you're using the default offering of Ubuntu, it runs GNOME. To change the default browser on GNOME, here's what you have to do:

Search for the default applications in the search menu and open the first search result:

Seach for the default applications in the application menu

It will bring the list of every default app configured for your system. From here, you can change your default browser:

change the default browser in Ubuntu Linux

For KDE Plasma:

If you are using KDE, then the steps to change your default browser are just about similar to GNOME and can be done in two simple steps:

  1. Search for default applications in the application menu and choose the first result.
  2. Next, select your preferred default browser from the given options.
change the default web browser in KDE plazma

For Xfce:

If you are using Xfce desktop, open the default applications from the app menu.

In the Internet section, you will see the option to configure the default web browser:

change the default web browser on Xfce

Suggested Read πŸ“–

10 Open Source Lightweight Web Browsers for Linux
Do you think your web browser consumes too much system resources? Try these light web browsers in Linux.

Use the terminal to change the default browser (Xorg only)

If you're using the Xorg display server and want to change your default web browser, you can use the xdg-settings command.

The first step is to find the .desktop file for your next default browser. For that purpose, use the ls command in the following manner:

ls /usr/share/applications/

It will bring a long list of desktop files. Sure, you can scroll through the output and find the name of your browser, but that's a hassle.

You can pipe the previous command with the grep command to filter the output as per your needs:

ls /usr/share/applications/ | grep -w "browser-name"

For example, I'm looking for the Microsoft Edge browser, so my command would look like this:

ls /usr/share/applications/ | grep -w "edge"
Find the desktop file for the browser you want to be your next default browser

Once you find the desktop file for the target browser, copy the output and save it somewhere (using note-taking apps, or the default text editor) as you'll be using it shortly.

Next, use the xdg-settings command by appending the desktop file of your target web browser (output of the previous command) as shown here:

xdg-settings set default-web-browser <browser-name.desktop>

For example, I want Microsoft Edge to be my next default web browser, so I will be using the following:

xdg-settings set default-web-browser microsoft-edge.desktop

That's it!

Want browser suggestions?

Here are some of the best browsers for Ubuntu πŸ‘‡

Top 10 Best Browsers for Ubuntu Linux
What are your options when it comes to web browsers for Linux? Here are the best web browsers you can pick for Ubuntu and other Linux distros.

If you are cautious about your online privacy, I suggest you switch your regular browser to a privacy-focused one.

Here's a list of the best privacy-focused browsers:

5 Most Privacy Focused Web Browsers
The best privacy-friendly web browsers that you can try!

Want something unusual? Explore these.

7 Lesser Known but Unique Web Browsers For You to Explore
Looking for something different? These unique web browsers can help you make things interesting.

πŸ’¬ I hope you will find this tutorial helpful. What do you like to keep as your default web browser? Let me know in the comments below!

About the author
Sagar Sharma

Sagar Sharma

A software engineer who loves to write about his experience with Linux. While reviving my crashed system, you can find me reading literature, manga, or watering my plants.


Making You a Better Linux User


Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.