How to Start Firefox from the Command Line in Linux
This post will guide you how to start Firefox web browser from the command line in your Linux Operating systems. How do I Run FireFox from the command Line in CentOS or Ubuntu Linux.
- Start Firefox Browser
- Start Firefox to Open a Given URL
- Start Firefox to Open URL in A New Tab
- Open Firefox Browser Options
- Firefox Command Line Options
Start Firefox Browser
If you want to start your Firefox Browser in your Linux system, and you can type one of the following commands:
$ firefox
Or
$ /usr/bin/firefox
Start Firefox to Open a Given URL
If you want to start Firefox browser to open a given URL (such as: www.osetc.com/en) from the command line, and you can issue the following command:
$ firefox --new-window https://osetc.com/en/
Just see the below screenshot:
Start Firefox to Open URL in A New Tab
If you want to start Firefox browser to open a URL in a new tab in your browser, and you can use “—new-tab” option, type:
$ firefox –new-tab https://osetc.com/en
Open Firefox Browser Options
If you want to open Firefox browser options, and you can use “—preferences” option, type:
$ firefox –preferences
See below screenshot:
Firefox Command Line Options
If you want to get all command line options for firefox command, just type the following command:
$ firefox –help
Outputs:
devops@devops:~$ firefox --help Usage: firefox [ options ... ] [URL] where options include: X11 options --display=DISPLAY X display to use --sync Make X calls synchronous --g-fatal-warnings Make all warnings fatal Firefox options -h or --help Print this message. -v or --version Print Firefox version. -P Start with . --profile Start with profile at . --migration Start with migration wizard. --ProfileManager Start with ProfileManager. --no-remote Do not accept or send remote commands; implies --new-instance. --new-instance Open new instance, not a new window in running instance. --UILocale Start with resources as UI Locale. --safe-mode Disables extensions and themes for this session. --allow-downgrade Allows downgrading a profile. --MOZ_LOG= Treated as MOZ_LOG= environment variable, overrides it. --MOZ_LOG_FILE= Treated as MOZ_LOG_FILE= environment variable, overrides it. If MOZ_LOG_FILE is not specified as an argument or as an environment variable, logging will be written to stdout. --headless Run without a GUI. --save-recordings Save recordings for all content processes to a directory. --browser Open a browser window. --new-window Open in a new window. --new-tab Open in a new tab. --private-window Open in a new private window. --preferences Open Preferences dialog. --screenshot [] Save screenshot to or in working directory. --window-size width[,height] Width and optionally height of screenshot. --search Search with your default search engine. --setDefaultBrowser Set this app as the default browser. --jsconsole Open the Browser Console. --jsdebugger Open the Browser Toolbox. --wait-for-jsdebugger Spin event loop until JS debugger connects. Enables debugging (some) application startup code paths. Only has an effect when `--jsdebugger` is also supplied. --devtools Open DevTools on initial load. --start-debugger-server [ws:][ | ] Start the debugger server on a TCP port or Unix domain socket path. Defaults to TCP port 6000. Use WebSocket protocol if ws: prefix is specified. --recording Record drawing for a given URL. --recording-output Specify destination file for a drawing recording. --remote-debugger [][:] --remote-debugging-port Start the Firefox remote agent, which is a low-level debugging interface based on the CDP protocol. Defaults to listen on localhost:9222. -g or --debug Start within debugger -d or --debugger Specify debugger to start with (eg, gdb or valgrind) -a or --debugger-args Specify arguments for debugger
Conclusion
You should know that how to run Firefox web browser from the command line in your CentOS or Ubuntu Linux.