Just curious since I read the same thing in a programming book recently
(21st century C). So what's the greatness that terminal multiplexors
offer over tabbed terminals? Especially for software development?
For sure I use screen at the remote end of ssh connections where I don't
want the application like irssi to die if the connection goes down but
other than that?
The reattaching is a nice feature--especially since you can start
some work in one location, then SSH into the box remotely and
reattach, resuming where you left off. Other nice things include
- if it's a remote machine, only connecting once. This is more a
factor if you need to enter a password, rather than using
passwordless public/private key auth. But even with passwordless
key-pairs, you still have to type "ssh user@host" rather than
"{prefix key}c" to create a new connection on the same machine.
- the ability to monitor windows for activity/silence (at least GNU
Screen offered this; I haven't dug for it yet in tmux which I'm
learning). This is nice for backgrounding a compile and being
notified when it goes silent (usually means it's done) or watching a
long-running quiet process to get notification when it finally has
some output. I used this feature a LOT back when I did C/C++ work.
- both offer the ability to do screen-sharing with other parties, as
well as granting them various permissions (user X can watch but not
interact with the session, while user Y can issue commands to the
terminal as well) which is nice for remotely pair programming, or
teaching somebody the ropes or troubleshooting.
- depending on your tabbed terminal windows, terminal multiplexors
usually offer some split-screen abilities (last I checked, GNU
Screen only offered horizontal splits; tmux had both vertical &
horizontal splits). As a Vim user (which doesn't have a way to
include a terminal window inside Vim unless you rebuild it with
unofficial patches), this allows me to have an editor in one
{screen|tmux} window and a shell in the other and be able to see
them together. I don't use it much, but it's nice to have when I do
need it.
- tmux offers the ability to transmit keyboard input to all
linked/synchronized windows, so you can connect to multiple servers
and then issue the same commands and they get run across all of
them. I believe Screen offers a similar ability to broadcast
keystrokes to all windows, but with a clunkier interface. Sort of a
poor-man's "clusterssh". I've not needed this one, but it's there
in case you manage clusters or develop/deploy with them.
Those are just a few of the things that come to mind. Some might be
replicated by a tabbed terminal window; others less so.
-tkc