There is another advantage of tmux
: what happens if you accidentally close iterm2
? If you do it really by accident, you want to reopen everything again. With tmux
it is normally as simple as reattaching session without losing anything. Most terminal emulators send SIGHUP
to all children which terminates them by default and thus you lose unsaved data (at least, shell and vim command history and other data stored in viminfo) and running processes and thus reopening means rerunning everything.