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
tmux kill-serveryields 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).