Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
The answer will probably depend on what terminal emulator you are using. –  chepner Jun 5 '12 at 23:47
    
use cluster ssh (cssh)? Not really want you want, but kinda close. –  Zoredache Jun 6 '12 at 0:20
    
@chepner this would be for gnome-terminal –  jabbertalker Jun 8 '12 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 Jun 8 '12 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 Aug 19 '13 at 4:48
add comment

2 Answers

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

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.