How to Set Your Favorite Browser as Default through Terminal in Ubuntu

If you have multiple web browsers installed on your Ubuntu system to serve to different browsing preferences, setting a default browser is a practical choice. The default browser is the one that opens links when you click on them in any Ubuntu application. Here’s a guide on how to set the default browser using the terminal.

How to Set the Default Browser via the Terminal

Launch the Terminal application on your Ubuntu system. Enter the following command with sudo to configure the default web browser:

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

Set Favorite Browser as Default Terminal

This command displays a list of all available web browsers on your system.

The ‘*’ symbol before the selection number indicates the currently set default web browser. Enter the selection number corresponding to your preferred web browser and press Enter to set it as the new default.

Also Read:  How to Open New Tab in Ubuntu GNOME Terminal Using Command Line

This allows you to seamlessly open links from any Ubuntu application using your chosen default browser.

displays a list of all available web browsers

By default, the list includes web browsers from the /usr/bin directory. If your browsers are located elsewhere, such as /snap/bin, you can add them to the alternatives list.

Following these steps allows you to easily manage and customize your default web browser preferences through the terminal on your Ubuntu system.

If you liked this article, please subscribe to our YouTube Channel. You can also stay connected with us on X (Twitter) and Facebook.



Leave a Reply