Linux – is there a linux equivalent of iTerm(mac) sending command to multiple tabs functionality

command lineitermlinuxmacterminal

in iTerm, you can send a command to execute simultaneously on a set of already opened tabs. Is there a way to do this in linux (with gnome-terminal preferably)?

for instance, supposed that I had 10 tabs already ssh'd into foo@host1.com and sudoed to root and wanted to send a command to run on all 10 tabs.

The goal of this is to be able to stay within a set of tabs and command them, rather than having to use expect scripts to ssh and elevate and run commands. Basically, like how you could do in iTerm.

Best Answer

If you can use tmux, then you can "set-window-option synchronize-panes". From the manual, it "duplicate[s] input to any pane to all other panes in the same window, except for panes that are not in output mode".

This isn't quite the same as duplicating input to tabs in gnome-terminal, but it gets you the same result.