How do I end all tmux sessions with a command? I do know that Ctrl+D detaches the current session and "exits" in a window. But the server process does not end until the last bit is closed.
Suppose there are 3 sessions with 4 windows each open. I want to close all sessions and restart tmux fresh in a proper way (i.e. not killing the server).
Is there any way to do this?
31 Answer
This can be done in the following way.
Create a new session named "new":
tmux new-session -s newKill all sessions except the one you just created:
tmux kill-session -a -t newHowever, killing the tmux server and starting a new session is just as good.