Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is there a command in screen to replicate a command to every window? I'd like to send something such as 'reboot' to every window at once. Is this possible? I've seen talk about the 'at' command via screen, but I don't know if this is correct or not, or I can't get it to work.

share|improve this question

2 Answers 2

Yes, the at command is what you want. If you're using the default settings, then C-a : gets you to command mode, at which point you can enter at # stuff reboot. See this guide or the at and stuff descriptions in the CUSTOMIZATION section of the screen(1) man page for more details.

share|improve this answer

If you are already using screen, then it is probably worthwhile to solve your problem with the tool you are already using and is something that is commonly packaged for linux distributions.

If you want to consider a different approach, you could try ClusterSSH, which allows you to connect to multiple SSH sessions simultaneously and issue commands to all sessions from one control window.

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.