5

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 [email protected] 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.

5
  • The answer will probably depend on what terminal emulator you are using.
    – chepner
    Commented Jun 5, 2012 at 23:47
  • use cluster ssh (cssh)? Not really want you want, but kinda close.
    – Zoredache
    Commented Jun 6, 2012 at 0:20
  • @chepner this would be for gnome-terminal Commented Jun 8, 2012 at 17:57
  • From the little searching I've done, it does not appear that gnome-terminal supports sending input to multiple tabs. I think you'd have to switch to something like Terminator or konsole
    – chepner
    Commented Jun 8, 2012 at 19:19
  • While not a direct answer to your question, rundeck lets you run commands on dozens or hundreds of servers at once. rundeck.org I use it on all the servers I administer
    – spuder
    Commented Aug 19, 2013 at 4:48

2 Answers 2

3

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.

0

Sounds like you're looking for Terminator

It does multiple tabs or window splits, and grouping them, and then sending a single command that gets sent to single tab, a group of tabs/windows or broadcast to all you got open.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .