Open In App

How to Launch Firefox from Linux Terminal

Last Updated : 17 Apr, 2023
Like Article

Mozilla Firefox is developed by Mozilla Foundation and Mozilla Corporation in 2004. It can be used in Windows, MAC, and Linux OS as well as in Android and iOS devices. Firefox uses Google’s search page as its homepage and also the default search engine. It is the default web browser in most Linux distributions because of its open-source GPL license.

Firefox is mainly used for browsing the internet like other browsers. But because of its open-source nature, it allows developers to modify the browser and change code in the repository used by Mozilla to officially update the browser. It is a graphical user interface browser that can be started easily with a single mouse click. The same program can also be launched from the command line with options that can be specified with this command.

In this article, we shall see how to launch firefox from the Linux terminal.


Firefox command is not pre-installed but it can be downloaded from the repositories in most of the Linux distributions.

1. For Ubuntu/Debian:

sudo apt-get install firefox

2. For CentOS/Fedora:

sudo yum install firefox

3. For RHEL:

sudo dnf install firefox

Method 1: Open firefox from the command line

To open the firefox browser from the terminal, then simply run the below command.


Firefox can also be started in the backend using &,

firefox &
Launching Firefox from terminal


Once firefox is invoked from the command line, we could see the browser is launched with one “New tab” and another tab stating the “Firefox Privacy Notice” which is to see the latest version of Firefox released by Mozilla. 

Method 2: Open firefox with the URL

To launch the browser with some URLs mentioned below is the syntax,

Syntax :

firefox <URL>

Example :

Opening Firefox along with URL


When a user wants to open the browser with a specific URL rather than opening the browser first using firefox and then searching for the site. Now once firefox is launched using “firefox” a new tab with the mentioned URL is opened up which eases the browsing.

Method 3: Open the URL in a new window

Use the –new-window option, to open the URL in a new browser window.

Syntax :

firefox --new-window <URL>

Example :

firefox &
firefox --new-window
Opening URL in new window from terminal


Here initially firefox is launched in the backend using “firefox &” where the user would have started browsing. And if the user wants to open a new window without disturbing the existing firefox instance, then the –new-window option can be used. Once the browser is launched using “firefox –new-window” a new firefox window is opened without disturbing the already launched window.

Method 4: Open New Tab 

Use the –new-tab option, to open another new tab.

Syntax :

firefox --new-tab <URL>

Example :

firefox &
firefox --new-tab
Opening new tab


This option would be useful if the user already has an active tab opened and wants to open another URL in a different tab to the same browser instance. Here we have initially launched firefox with and to the same browser instance have opened another new tab with the URL.

Method 5: Open Firefox Options / Preferences in Linux

Use the –preferences option, to open Preferences dialog from the command prompt.

Syntax : 

firefox --preferences
Opening Firefox options


This option helps the user to access browser settings directly from the terminal which contains 5 different panels namely General, Home, Search, Privacy & Security, and Sync panel at the left side. 

Method 6: Open firefox in private mode

Use the –private-window option, to enter into private mode.

Syntax :

firefox --private-window <URL>


firefox --private-window
Opening Private Window


Private browsing disables web cache, cookies, browsing history, and other possible tracking features. In chrome, the incognito mode does the same. Irrespective of browsers, the private mode cannot track the data users browsed. Once firefox is opened in private-window, the browser is launched in private browsing mode (mentioned at the top of the screenshot).

Method 7: Open ProfileManager

Use the —ProfileManager to start firefox with ProfileManager which allows creating, renaming, or deleting profiles.

Syntax :

firefox --ProfileManager
Opening Profile Manager


In Firefox, users can save personal information such as bookmarks, passwords, etc in a set of files called profiles. We can create multiple profiles each containing different user information. Once firefox is invoked with this option, the user would be prompted with a Dialog box with different profiles displayed where a new profile can be created or renamed or the existing profiles can be deleted. Once done, firefox will be launched with the selected profile ‘default-release‘.

Method 8: Open firefox in safe mode

Use the –safe-mode option, to open firefox in safe mode.

Syntax :

firefox --safe-mode
Opening Firefox in Safe mode


Once the “Start in Safe Mode” button is clicked, firefox will be opened in safe mode which would temporarily disable extensions, add-ons, and themes for the currently opened session. If the browser is running slowly or frequently crashes, then safe mode helps to troubleshoot the problem.

Method 9: Search in firefox

Use the –search option, to search for a keyword in firefox with a default search engine.

Syntax :

firefox --search keyword


firefox --search geeksforgeeks
Search in Firefox browser


Here, the default search engine is Google, and using search keywords works like a normal pattern search in the browser.

Method 10: Open dev tools

Use —devtools option to open developer tools on the initial load.  

Syntax :

firefox --devtools
Opening Dev Tools


Developer tools or Devtools allow a developer to create, test and debug software. It let users inspect and debug the page’s HTML, CSS, and JavaScript and also allows them to inspect the network traffic. Here, dev tools is opened at the bottom of the browser using which the user can debug the software.

Method 11: Set as the default browser

Use —setDefaultBrowser option to set firefox as the default browser.

Syntax :

firefox --setDefaultBrowser
Setting Firefox as default browser


When users have more than one web browser installed, then clicking a link in another application will automatically open it in the default browser. This option would be helpful to set firefox as the default browser.

To learn more about firefox and its commands,

firefox --help


Linux command line will always come in handy, even for GUI programs like a web browser. Launching firefox from the command line gives the same user experience as opening the application on a Desktop. Along with launching firefox from the terminal, we have also learned quite a few good options to open new tabs, new windows, settings, dev tools, private browsing, etc which really ease the user’s task.

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads