O'Reilly logo

Remote Pairing by Joe Kutner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sharing a tmux Session

To pair-program with tmux, we must connect a second client to our session. Leave the tmux session we created earlier running. Then open a second terminal window (outside of tmux) and run this command:

 
$ ​tmux attach

The second terminal will look identical to the first terminal. That’s because it’s the same tmux session. Start typing in the first terminal, and we’ll see the changes in the second terminal. Likewise, characters entered in the second terminal will appear in the first terminal. If we run a command like ping, it will be visible in both consoles. We’re only simulating the process of pair programming with tmux in this example. In the real world, the two terminal windows would exist on separate machines, but ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required