Open Multiple Firefox Tabs from Command Line

Open Multiple Firefox Tabs from Command Line

I'm trying to open firefox with two tabs from the command line, with two separate web addresses. So far I'm having no luck.

firefox -new-tab  -new-tab 

Could someone point me in the right direction?

3 Answers

Oops. I just found the answer. You need to add a -url after each `-new-tab'.

firefox -new-tab -url  -new-tab -url 

Now it works. Hope this can help somebody.

2

You no longer need to add -url, simply write firefox followed by space-separated URLs.

Example:

firefox mail.google.com askubuntu.com stackoverflow.com
2

Create a file containing list of URLs called url.txt:




Firefox uses the new-tab command, so you could pass the URLs in the file to the browser like so:

xargs -a url.txt firefox -new-tab "$line"
3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Robert Thorne
Author

Robert Thorne

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.