When comparing tmux vs screen, the Slant community recommends tmux for most people. In the question“What are the best terminal multiplexers?” tmux is ranked 1st while screen is ranked 3rd. The most important reason people chose tmux is:
As long as you don't close your session, you may even lose your SSH connection, it'll keep your state just as it was. So you can resume where you left off (via `tmux attach`).
Ranked in these QuestionsQuestion Ranking
Pro Preserve the state
As long as you don't close your session, you may even lose your SSH connection, it'll keep your state just as it was. So you can resume where you left off (via
Pro Easily split panes
There is a keyboard shortcut that makes it easy to split a window and create more panes.
Pro Maximize screen space
As a tiling window manager, it'll make use of all the space. As you have multiple workspaces and you can resize, etc. you can adjust to see what matters most.
Pro Frequently updated
Tmux is in a state of constant development. Updates are frequent and bug reports usually get an answer within days.
Pro Mouse support
Mouse support can optionally be enabled, allowing e.g. scrolling with the mouse wheel, or switching panes with mouse clicks.
Pro Windows linked to sessions
tmux calls the individual shell instances windows. They are displayed like tabs in the status line. These windows can be shared between different sessions, so that any given shell instance can be in any number of tmux sessions used for different purposes or by different users. This allows configurations like the following example: User A: wAB, wA1, wA2; User B: wB1, wAB, wB2
Pro Only need to learn a few keyboard shortcuts and commands to make much headway
Open ~/.tmux.conf to get started. You can customize keybindings, the bottom status bar, color schemes, the clock screen, your time zone, and more.
Pro Preserve your session
Screen allows multiple terminals (screens) within a single screen number, so when you reconnect they will all be there.
Pro It is installed by default on a lot of systems including macOS
Pro Supports shared sessions
More than one user can be connected to a single screen session.
Pro Also works as serial port terminal
This is actually very valuable for embedded or networking work.
Con Poorly designed key binding
Counter-intuitive keyboard shortcuts make tmux very hard to use and learn.
Con Breaks select to copy, middle paste to click. Tried many config options without any luck
Con Bad scrolling support
Con No builtin telnet or serial support
It's considered bloat by the maintainers and for this reason there's no builtin support for them.
Con Scrolling becomes tricky
You can no longer scroll with your mouse wheel, unless you do Ctra-a + Escape first
Con Doesn't work too well with ssh X connections
If you have an X connection over ssh within screen, it likely won't reconnect when you reconnect your screen.