tmux vs. GNU Screen

From their website:

  • How is tmux different from GNU screen? What else does it offer?

tmux offers several advantages over screen:

  • a clearly-defined client-server model: windows are independent entities which may be attached simultaneously to multiple sessions and viewed from multiple clients (terminals), as well as moved freely between sessions within the same tmux server;
  • a consistent, well-documented command interface, with the same syntax whether used interactively, as a key binding, or from the shell;
  • easily scriptable from the shell;
  • multiple paste buffers;
  • choice of vi or emacs key layouts;
  • an option to limit the window size;
  • a more usable status line syntax, with the ability to display the first line of output of a specific command;
  • a cleaner, modern, easily extended, BSD-licensed codebase.

There are still a few features screen includes that tmux omits:

  • builtin serial and telnet support; this is bloat and is unlikely to be added to tmux;
  • wider platform support, for example IRIX and HP-UX, and for odd terminals.

One difference is in how the two act when multiple terminals are attached to a single session.

With screen, each attached terminal's view is independent of the others. With tmux, all attached terminals see the same thing.

Say you have two terminals attached to a single tmux session. If you type ^B 1 into one terminal, the other terminal also switches to window 1.

When you have two terminals attached to a single screen session, and you type ^A 1 into one, it has no effect on the other terminal.

This is based on my experience with tmux 1.2; I see 1.3 is out but I didn't notice anything in the changelog about this behavior changing.

If you like the screen behavior and want it in tmux:

If your original tmux session is called 0 (the default), then you can do tmux new-session -t 0) to start up a new independent session connected to the same set of windows, which can then have its own view.

tmux is fairly new compared with GNU screen. Advantages / Disadvantages is a tough question, as both programs solve approximately the same problem. tmux is BSD licensed while screen is GNU GPL. This matters to some people.

screen is more represented (on Linux) at the moment, that is, you are more likely to find it on a given linux box than tmux. tmux is however more represented on OpenBSD as it is included as part of the base install.

Both programs allow you to do about the same thing, though the state of things is a bit more complex than that. Switching between the two is not overly complicated, as much of screens functionality has also found its way into tmux, though if you are a power user of either one, you will likely find some frustrations when switching to the other.

As with any program, it really depends on your needs, and which you are more comfortable with. Give them both a try and see which you play nicely with.

For more info on tmux see