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 https://www.evernote.com/Home.action -new-tab http://www.gmail.com

Could someone point me in the right direction?


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

firefox -new-tab -url https://www.evernote.com/Home.action -new-tab -url http://www.gmail.com

Now it works. Hope this can help somebody.

  • Cool. That would be very usefull in Chrome as well. – augusto Sep 8 '17 at 9:09

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"
  • @Maythus awesome – alhelal Jul 19 '16 at 9:41

Update: Now you no need to add -url simple write firefox then web url name separated by space.

firefox mail.google.com askubuntu.com stackoverflow.com
  • This is a nice solution. Personally, I run it at startup using CTRL+R to recall the line and with a & at the end of the command to detach the firefox session from the terminal - just a suggestion. – somethis Aug 7 at 9:38

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.