Screen vs. tmux Faceoff

Jon Jensen
End Point Corporation
endpoint.com

Utah Open Source Conference, May 3–5, 2012

Which are you using?

Why use either?

Terminal multiplexing

Useful features…

And also…

Ops war story

Shared windows during migration:

  1. root shell
  2. tail -F /var/log/{maillog,secure,messages,httpd/*log}
  3. tail -F /var/log/audit/audit.log | grep ^type=AVC
  4. psql session
  5. rsync run window
  6. migration steps and notes in Vim
  7. others ad-hoc as needed

Pair programming

Combine shared Screen or tmux with
headset & phone, Skype, Google+ Hangout

Screen the venerable

Not really broken, but stagnant.

Enter tmux

Pros:

More pros

Even more pros

More more

More more pros

synchronize-panes

^B "

^B :setw synchronize-panes on

“Follow the leader”

^B :lock-client

Copy history and paste

Broken on various platforms…

^B [

vi keybindings to move, search, etc.

space starts copying; enter when done

^B # to see history of buffers

Consistency

q dismisses:

cwd

Screen keeps cwd same in all new windows.

tmux keeps cwd same as last window when opening new.

My bias

Screen since 2005 at least?

tmux since 21 June 2011.

Cons

Common command changes

Invocation options

Screen within a screen

Or screens within tmux.

Scrollback history too small

Set to 100000 or so in /etc/screenrc or ~/.tmux.conf.

Peaceful cop-out

Learn them both so you can:

Learn default keybindings

Customization is nice, but know the defaults!

Just try it

If you haven’t tried them yet, do it today!

Must use them to understand and learn.

Availability

Screen: everywhere, often preinstalled

tmux: recent Debian, Ubuntu, RHEL 5+ (EPEL),
Fedora, FreeBSD. Ships with OpenBSD.

Group demo

ssh demo@utosc.temphost.net

pass: verysecure

screen -x

tmux att

See also

Questions?

Twitter: @jonjensen0

jon@endpoint.com

Check out our Liquid Galaxy demo
here at the conference!