0

Using the tmux command kill-server one can immediately shut down the tmux server and close all open tmux windows.
How does this affect the processes still running inside the various tmux windows? Will they shut down gracefully or just be forced to quit, leaving open filelocks etc.?

To use the command put the following line in your .tmux.conf:
bind k confirm kill-server

  • Hi and welcome to UL.se. The first result googling for tmux kill-server yields an answer on askubuntu which states as first sentence: You can use tmux kill-server to cleanly and gracefully kill all tmux open sessions (and server). – Bananguin Mar 22 at 14:31
  • It refers to the sessions and server. I was not sure if that includes the programs running inside those sessions. – user343124 Mar 22 at 14:36
0

All processes inside tmux will be sent SIGHUP, just as if you had used kill-pane/kill-window/kill-session. What the program chooses to do with the signal depends, most will shutdown cleanly.

Note that "tmux kill-server" just causes tmux to send itself SIGTERM, so it is the same as killing it with pkill or kill.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.