With GNU screen I could do, for example:
screen -S monitor top
A screen would start executing top, and if top ended the screen session would end.
Is there a way to do the same thing with tmux?
Thanks in advance.
You can start tmux and make it execute a particular command. However unlike screen, a Tmux window does not end when the command exits. I assume that in screen, the executing command and the screen window are in the same process and hence they both get killed together.
-s specifies the name of the session (test in this case)