Pair programming is becoming more popular due to the good old terminal. Instead of having to sit next to your coworker who had an onion sandwich for lunch you can use terminal sharing from across the office or the country. And with services like Ruby Pair that connect people who want to pair program, knowing how to use a terminal multiplexer is worth a few minutes of your time.

The venerable choice for a terminal multiplexer is GNU Screen. Dalibor Nasevic has written an article with instructions on how to configure SSH and Screen to allow remote pair programming. In my opinion, a huge downside to using Screen is having to setuid the process to enable multiuser mode. A much better option is tmux.

If you’re looking for a more modern terminal multiplexer that is much easier to configure, tmux is the answer. Joe Moore has an article about using tmux with Vim for pair programming, but it’s really just a few simple commands:

# Host
tmux -S /tmp/pairprog

# Client
ssh pair-host
tmux -S /tmp/pairprog attach

Remote pair programming with Screen or tmux is also a great excuse to polish your Vim or Emacs skills.