Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to find tmux sockets currently in use?

Tags:

I am trying to get a list of tmux sockets that are currently being used but the best solution I've come up with so far is to check in /tmp/tmux* or TMPDIR.

As far as I can tell tmux keeps these sockets around for some amount of time even if no current tmux session is using them.

As such I was hoping there was something similar to tmux list-sessions, but for sockets, that would give me all the sockets that are currently being used. I couldn't seem to find one in the man page and if there was one I didn't properly understand that listing sockets was its purpose.

Thanks!

like image 888
Billy Monk Avatar asked Jul 04 '12 17:07

Billy Monk


1 Answers

To list all sockets used by tmux you can use lsof:

lsof -U | grep '^tmux' 

Use sudo if the inquirer doesn't own the process.

like image 67
Thor Avatar answered Sep 25 '22 05:09

Thor