Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I tell which users are connected to a shared tmux socket?

Tags:

sockets

tmux

I have created a shared socket for tmux to use.

tmux -S /tmp/pair

Then I have a 2nd user attach to the socket.

tmux -S /tmp/pair attach

How do I tell from the first session, the one that created the socket, tell that the 2nd user is connected?

I'm guessing it would be something from the lsof command.

like image 468
Jason Avatar asked Sep 20 '12 06:09

Jason


2 Answers

You can use the list-clients command. By itself, it displays all clients connected to the server. If you specify a session with the -t option, it shows clients attached to the named session.

like image 77
chepner Avatar answered Nov 15 '22 18:11

chepner


Like another user said in comments <prefix> D will list all the sessions but keep in mind that pressing enter will detach that client (which may or may not be what you want)

like image 34
Shubham Chaudhary Avatar answered Nov 15 '22 20:11

Shubham Chaudhary