Is it possible to find the name of the current socket in tmux?

This is a continuation of this question .

Suppose I am inside a tmux session and I want to print the name of the current socket being used . How can i do this?

+3


source to share


1 answer


Information about the current server socket is stored in an environment variable TMUX

(along with some other things I'm not sure what that is). The socket path is in the first field on a comma separated string.

Here's one liner to get it:



echo $TMUX | cut -f1 -d','

      

+5


source







All Articles