Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

How I would go about opening multiple URLs from a text file as different tabs in Firefox/Chrome? My text file is just a list of URLs, one per line:
share|improve this question

2 Answers 2

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

while read line; do
    firefox -new-tab "$line"
done < textfile.txt

With Chrome, the syntax is:

google-chrome "$line"
share|improve this answer
On OS X you can make this work with Chrome with something like alias google-chrome='/Applications/Google\\ Chrome'. Probably similar for Firefox. – David Winiecki Dec 11 '14 at 20:58

I think this may be a nice solution:

cat /home/username/anyfolder/allmyURLs.txt | xargs firefox -new-tab
share|improve this answer
"$line" is wrong in this answer: xrag applies the strings from the input file each as parameter to its subcommand. I corrected the answer accordingly. – halloleo May 25 at 3:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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