Book Image

Getting Started with tmux

By : Victor Quinn
Book Image

Getting Started with tmux

By: Victor Quinn

Overview of this book

Table of Contents (16 chapters)
Getting Started with tmux
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Using tmux for pair programming


So we saw how to create sessions and how you can attach an existing session, but did you wonder what would happen if more than one terminal attached to the same session?

The ability to connect multiple terminals to the same session ends up being one of the biggest advantages tmux offers. By allowing two or more terminal windows to connect to the same tmux session, tmux becomes an extremely powerful collaboration tool. With tmux, two or more people can see and even interact with the same content at the same time!

Connecting to the same session locally

Before we get to full pair programming, let's try just connecting to the same session locally in two different terminal windows and see what happens.

If you followed the previous instructions, you should be able to pull up your tmux session by opening a new terminal window and running:

$ ssh tmux -t -- 'tmux attach-session -t MyServer'

That will connect to the box over SSH and attach your tmux session. Now, open another...