tmux is a client/server app. Your tmux command (client) talks to a long-running tmux server over a UNIX socket.

By default, tmux uses the default socket (usually something like /tmp/tmux-<uid>/default). tmux -L <name> lets you pick a different socket name, which effectively gives you a separate tmux server with its own independent sessions/windows/panes.

Using Multiple tmux Servers with -L and Your Commands

Think of -L as “which tmux server do I mean?”. Here are two servers: work and personal.

Create a few sessions (-d keeps them detached, so you can run these from a normal shell):

$ tmux -L work new -d -s workA
$ tmux -L work new -d -s workB
$ tmux -L personal new -d -s personalA

List sessions on each server (they’re isolated):

$ tmux -L work ls
$ tmux -L personal ls

Attach to one session (pick one; attach takes over your terminal):

$ tmux -L work attach -t workA
# or
$ tmux -L personal attach -t personalA

Any tmux subcommand works the same — just keep the same -L:

$ tmux -L work rename-session -t workA workMain
$ tmux -L work kill-session -t workB
$ tmux -L personal kill-session -t personalA

Shortcut: new -A means “attach if it exists, otherwise create it”. It’s handy when you just want to jump into a known session:

$ tmux -L work new -A -s workA

Why this is useful

Notes