Sharing a session between multiple users
Tmux can create a socket session via -S
option.
Note the socket file must can be read/write by all participants of tmux.
sudo useradd -m devs
sudo usermod -aG devs leo
sudo usermod -aG devs wangyekun
sudo usermod -aG devs kangpeng
sudo chsh -s /bin/zsh devs
su - devs
# Install oh-my-zsh, vundle (and vim plugins), fzf, sdkman, nvm
git clone git@code.aliyun.com:znbt/bomserver.git ~/sources/bomserver
tmux -S socket-file
chmod 774 socket-file
Now other users can attach to this session with
tmux -S ~devs/socket-file attach
.
Using a common user
Create the user devs like above. All users login with the user devs and attach to the same tmux session.