1

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.

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.

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.