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.

Is there a way to run a single command in all the terminal windows you have open? (I.e. SSHing into a server or something like that?)

share|improve this question

migrated from stackoverflow.com Nov 12 '11 at 9:07

This question came from our site for professional and enthusiast programmers.

    
Here is an example answer to your question with tmux. –  mtyurt Sep 3 '13 at 22:20

3 Answers 3

up vote 4 down vote accepted

Here are 2 tools that I use almost daily for this exact task:

ClusterSSH - Cross-platform (with X11 forwarding)

enter image description here

And PuTTY Connection Manager (Windows)

enter image description here

share|improve this answer

You could use an intermediate tool such as chown has suggested (ClusterSSH, PuTTY Connection Manager), or some kind of macro software.

If instead you want to run the same set of commands across multiple machines, there are configuration management tools such as Puppet (and others) that will help you do this.

share|improve this answer

I'm not sure how to do precisely what you're asking, but you might have a look at dsh which lets you send commands to multiple shells at the same time.

share|improve this answer

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.