LinuxCommandLibrary

firefox

Launch the Firefox web browser

TLDR

Launch Firefox and open a web page

$ firefox [https://www.duckduckgo.com]
copy

Open a new window
$ firefox --new-window [https://www.duckduckgo.com]
copy

Open a private (incognito) window
$ firefox --private-window
copy

Search for "wikipedia" using the default search engine
$ firefox --search "[wikipedia]"
copy

Launch Firefox in safe mode, with all extensions disabled
$ firefox --safe-mode
copy

Take a screenshot of a web page in headless mode
$ firefox --headless --screenshot [path/to/output_file.png] [https://example.com/]
copy

Use a specific profile to allow multiple separate instances of Firefox to run at once
$ firefox --profile [path/to/directory] [https://example.com/]
copy

Set Firefox as the default browser
$ firefox --setDefaultBrowser
copy

SYNOPSIS

firefox [options] [URL(s)]

PARAMETERS

-h, --help
    Display help message.

-v, --version
    Display Firefox version.

-P
    Start Firefox with the specified profile.

-new-window
    Open the URL in a new window.

-new-tab
    Open the URL in a new tab.

-private-window
    Open the URL in a new private window.

-safe-mode
    Start Firefox in safe mode, disabling extensions and themes.

-url
    Open the URL.

DESCRIPTION

The `firefox` command starts the Mozilla Firefox web browser. It allows users to browse the internet, view web pages, and interact with web-based applications. Firefox is a graphical application and requires a display manager to be running (e.g., X11, Wayland). The command accepts various command-line options to customize the browser's behavior at startup, such as opening specific URLs, running in safe mode, or using a specific profile. Without any parameters, `firefox` launches a new Firefox window or focuses an existing one.
Firefox is the default web browser on several Linux distributions, renowned for its open-source nature, extensive customization options, and commitment to user privacy. The command can be used with scripting or automation tasks to manage web browsing activities.

CAVEATS

Firefox must be installed on the system to use this command. Requires a graphical environment. Certain features may depend on the version and configuration of Firefox.

ENVIRONMENT VARIABLES

Firefox respects environment variables such as `DISPLAY` to determine which display to use. `http_proxy` and `https_proxy` variables are also used to configure proxy settings.

DEBUGGING

Firefox provides developer tools that can be accessed by pressing F12. This is helpful for web development and debugging purposes.

HISTORY

Firefox was originally developed as a branch of the Mozilla Suite, starting in 2002. It gained popularity due to its speed, security features, and extensions support. It has become a widely used web browser on Linux and other operating systems, evolving through numerous versions with improved features and performance. The command `firefox` has been a standard way to launch the browser on Linux systems since its inception.

SEE ALSO

Copied to clipboard