The Wayback Machine - https://web.archive.org/web/20240910142300/https://www.geeksforgeeks.org/how-to-launch-firefox-from-linux-terminal/
Open In App

How to Launch Firefox from Linux Terminal

Last Updated : 17 Apr, 2023
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

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.

Pre-requisite

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

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 :

firefox www.geeksforgeeks.org
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 www.geeksforgeeks.org” 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 www.geeksforgeeks.org
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 www.geeksforgeeks.org” 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 www.google.com &
firefox --new-tab www.geeksforgeeks.org
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 www.google.com and to the same browser instance have opened another new tab with the www.geeksforgeeks.org 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>

Example:

firefox --private-window www.geeksforgeeks.org
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

Example:

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

Conclusion

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.



Similar Reads

Greeting By Your Favourite Movie Quotes in Rainbow Colors on Every Terminal Launch
Would not it be cool, if you would be greeted by your favorite movie quotes? Let us see how to make this happen. Before moving further, please fire the below-mentioned command on your Linux terminal. sudo apt-get install lolcat Let us focus on some shell commands now. echo "message" - To print a message on the terminal.cat filename - To show the co
6 min read
Cool Custom Welcome Messages on Linux terminal
There is a Linux hack which can be used to display a custom message on the terminal every time we open it. This can be done by manipulating the .bashrc shell script. What is .bashrc ? It is a shell script that Bash runs whenever it is started interactively. You can put any command in that file that you could type at the command prompt. Steps on how
3 min read
Custom commands for linux terminal
Linux operating system allows users to create commands and execute them over the command line. To create a command in Linux, the first step is to create a bash script for the command. The second step is to make the command executable. Syntax : $ nano ~/.bashrc Here, bashrc means run the Bash file. Bash is located at /bin/bash . This file helps in c
2 min read
How to copy a file's content from Linux terminal?
This article shows the alternative method to copy the content of the file onto the clipboard, via the Linux terminal. In OSX, the commands pbcopy and pbpaste are available by default. Thus, to copy a file onto the clipboard via OSX terminal, type: pbcopy &lt; &#039;path of the file&#039; Since, in Ubuntu, pbcopy and pbpaste commands are not availab
2 min read
How to Browse From the Linux Terminal Using W3M?
W3M is an open-source text-based terminal web browser for Linux used to browse through the terminal. It is simple to use and do not require any additional interacting interface application though it interacts through the terminal. It renders the web pages in a form as their original layout. How to Install W3M? As W3M is not included by default on m
1 min read
Using Lynx to Browse the Web From the Linux Terminal
Lynx is a terminal-based web browser for all Linux distributions. It shows the result as plain text on the terminal. It is a classic non-graphical text-mode web browser which displays the pages on the terminal. Lynx does not load images and multimedia contents, hence it is fast as compared to other browsers. One who do not want so many images and m
2 min read
Few Tips for Fast &amp; Productive Work on a Linux Terminal
This article is aimed at making you more productive and waste less time on running commands by providing you the information about Linux Terminal's Shortcut &amp; Tricks. In simple words, less time you take to complete a task the more professional you become! 1. Opening the Linux Terminal (Ubuntu): The Linux terminal can be opened from a window or
4 min read
Shortcut to Move to the Beginning or Ending of a Command in Linux Terminal
In this article, we will learn how to move to the start and end of a command. We will demonstrate the key combinations in a Git terminal. The same key combinations work in other Unix style terminals too. Moving to the Starting of the Command Ctrl + A : The 'Ctrl+A' key combination moves the pointer to the start of the command. In the below gif imag
1 min read
Kali Linux - Terminal and Shell
Generally, operating systems have 2 interfaces GUI(Graphical User Interface) and CLI(Command Line Interface) and the same is the case with Linux Based Operating Systems. Linux Operating Systems are generally packed with terminal emulator packages for CLI based functioning and Desktop environment packages for GUI based functioning. Some common ones
3 min read
Basic System Controls with Terminal in Linux
Sometimes some of the basic services of the system stop working or starts malfunctioning. And it becomes really difficult to solve the problem through Graphical User Interface so here is the list of Terminal Command to solve the problem and to control the basic services manually. Installing the required packages To control the basic system services
2 min read
10 Best Linux Terminal Emulators
Despite various GUI advancements, Terminal Emulators have still an adequate presence in the tech market. A terminal emulator is software that allows to you interact with the host machine with the help of commands. Terminal Emulator is a lifeline for every Linux distro as it enables you to utilize the real strength of Linux. For developers, their ma
7 min read
How to Install Tilix Terminal Emulator in Ubuntu/Fedora/Arch Linux?
A terminal emulator is a software that helps in interacting with the computer machine and perform operations using commands. Tilix is a tiling terminal emulator formerly known as Terminix. It is an enhancement over a regular terminal and provides some important features. Features of Tilix Terminal Emulator: Enable users to split the terminal into d
3 min read
How to Search DuckDuckGo from the Linux Terminal?
DuckDuckGo is a search engine like Google, but it takes more care about user search protecting its privacy. To search from a terminal there is one tool called ddgr. This tool provides us the ability to search from the terminal by using the DuckDuckGo search engine. Installation of ddgr Required tools for ddgr installation: Python3.3 or later.Python
2 min read
Testing Website Loading Speed in Linux Terminal
We will see How to test a website loading speed in a Linux terminal. Here a website response time (which is getting back the result) will have a great impact on user experience. Because the loading or response is very slow we will be so frustrated. Even if our site has a slow response time the user may get a bad experience. So in this article, we w
3 min read
Linux Fun - Displaying Steam Locomotive on Terminal
Making fun of our mistakes can be a good approach for learning anything smoothly because it gives us a little bit of dopamine release in our mind so this can help us to improve our health and mind as well. Now we will learn about one more mistake while doing some kinds of stuff in our Linux terminal let's do it : You may remember when we are typing
2 min read
AMP Text Editor for Linux Terminal
Amp is a fully-featured and lightweight text editor inspired by the Vi/Vim text editor. Amp editor is a terminal-based editor, and it is written in the Rust language. It provides the all fundamental features required for a modern text editor. Amp does not need any configuration it comes with all configuration, and it does not use any plugins. And i
3 min read
Searching Stack Overflow from Linux Terminal Using SoCLI Tool
SoCLI is a command-line tool written in python used to search queries on the stack overflow. We can search anything on stack overflow using the SoCLI tool without using the terminal. You can search for any question on Stack overflow on the terminal using SoCLI tool. Installation of SoCLI: Let's see how to install the SoCLI tool on Linux. The prereq
4 min read
How to Install and Use Alacritty Terminal Emulator in Linux?
Alacritty is a cross-platform terminal emulator with GPU acceleration. It's a terminal emulator for OpenGL written in the Rust programming language. Alacritty is the fastest and lightest Terminal emulator in nature, thanks to its OpenGL renderer and high throughput parser. Alacritty Terminal emulator does not have many fancy features like tabs and
2 min read
How to Share Linux Terminal Using Teleconsole?
You already know about many popular remote desktop sharing applications. But this is very different because this is only shared with the terminal, not the full desktop. Here we see how to use teleconsole and how to share your terminal with your friend. Teleconsole is a tool that can allow you to share your Linux terminal with your friend, and they
2 min read
How to Create a File in the Linux Using the Terminal?
In this article, we will learn to create a file in the Linux/Unix system using the terminal. In the Linux/Unix system, there are the following ways available to creating files. Using the touch commandUsing the cat commandUsing redirection operatorUsing the echo commandUsing the heredocUsing the dd command1. Create a file in the Linux/Unix system us
4 min read
Fzf - File Search From Linux Terminal
Fzf is a command-line general-purpose fuzzy finder tool. It is somewhat like grep. It is a cross-platform command-line tool, that helps you to search and open files quickly. Furthermore, it is open-sourced portable with no dependencies. It has supports for Vim/Neo vim plugin, key bindings, and fuzzy auto-completion. It can be used with any list; fi
3 min read
Creating and Executing a .jar File in Linux Terminal
JAR - Java Archive. It is like a zip file but for java classes. It combines all the .class files in Java into a single .jar file. It is used to download all java classes on HTTP in a single operation. These can be created using the "jar" CLI tool. It also has an optional META-INF which can include files like - MANIFEST.MF - manifest file is used to
3 min read
Terminator - A Linux terminal emulator
As the name suggests, 'Terminator' is a pretty badass emulator which provides you with functionalities like split horizontally, split vertically, etc, as one wants in a single window. Not only does it provide split horizontally or vertically, but, also one can give a custom title to each and every terminal and several other features such as multigr
2 min read
eDEX-UI Terminal for Windows, Mac and Linux
eDEX-UI is a fullscreen window, cross-platform terminal emulator, and system monitor which looks and feels like a sci-fi computer interface. Features of eDEX-UIIt has fully featured terminal emulator Tabs, colors, mouse events, and other features.It supports curses and curses-like applications.It also monitors real-time-time systems (CPU, RAM, swap
3 min read
Fast - Test Internet Speed from Linux Terminal
In this article, we are going to see how to check your system's internet speed from Linux terminal using Fast.com, it is a web-based application and used to check internet speed. Netflix owned these tools as speed testing services. It is free, fast, and easy to use. Installation:Installing into the current directory Step 1: Download the file from G
1 min read
Terminalizer : Record Your Linux Terminal and Generate Animated GIF
Terminalizer is an open-source cross-platform CLI tool that is used to record the terminal session and generate or share animated gif images. FeaturesChange background, title, font, colors, window frames, transition speed.Share your recording on the webAdd watermark In this article, we will show you how to install terminalizer in Debian-based Linux
2 min read
GRV - Tool for Viewing Git Repositories in Linux Terminal
Git Repository Viewer or GRV is a cross-platform, free, and open-source GIT GUI client. It provides a terminal-based interface to search and view refs, commits, branches, tags, and diffs in a git repository. The behavior and style can be customized through a configuration file. GRV is written in the Go programming language and is available under GN
2 min read
How to Make Linux Terminal look Awesome
In this article, we will install and configure some themes and plugins to tweak our Linux terminal for better productivity and a fancier look. These features include autocompletion, autosuggestion, command-line search, syntax highlighting, and better support for git and environment managers. Zsh The Z-shell or Zsh is a UNIX shell with support for v
3 min read
eDEX-UI - The Tron-Inspired Terminal Emulator for Linux
Linux users often deal with the terminal but the look and feel of the terminal may be boring. Everyone wants a terminal that looks like a sci-fi movie screen. Then eDEX-UI will end your wait. eDEX-UI is a Sci-Fi inspired terminal emulator and system monitor. It gives a futuristic theme to the terminal. It is an open-source project and completely fr
3 min read
How to zoom in and zoom out terminal console in linux
Linux is a Debian-based Operating system used by many professionals and other people for various purposes. Mainly Linux is used for Penetration testing and Vulnerability assessment. Windows systems often interact with GUI (graphical user interface) but in Linux, we use a terminal console more to interact with the system and to do things normally. I
7 min read
Article Tags :