exit tmux window without quitting the Terminal program

  • OK I'm new to this. I installed tmux to run a several days experiment. After typing tmux new -s name I got a new window with green banner at the bottom. I compile and run java program. Now I do not know how to exit the window (while leave it running). The bash (or whatever) cursor is not responding because the java program is still running. My solution so far is to quit the Terminal program completely and reopen it again. Any ideas on how to quit the tmux window without exiting the whole Terminal program?

    `man tmux | less -p detach`

    For more interactive way, you can do `Ctrl+b s`which will list sessions, navigate to the one you want to kill and type `:kill-session`.

  • Ruban Savvy

    Ruban Savvy Correct answer

    6 years ago

    Detach from currently attached session


    Ctrl+ b d or Ctrl+ b :detach


    Ctrl+ a Ctrl+ d or Ctrl+ a :detach

    You then need to run `tmux attach` to enter the open session again after re-connecting.

    I've always done `ENTER ~ .` This seems nicer.

License under CC-BY-SA with attribution

Content dated before 6/26/2020 9:53 AM