Linux Shell Script To Open Multiple Website With One Click

Often, we need to open multiple websites at once to save time, especially during rush hours when we want to check various websites as part of our daily routine. By using this simple Linux script, you can save a lot of time. Simply write the following script in an editor and save it with a .sh file extension, for instance, you can name it “webopener.sh”. Here’s the script

#!/bin/bash

websites=("https://www.example.com" "https://www.google.com" "https://www.openai.com")

for website in "${websites[@]}"
do
    google-chrome --new-tab "$website" &
done

After you save this file, open the terminal and navigate to the file and make this file executable with permission. This is only one time process.

sudo chmod +x webopener.sh

Next, run this file with this command

./webopener.sh

Now, this script will open the chrome browser with all website mentioned into the list in each different tabs. I hope this was helpful for you.

Leave a Reply

Your email address will not be published.