Search code examples
tmuxgnu-screenterminal-emulator

What is merit of terminal multiplexer compared to standard terminal app and job control?


I don't know what is a merit of a terminal multiplexer like screen or tmux compared to combination of a standard terminal application and a job control feature of a shell.

Typically good features of a terminal multiplexer are cited as follows:

  • persistance
  • multiple windows
  • session sharing

First two features are, however, achieved with a terminal application like iTerm2 and a job control feature of a shell like bash.

Session sharing is a novel feature but it seems to be required in a quite rare situation.

What is a merit of terminal multiplexer? Why do you use it? I'm interested especially in its merit in daily task.


Solution

  • I can tell you from my perspective as a devops/developer.

    Almost every day I have to deploy a bunch of apps (a particular version) on multiple servers. Handling that without something like Terminator or Tmux would be a real pain.

    On a single window I can put something like 4 panes (four windows in one) and monitor stuff on 4 different servers...which by it self is a huge deal...without tabs or other terminal instances and what not....

    On the first pane I can shutdown nginx, on the second server I can shut down all the processes with supervisord (process manager), and on the third pane I can do the deploy process...if I quickly need to jump to some other server I just use the fourth pane...

    Some colleagues that only use a bunch of terminal instances can get really confused when they have to do a bunch of things quickly, constantly ssh-ing in and out ...and if they are not careful they can go to the wrong server because they switched to the wrong terminal instance and entered a command that wasn't meant for that particular server :)...

    A terminal multiplexer like Tmux really does help me to be quick and accurate. There is an package manager for Tmux, which lets you install plugins and really supercharge you terminal even more!

    On a different note, a lot of people are using Tmux in combination with Vim...which lets you create some awesome things together...

    All in all, those were my two cents on the benefit of using a terminal multiplexer...