This page looks best with JavaScript enabled

Parallel Execution of Commands using Xpanes

 ·  🎃 kr0m

A very common task for a system administrator is to configure multiple computers in a very similar way. Doing it one by one is a tedious process, but thanks to Xpanes, we can do it in parallel on multiple servers with the consequent time savings.

Xpanes depends on tmux, so we install it:

pkg install tmux

Now, as a regular user, we install Xpanes:

git clone https://github.com/greymd/tmux-xpanes.git
cp tmux-xpanes/bin/xpanes /home/kr0m/.scripts/

It is now ready to use. We launch four ssh sessions:

xpanes -c “ssh kr0m@{}” infinity mighty potras drwho

We can see how the text from the first terminal is replicated to the rest:

If you liked the article, you can treat me to a RedBull here