Checking default web browser:
To set, change or view the default browser through a terminal or user interface is simple yet straightforward.
Write out the below-given command to know the default browser of your Linux system.
You can look into the list of other default applications, including your default browser. For performing this, there are two methods, In the first method, you can use the below-given command, and it will redirect you to the Default Application windows.
Searching “Default Applications” in the activities is considered as the second method.
The highlighted web browser in the “Web” option is already picked as the default web browser.
You can also check out the list of other available alternatives for browsing the web on your system.
The output declares that “Google Chrome” also exists as a web browser on our Ubuntu.
Opening default web browser from the command line:
Now, we will try to open the google instance in the default web browser, which is “firefox” in our case. Utilize the below-given command in your terminal if you want to do so.
Here, you can see terminal command execution successfully open a google instance in our default web browser.
Changing default web browser:
For setting any other browser as the default one, you have to execute the “xdg” settings command with the browser name at the end. We will set “Google Chrome” as the default browser on our Linux system in the following example.
Again, open any web instance by specifying its URL in the “xdg” open command. Furthermore, we have chosen “Google” for the testing.
The output states that we are successful in setting “Google Chrome” as your default browser.
Conclusion:
As Linux users, we all have various installed web browsers, which we use according to our web preferences. Still, there exists a possibility of 90% using a single web browser for browsing activities which turns to be our default web browser. In this article, we have seen opening the default browser for any web instance from the command line. Furthermore, the procedure of viewing and setting any other alternatives to your default browser is also provided.