What’s the relationship between multiplexer and terminal

multiplexingterminalterminologytmuxvirtual-terminal

Recently, I learned there's this tmux tool.

in wiki, it defines tmux is a terminal multiplexer and I kinda get the idea of what it is capable of.

But I'm a little confused about the relationship between tmux(multiplexer) and terminal.

some questions:

  • tmux needs to be used within a terminal application?
  • if I use tmux, does it matter which type of terminal I use? Is that tmux will completely take over the control from terminal?
  • using tmux with gnome-terminal is better than using terminator? Because tmux provide more feature than terminator?

Best Answer

TMUX is indeed a great tool and I use it a lot. Great for long-running applications and unreliable network connections.

TMUX is simply software that adds capabilities to a terminal session. In effect it provides a virtual terminal - actually any number of virtual terminals over a single "physical" terminal (not really physical of course since you are probably connected via a remote terminal session).

Maybe a better way of thinking about it is that you start a "shell" somehow (e.g. via SSH or a local terminal), then instead of directly interacting with the shell, you run an application that looks rather like the shell and passes commands through to the shell but sits on top. If your shell connection breaks for some reason, the virtual terminal application is still running so you can re-connect to it.

  • Yes, you need some kind of terminal/shell to run TMUX in.
  • TMUX can only add so much to the underlying terminal/shell so it does make some difference. If you have a monochrome terminal session for example, you wouldn't really be able to add colour.
  • "Better" than terminator? Don't know and the answer would be opinion anyway. Does one or the other give you more or less of what you actually want?
Related Question