tmux multiple instances of the same session
I think you're basically asking how to do screen -x
in tmux
? Here's an example:
# Start a new tmux session (with default session name "0").
tmux
# Start another tmux session (default name "1"), sharing windows with "0".
tmux new-session -t 0
# Start yet another tmux session (default name "2"), sharing windows with "0" (and "1").
tmux new-session -t 0
# Now you can attach to sessions with tmux attach-session -t <0|1|2>.
# Or you can omit the -t, and I think it attaches to one that isn't attached to yet.
# I don't know the exact rules for how it decides which free session to choose.
If you don't like the default numerical names when creating a new session, you can pass -s other_name
to name it something else.