1

I have a Debian server with multiple tmux sessions running. Some of these sessions are idle and not running any active processes. How can I identify and terminate all tmux sessions that are not currently running any processes or commands? Additionally, what command can I use to kill all of these idle sessions at once? Detailed steps or commands would be greatly appreciated.

New contributor
maxime de smedt is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
4
  • 1
    Define "idle" and/or "active process". Is an unattached session with a window with a pane with a shell waiting for commands idle? Is a pane running tail -f /dev/null idle? Or is only a session where in each pane the main process is dead idle? (remain-on-exit on). How about a pane with the main process dead, but where (grand)children still use their controlling terminal provided by the pane? Commented 2 days ago
  • Idle is not running any command or being empty Commented 2 days ago
  • Please be specific. There is a difference between a pane not running any command and a pane running an interactive shell not running any command. Does the latter qualify as idle? Commented 2 days ago
  • what do you mean with interactive shell and i want windows not panes Commented yesterday

0

You must log in to answer this question.

Browse other questions tagged .