Skip to content

Instantly share code, notes, and snippets.

@stanbar
Last active July 12, 2021 12:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stanbar/c7218958beaf44931ea2e6ae65564758 to your computer and use it in GitHub Desktop.
Save stanbar/c7218958beaf44931ea2e6ae65564758 to your computer and use it in GitHub Desktop.
Tmux pair programming session for multiple linux users
#!/bin/bash
# execute only the first time:
# sudo groupadd pair-programming
# sudo usermod -a -G pair-programming <host username>
# sudo usermod -a -G pair-programming <your peer username>
tmux -S /tmp/sharedtmux new-session -d -s pair-programming && \
sudo chgrp pair-programming /tmp/sharedtmux && \
chmod g+rwx /tmp/sharedtmux
#!/bin/bash
# When shared session is created, you can join it with this command
tmux -S /tmp/sharedtmux attach
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment